Description:
The assert happens in sql_base.cc:1799 :
if (table->table)
{
/* temporary table is always unique */
if (table->table && table->table->s->tmp_table != NO_TMP_TABLE)
DBUG_RETURN(0);
table= table->find_underlying_table(table->table);
/*
as far as we have table->table we have to find real TABLE_LIST of
it in underlying tables
*/
DBUG_ASSERT(table); <<===============
}
RQG test with 30 threads using the grammar WL5004_sql.yy
Result on mysql-6.0-codebase-bugfixing
revno: 3692 2009-10-31
--------------------------------------
Thread 1 (process 2435):
#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 unique_table (thd=0x317a1c8, table=0x0, table_list=0x31d51e8, check_alias=false) at sql_base.cc:1799
#8 mysql_prepare_delete (thd=0x317a1c8, table_list=0x316b720, conds=0x7f1642d5a198) at sql_delete.cc:510
#9 mysql_delete (thd=0x317a1c8, table_list=0x316b720, conds=0x2b973f0, order=0x317c380, limit=18446744073709551615, options=0, reset_auto_increment=false) at sql_delete.cc:77
#10 mysql_execute_command (thd=0x317a1c8) at sql_parse.cc:3382
#11 mysql_parse (thd=0x317a1c8, inBuf=0x316b5c0 "DELETE FROM testdb_S . t1_all_2_S WHERE `pk` + SLEEP( 0.5 * 1 * 1 ) = 3", length=74, found_semicolon=0x7f1642d5c8f8) at sql_parse.cc:5979
#12 dispatch_command (command=COM_QUERY, thd=0x317a1c8, packet=0x32179f9 "DELETE FROM testdb_S . t1_all_2_S WHERE `pk` + SLEEP( 0.5 * 1 * 1 ) = 3", packet_length=74) at sql_parse.cc:1076
#13 do_command (thd=0x317a1c8) at sql_parse.cc:758
#14 handle_one_connection (arg=0x317a1c8) at sql_connect.cc:1164
#15 start_thread () from /lib/libpthread.so.0
#16 clone () from /lib/libc.so.6
#17 ?? ()
My environment:
- MySQL compiled from source with
./BUILD/compile-pentium64-debug-max
- Linux OpenSuSE 11.0 (64 Bit)
- Intel Core2Duo
How to repeat:
I will come up with a simplified testcase soon.