Bug #21666 mysql server crash when defining temporary tables using the socket connection
Submitted: 16 Aug 2006 0:03 Modified: 16 Aug 2006 16:17
Reporter: Cristian Gafton Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server Severity:S1 (Critical)
Version:5.0.24 OS:Linux (Linux)
Assigned to: CPU Architecture:Any

[16 Aug 2006 0:03] Cristian Gafton
Description:
The mysql server version 5.0.24 crashes when two different connections are trying to load temporary table schemas. I will attach a schema file that shows the problem.

How to repeat:
1. start up the mysqld server using the provided shell script:
   sh ./start-mysqld.sh

This will create by default a socket connection for the new mysqld under /tmp/mybug/socket. The server will be running using --console on vt0.

2. Start up TWO simultaneous mysql connections using that socket file
   (assuming two terminals, vt1 and vt2)

(vt1)    mysql -S /tmp/mybug/socket -u root
(vt2)    mysql -S /tmp/mybug/socket -u root

3. Load up the crash.sql in each mysql session:
(vt1)   mysql> \. crash.sql
(vt2)   mysql> \. crash.sql

4. Hit CTRL-D on VT2. The mysqld server will crash, as seen on vt0.
[16 Aug 2006 0:05] Cristian Gafton
shell script to start up mysqld for this test

Attachment: start-mysqld.sh (application/x-sh, text), 868 bytes.

[16 Aug 2006 0:07] Cristian Gafton
SQL schema that crashes the mysqld server

Attachment: crash.sql (text/x-sql), 3.73 KiB.

[16 Aug 2006 16:02] MySQL Verification Team
verified this crash with mysql-standard-5.0.24-linux-i686-glibc23

(gdb) bt
#0  0x081aac54 in close_temporary ()
#1  0x081aadb0 in close_temporary_tables ()
#2  0x0816a571 in THD::cleanup ()
#3  0x08176f7e in end_thread ()
#4  0x08189747 in handle_one_connection ()
#5  0x00880b80 in start_thread () from /lib/libpthread.so.0
#6  0x00597dee in clone () from /lib/libc.so.6
(gdb) 

Probably a duplicate of one of the other close_temporary_tables() bugs.
[16 Aug 2006 16:17] MySQL Verification Team
duplicate of bug #21582
[18 Aug 2006 21:00] Andrei Elkin
This must be a dup of earlier bug#20919.