Bug #17807 rename of NDB table can cause core in my_pthread_fastmutex_lock
Submitted: 28 Feb 2006 21:40 Modified: 13 Mar 2006 12:59
Reporter: Jonathan Miller Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Cluster: Cluster (NDB) storage engine Severity:S1 (Critical)
Version:5.1.8 OS:Linux (Linux 32 Bit OS)
Assigned to: CPU Architecture:Any

[28 Feb 2006 21:40] Jonathan Miller
Description:
This one is a little strange in the fact that you have to run the 2 test before rename.test in order to get the core to happen. I have been unable to break it down and further then that at this point.

 rename                         [ fail ]

Errors are (from /home/ndbdev/jmiller/clones/mysql-5.1-new/mysql-test/var/log/mysqltest-time) :
mysqltest: At line 19: query 'rename table t3 to t4, t2 to t3, t1 to t2, t4 to t1' failed: 2013: Lost connection to MySQL server during query
(the last lines may be the most important ones)

#0  0x00bc6402 in __kernel_vsyscall ()
#1  0x00a2855f in pthread_kill () from /lib/libpthread.so.0
#2  0x082f31cb in write_core (sig=16224) at stacktrace.c:220
#3  0x081d3902 in handle_segfault (sig=11) at mysqld.cc:2179
#4  <signal handler called>
#5  my_pthread_fastmutex_lock (mp=0x84) at thr_mutex.c:420
#6  0x08352530 in ndbcluster_log_schema_op (thd=0xb769f830, share=0x0,
    query=0xa3f5668 "rename table t3 to t4, t2 to t3, t1 to t2, t4 to t1", query_length=51,
    db=0xb76bf2b8 "test", table_name=0x7c7c1b "t2", ndb_table_id=0, ndb_table_version=0,
    type=SOT_RENAME_TABLE) at ha_ndbcluster_binlog.cc:1106
#7  0x08346c3a in ha_ndbcluster::rename_table (this=0xb76bf1e0, from=0x7c835b "./test/t1",
    to=0x7c815b "./test/t2") at ha_ndbcluster.cc:4823
#8  0x082b6e21 in mysql_rename_table (base=0x86f2b20, old_db=0xa425a00 "test",
    old_name=0xa3f5df8 "t1", new_db=0xa425a00 "test", new_name=0xa3f5e18 "t2")
    at sql_table.cc:2511
#9  0x082bf4be in rename_tables (thd=0xb769f830, table_list=Variable "table_list" is not available.
) at sql_rename.cc:178
#10 0x082bf66c in mysql_rename_tables (thd=0xb769f830, table_list=0xa3f5720, silent=false)
    at sql_rename.cc:60
#11 0x081f11b1 in mysql_execute_command (thd=0xb769f830) at sql_parse.cc:3076
#12 0x081f7694 in mysql_parse (thd=0xb769f830,
    inBuf=0xa3f5668 "rename table t3 to t4, t2 to t3, t1 to t2, t4 to t1", length=51)
    at sql_parse.cc:5775
#13 0x081f7c5d in dispatch_command (command=COM_QUERY, thd=0xb769f830, packet=Variable "packet" is not available.
)
    at sql_parse.cc:1769
#14 0x081f99e7 in handle_one_connection (arg=0xb769f830) at sql_parse.cc:1536
#15 0x00a25b80 in start_thread () from /lib/libpthread.so.0

How to repeat:
I can repeat the core each time by using

./mysql-test-run --force --mysqld=--default-storage-engine=ndb --with-ndbcluster-all --ndb-extra-test --do-test=r

The test will run:
range 
read_only
rename - this is where the core is at.
[13 Mar 2006 12:59] Jonathan Miller
Can not repeat with latest pull from clone.
JBM