2 messages in com.mysql.lists.bugsUPDATE with WHERE+ORDER+LIMIT error(?...
FromSent OnAttachments
Serge E. Yakubovich06 Nov 2003 04:40.sh
Alexander Keremidarski25 Nov 2003 06:23 
Subject:UPDATE with WHERE+ORDER+LIMIT error(?) - test shell script (fwd)
From:Serge E. Yakubovich (se@ukrbiz.com)
Date:11/06/2003 04:40:27 AM
List:com.mysql.lists.bugs
Attachments:

Description:

The same test script I've submitted today to bu@lists.mysql.com, which demonstrates improper(?) behaviour of UPDATE statement on 4.0.12 server under FreeBSD, on 4.0.15 server under Alt Linux causes segmentation fault. Below is messages from /var/log/mysql/info:

---------- Start of listing ----------- /usr/sbin/mysqld: ready for connections. Version: '4.0.15' socket: '/mysql.sock' port: 3306 mysqld got signal 11; This could be because you hit a bug. It is also possible that this binary or one of the libraries it was linked against is corrupt, improperly built, or misconfigured. This error can also be caused by malfunctioning hardware. We will try our best to scrape up some info that will hopefully help diagnose the problem, but since we have already crashed, something is definitely wrong and this may fail.

key_buffer_size=67108864 read_buffer_size=131072 max_used_connections=2 max_connections=100 threads_connected=2 It is possible that mysqld could use up to key_buffer_size + (read_buffer_size + sort_buffer_size)*max_connections = 897535 K bytes of memory Hope that's ok; if not, decrease some variables in the equation.

thd=0x881b578 Attempting backtrace. You can use the following information to find out where mysqld died. If you see no messages after this, something went terribly wrong... frame pointer (ebp) is NULL, did you compile with -fomit-frame-pointer? Aborting backtrace! Trying to get some variables. Some pointers may be invalid and cause the dump to abort... thd->query at 0x882c048 = UPDATE ip SET n=(@n:=@n+1),uid=@uid,ip=(@dip:=ip),tuse=0 WHERE tuse>1 ORDER BY !(uid=@uid),tuse LIMIT 1 thd->thread_id=6 The manual page at http://www.mysql.com/doc/en/Crashing.html contains information that should help you find out what is causing the crash. 2003-Nov-06 13:40:48 :: execution failed 2003-Nov-06 13:40:48 :: shutdown ---------- Stop of listing -----------

How-To-Repeat: View (edit if need ) & run attached shell script IP.SH Fix: N/A Submitter-Id: se@UkrBiz.Com Originator: se@UkrBiz.Com Organization: UkrBiz MySQL support: none Synopsis: improper operation (4.0.12) or server crash (4.0.15) on UPDATE query Severity: serious Priority: <[ low | medium | high ] (one line)> Category: mysql Class: sw-bug Release: mysql-4.0.15 (ALT Linux MySQL RPM) Server: /usr/bin/mysqladmin Ver 8.40 Distrib 4.0.15, for

alt-linux-gnu on i586 Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB This software comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to modify and redistribute it under the GPL license

Server version 4.0.15 Protocol version 10 Connection Localhost via UNIX socket UNIX socket /var/lib/mysql/mysql.sock Uptime: 30 min 17 sec

Threads: 2 Questions: 1668 Slow queries: 0 Opens: 91 Flush tables: 1 Open tables: 64 Queries per second avg: 0.918

C compiler: i586-alt-linux-gcc (GCC) 3.2.3 (ALT Linux, build 3.2.3-alt1) C++ compiler: i586-alt-linux-g++ (GCC) 3.2.3 (ALT Linux, build 3.2.3-alt1) Environment:

<machine, os, target, libraries (multiple lines)> System: Linux server.int.ukrbiz.com 2.4.20-alt7-up #1 Fri Mar 14 14:57:05 MSK 2003 i586 unknown unknown GNU/Linux Architecture: i586

Some paths: /usr/bin/perl /usr/bin/make /usr/bin/gmake /usr/bin/gcc /usr/bin/cc GCC: Reading specs from /usr/lib/gcc-lib/i586-alt-linux/3.2.3/specs Configured with: ../configure --prefix=/usr --libdir=/usr/lib --with-slibdir=/lib --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --disable-checking --enable-long-long --enable-__cxa_atexit --enable-languages=c,c++,f77,objc,java --program-suffix=-3.2 --enable-objc-gc --with-system-zlib --without-included-gettext --host=i586-alt-linux --build=i586-alt-linux --target=i586-alt-linux Thread model: posix gcc version 3.2.3 (ALT Linux, build 3.2.3-alt2) Compilation info: CC='i586-alt-linux-gcc' CFLAGS='-pipe -Wall -O2 -march=i586 -mcpu=i686 -fomit-frame-pointer -D_FILE_OFFSET_BITS=64 -DHAVE_ERRNO_AS_DEFINE -DONE_THREAD' CXX='i586-alt-linux-g++' CXXFLAGS='-pipe -Wall -O2 -march=i586 -mcpu=i686 -fomit-frame-pointer -D_FILE_OFFSET_BITS=64 -DHAVE_ERRNO_AS_DEFINE -DONE_THREAD -felide-constructors -fno-exceptions -fno-rtti' LDFLAGS='' ASFLAGS='' LIBC: lrwxrwxrwx 1 root root 13 Sep 5 15:23 /lib/libc.so.6 -> libc-2.2.6.so -rwxr-xr-x 2 root root 1145896 Sep 1 20:08 /lib/libc-2.2.6.so -rw-r--r-- 1 root root 2416908 Sep 1 20:08 /usr/lib/libc.a -rw-r--r-- 1 root root 178 Sep 1 20:37 /usr/lib/libc.so Configure command: ./configure '--build=i586-alt-linux' '--host=i586-alt-linux' '--prefix=/usr' '--exec-prefix=/usr' '--bindir=/usr/bin' '--sbindir=/usr/sbin' '--sysconfdir=/etc' '--datadir=/usr/share' '--includedir=/usr/include' '--libdir=/usr/lib' '--libexecdir=/usr/sbin' '--localstatedir=/var/lib' '--sharedstatedir=/usr/com' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--without-included-gettext' '--localstatedir=/var/lib/mysql' '--enable-assembler' '--enable-shared' '--enable-thread-safe-client' '--without-readline' '--without-debug' '--with-raid' '--with-extra-charsets=all' '--with-berkeley-db' '--with-mysqld-user=mysql' '--with-unix-socket-path=/var/lib/mysql/mysql.sock' '--with-comment=ALT Linux MySQL RPM' 'CFLAGS=-pipe -Wall -O2 -march=i586 -mcpu=i686 -fomit-frame-pointer -D_FILE_OFFSET_BITS=64 -DHAVE_ERRNO_AS_DEFINE -DONE_THREAD' 'CXXFLAGS=-pipe -Wall -O2 -march=i586 -mcpu=i686 -fomit-frame-pointer -D_FILE_OFFSET_BITS=64 -DHAVE_ERRNO_AS_DEFINE -DONE_THREAD -felide-constructors -fno-exceptions -fno-rtti' 'FFLAGS=-pipe -Wall -O2 -march=i586 -mcpu=i686 -fomit-frame-pointer -D_FILE_OFFSET_BITS=64 -DHAVE_ERRNO_AS_DEFINE -DONE_THREAD' 'build_alias=i586-alt-linux' 'host_alias=i586-alt-linux'