Description:
The assertion happens in sql_base.cc:474
/*
To be able perform any operation on table we should own
some kind of metadata lock on it.
*/
DBUG_ASSERT(thd->mdl_context.is_lock_owner(MDL_key::TABLE, table_list->db,
table_list->table_name));
RQG test with 30 threads using the grammar WL5004_sql.yy
Result on mysql-6.0-codebase-bugfixing
revno: 3692 2009-10-31
--------------------------------------
#0 pthread_kill () from /lib/libpthread.so.0
#1 my_write_core (sig=6) at stacktrace.c:309
#2 handle_segfault (sig=6) at mysqld.cc:2765
#3 <signal handler called>
#4 raise () from /lib/libc.so.6
#5 abort () from /lib/libc.so.6
#6 __assert_fail () from /lib/libc.so.6
#7 get_table_share (thd=0x34dc818, table_list=0x34df768, key=0x7fccf1d14880 "\020\006\nìÌ\177", key_length=18, db_flags=8192, error=0x7fccf1d14874) at sql_base.cc:474
#8 get_table_share_with_create (thd=0x34dc818, table_list=0x34df768, key=0x7fccf1d14880 "\020\006\nìÌ\177", key_length=18, db_flags=8192, error=0x7fccf1d14874) at sql_base.cc:574
#9 open_table (thd=0x34dc818, table_list=0x34df768, mem_root=0x7fccf1d14e00, ot_ctx=0x7fccf1d14e60, flags=0) at sql_base.cc:2678
#10 open_and_process_table (thd=0x34dc818, lex=0x34de0e8, tables=0x34df768, counter=0x7fccf1d14f28, flags=0, prelocking_strategy=0x7fccf1d14f60, has_prelocking_list=false, ot_ctx=0x7fccf1d14e60, new_frm_mem=0x7fccf1d14e00)
at sql_base.cc:3940
#11 open_tables (thd=0x34dc818, start=0x7fccf1d14ef0, counter=0x7fccf1d14f28, flags=0, prelocking_strategy=0x7fccf1d14f60) at sql_base.cc:4178
#12 open_and_lock_tables_derived (thd=0x34dc818, tables=0x34df768, derived=false, flags=0, prelocking_strategy=0x7fccf1d14f60) at sql_base.cc:4763
#13 open_and_lock_tables_derived (thd=0x34dc818, tables=0x34df768, derived=false, flags=0) at ../mysql_priv.h:1518
#14 open_n_lock_single_table (thd=0x34dc818, table_l=0x34df768, lock_type=TL_WRITE_DELAYED, flags=0) at sql_base.cc:4594
#15 Delayed_insert::open_and_lock_table (this=0x34dc7f8) at sql_insert.cc:2357
#16 handle_delayed_insert_impl (thd=0x34dc818, di=0x34dc7f8) at sql_insert.cc:2407
#17 handle_delayed_insert (arg=0x34dc7f8) at sql_insert.cc:2632
#18 start_thread () from /lib/libpthread.so.0
#19 clone () from /lib/libc.so.6
#20 ?? ()
How to repeat:
I will come up with a simplified testcase soon.