Bug #17340 SHOW CREATE TABLE from second session crashes the server
Submitted: 13 Feb 2006 15:04 Modified: 14 Feb 2006 10:22
Reporter: Matthias Leich Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Cluster: Cluster (NDB) storage engine Severity:S1 (Critical)
Version:5.1 OS:
Assigned to: Tomas Ulin CPU Architecture:Any

[13 Feb 2006 15:04] Matthias Leich
Description:
When I create a table within the first session and execute a
SHOW CREATE TABLE within the second session, the server crashes.

# Storage engine to be tested
let $engine= 'NDB';
--source include/have_ndb.inc
eval SET SESSION storage_engine=$engine;

--disable_warnings
DROP TABLE IF EXISTS t1;
--enable_warnings

eval CREATE TABLE t1 (
f_int1 INTEGER,
f_int2 INTEGER,
f_char1 CHAR(10),
f_char2 CHAR(10),
f_charbig VARCHAR(1000)
);

SELECT * FROM t1;
SHOW CREATE TABLE t1; 
           <--- This statement works fine.
                  At least it shows that SHOW CREATE basically works.
connect (addconroot1, localhost, root,,);
# SELECT * FROM t1;  
           <--- This statement is harmless.
                  At least it shows that the second session works.
SHOW CREATE TABLE t1;
                <--- Here I get the server crash.

If I replace MySQL 5.1 with 5.0 or the storage enginge NDB by
MyISAM the crash disappears.

My environment:
   - Intel PC with Linux(SuSE 9.3)
   - MySQL compiled from source
         Version 5.1 last ChangeSet@1.2106.1.2, 2006-02-10
         Version 5.0 last ChangeSet@1.2031, 2006-02-03 (NO crash)

How to repeat:
Please execute the statements above.
[13 Feb 2006 20:01] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/2546
[13 Feb 2006 21:05] Tomas Ulin
pushed into 5.1.7
[14 Feb 2006 10:22] Jon Stephens
Thank you for your bug report. This issue has been committed to our
source repository of that product and will be incorporated into the
next release.

If necessary, you can access the source repository and build the latest
available version, including the bugfix, yourself. More information 
about accessing the source trees is available at
    http://www.mysql.com/doc/en/Installing_source_tree.html

Additional info:

Documented fix in 5.1.7 changelog. Closed.