Description:
if you kill a "create table t2 like t1" while it waits for t1 to become unlocked, the server will crash with this stack trace:
mysqld-debug.exe!table_cache_key
mysqld-debug.exe!hash_key
mysqld-debug.exe!rec_hashnr
mysqld-debug.exe!hash_delete
mysqld-debug.exe!unlock_table_name
mysqld-debug.exe!mysql_create_like_table
mysqld-debug.exe!mysql_execute_command
mysqld-debug.exe!mysql_parse
mysqld-debug.exe!dispatch_command
mysqld-debug.exe!do_command
mysqld-debug.exe!handle_one_connection
mysqld-debug.exe!pthread_start
mysqld-debug.exe!_threadstart
5.1.23 didn't appear to have the problem.
How to repeat:
Use a debug build of 5.0: Perhaps release build will crash too, but not all the time. Debug build crashed each time for me.
connection1
--------------
drop table if exists t1;
drop table if exists t2;
create table t1(id int)engine=myisam;
insert into t1 values (0);
lock table t1 write;
connection2
-----------
create table t2 like t1; #will hang
connection1
--------------
show processlist;
kill <id of the connection2>
Suggested fix:
is this related to bug #30193 ?