ENABLE/DISABLE KEYS with INSERT DELAYED lead to server crash

ENABLE/DISABLE KEYS with INSERT DELAYED lead to server crash

am 22.05.2003 18:08:10 von rathamahata

>Description:
One can easily crash mysqld by using ENABLE/DISABLE KEYS with INSERT DELAYED
>How-To-Repeat:
rathamahata@dev rathamahata $ cat tc.sql
CREATE TABLE t (i int(10) PRIMARY KEY);
ALTER TABLE t DISABLE KEYS;
INSERT DELAYED INTO t VALUES(1);
ALTER TABLE t ENABLE KEYS;
rathamahata@dev rathamahata $ mysql test < tc.sql
ERROR 2013 at line 4: Lost connection to MySQL server during query
>Fix:
Don't use INSERT DELAYED

>Submitter-Id:
>Originator: Sergey S. Kostyliov
>Organization: eHouse (Russia)
>MySQL support: none
>Synopsis:
>Severity: serious
>Priority: medium
>Category: mysql
>Class: sw-bug
>Release: mysql-4.0.13 (Source distribution)
>Server: /usr/bin/mysqladmin Ver 8.40 Distrib 4.0.13, for pc-linux-gnu on i686
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.13
Protocol version 10
Connection Localhost via UNIX socket
UNIX socket /var/lib/mysql/1/mysql.sock
Uptime: 28 sec

Threads: 1 Questions: 4 Slow queries: 0 Opens: 6 Flush tables: 1 Open tables: 0 Queries per second avg: 0.143
>C compiler: gcc (GCC) 3.2.2
>C++ compiler: gcc (GCC) 3.2.2
>Environment:

System: Linux dev.srv.ehouse.ru 2.4.21-pre5aa2 #2 Mon May 12 19:39:55 MSD 2003 i686 Pentium III (Katmai) GenuineIntel GNU/Linux
Architecture: i686

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/i686-pc-linux-gnu/3.2.2/specs
Configured with: /var/tmp/portage/gcc-3.2.2/work/gcc-3.2.2/configure --prefix=/usr --bindir=/usr/i686-pc-linux-gnu/gcc-bin/3.2 --includedir=/usr/lib/gcc-lib/i686-pc-linux-gnu/3.2.2/includ e --datadir=/usr/share/gcc-data/i686-pc-linux-gnu/3.2 --mandir=/usr/share/gcc-data/i686-pc-linux-gnu/3.2/man --infodir=/usr/share/gcc-data/i686-pc-linux-gnu/3.2/info --enable-shared --host=i686-pc-linux-gnu --target=i686-pc-linux-gnu --with-system-zlib --enable-languages=c,c++,ada,f77,objc --enable-threads=posix --enable-long-long --disable-checking --enable-cstdio=stdio --enable-clocale=generic --enable-__cxa_atexit --enable-version-specific-runtime-libs --with-gxx-include-dir=/usr/lib/gcc-lib/i686-pc-linux-gnu/3. 2.2/include/g++-v3 --with-local-prefix=/usr/local --enable-shared --enable-nls --without-included-gettext
Thread model: posix
gcc version 3.2.2
Compilation info: CC='gcc' CFLAGS='-march=pentium3 -mcpu=pentium3 -msse -O3 -pipe -DHAVE_ERRNO_AS_DEFINE=1' CXX='gcc' CXXFLAGS='-march=pentium3 -mcpu=pentium3 -msse -O3 -pipe -felide-constructors -fno-exceptions -fno-rtti -DUSE_MYSYS_NEW' LDFLAGS='' ASFLAGS=''
LIBC:
lrwxrwxrwx 1 root root 13 May 11 07:35 /lib/libc.so.6 -> libc-2.3.1.so
-rwxr-xr-x 1 root root 1422645 May 11 07:35 /lib/libc-2.3.1.so
-rw-r--r-- 1 root root 2517760 May 11 07:35 /usr/lib/libc.a
-rwxr-xr-x 1 root root 178 May 11 07:35 /usr/lib/libc.so
lrwxrwxrwx 1 root root 19 May 11 03:51 /usr/lib/libc-client.a -> /usr/lib/c-client.a
Configure command: ./configure '--prefix=/usr' '--libdir=/usr/lib' '--exec-prefix=/usr' '--datadir=/usr/share' '--libexecdir=/usr/sbin' '--sysconfdir=/etc' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--includedir=/usr/include' '--localstatedir=/var/lib/mysql' '--enable-assembler' '--with-mysql-user=mysql' '--with-innodb' '--with-unix-socket-path=/var/run/mysqld/mysqld.sock' '--with-extra-charsets=latin1,koi8_ru,cp1251' '--without-openssl' '--build=i686-pc-linux-gnu' '--without-readline' 'CC=gcc' 'CFLAGS=-march=pentium3 -mcpu=pentium3 -msse -pipe -DHAVE_ERRNO_AS_DEFINE=1' 'CXXFLAGS=-march=pentium3 -mcpu=pentium3 -msse -O3 -pipe -felide-constructors -fno-exceptions -fno-rtti -DUSE_MYSYS_NEW' 'CXX=gcc' 'build_alias=i686-pc-linux-gnu'


--
MySQL Bugs Mailing List
For list archives: http://lists.mysql.com/bugs
To unsubscribe: http://lists.mysql.com/bugs?unsub=gcdmb-bugs@m.gmane.org

Re: ENABLE/DISABLE KEYS with INSERT DELAYED lead to server crash

am 23.05.2003 02:46:04 von Alexander Keremidarski

Sergey,

Sergey S. Kostyliov wrote:
>>Description:
>
> One can easily crash mysqld by using ENABLE/DISABLE KEYS with INSERT DELAYED
>
>>How-To-Repeat:
>
> rathamahata@dev rathamahata $ cat tc.sql
> CREATE TABLE t (i int(10) PRIMARY KEY);
> ALTER TABLE t DISABLE KEYS;
> INSERT DELAYED INTO t VALUES(1);
> ALTER TABLE t ENABLE KEYS;
> rathamahata@dev rathamahata $ mysql test < tc.sql
> ERROR 2013 at line 4: Lost connection to MySQL server during query

Thanks for this bug report. I was able to repeat it.
For further development of this case refer to our bugs database:

http://bugs.mysql.com/478

Best regards

--
I'm MySQL certified. Are you? -- http://www.mysql.com/certification
For technical support contracts, visit https://order.mysql.com/?ref=msal
__ ___ ___ ____ __
/ |/ /_ __/ __/ __ \/ / Mr. Alexander Keremidarski
/ /|_/ / // /\ \/ /_/ / /__ MySQL AB, Full-Time Developer
/_/ /_/\_, /___/\___\_\___/ Sofia, Bulgaria
<___/ www.mysql.com




--
MySQL Bugs Mailing List
For list archives: http://lists.mysql.com/bugs
To unsubscribe: http://lists.mysql.com/bugs?unsub=gcdmb-bugs@m.gmane.org