Description:
When executing a concurrent workload containing ALTER TABLE, mysqld crashes as follows:
#0 0x00110402 in __kernel_vsyscall ()
#1 0x00bdc617 in pthread_kill () from /lib/libpthread.so.0
#2 0x0842ba5c in write_core (sig=11) at stacktrace.c:240
#3 0x082912a6 in handle_segfault (sig=11) at mysqld.cc:2313
#4 <signal handler called>
#5 0x082e64f4 in unlink_open_table (thd=0x9a835c0, find=0xa9b012c0, unlock=false) at sql_base.cc:2074
#6 0x083d9ebe in mysql_alter_table (thd=0x9a835c0, new_db=0x9bcb518 "test", new_name=0x9bcb300 "inter1", create_info=0xa9c436e0, table_list=0x9bcb328,
alter_info=0xa9c43ba0, order_num=0, order=0x0, ignore=false) at sql_table.cc:6957
#7 0x082a2ce1 in mysql_execute_command (thd=0x9a835c0) at sql_parse.cc:2393
#8 0x082a9e5e in mysql_parse (thd=0x9a835c0, inBuf=0x9bcb250 "ALTER TABLE inter1 CHANGE t1_uuid t1_uuid CHAR(36)", length=50, found_semicolon=0xa9c44280)
at sql_parse.cc:5410
#9 0x082aa871 in dispatch_command (command=COM_QUERY, thd=0x9a835c0, packet=0x9ac32d9 "ALTER TABLE inter1 CHANGE t1_uuid t1_uuid CHAR(36)",
packet_length=50) at sql_parse.cc:921
#10 0x082ab9f7 in do_command (thd=0x9a835c0) at sql_parse.cc:697
#11 0x08299d21 in handle_one_connection (arg=0x9a835c0) at sql_connect.cc:1146
#12 0x00bd750b in start_thread () from /lib/libpthread.so.0
#13 0x00b18b2e in clone () from /lib/libc.so.6
Error log contains those entries from the second of the crash:
080304 19:39:18 InnoDB: Warning: MySQL is trying to drop table `test`.`inter1_old_46`
InnoDB: though there are still open handles to it.
InnoDB: Adding the table to the background drop queue.
080304 19:39:19 [ERROR] Cannot find or open table test/inter1 from
the internal data dictionary of InnoDB though the .frm file for the
table exists. Maybe you have deleted and recreated InnoDB data
files but have forgotten to delete the corresponding .frm files
of InnoDB tables, or you have moved .frm files to another database?
or, the table contains indexes that this version of the engine
doesn't support.
See http://dev.mysql.com/doc/refman/5.1/en/innodb-troubleshooting.html
how you can resolve the problem.
the last message is repeated a few times.
How to repeat:
Simplifed test case will hopefully follow.