Bug #49498 Assertion `table->in_use == _current_thd()' on concurrent DDL
Submitted: 7 Dec 2009 10:20 Modified: 19 May 2010 13:47
Reporter: Philip Stoev Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Server: Locking Severity:S3 (Non-critical)
Version:6.0-codebase-bugfixing OS:Any
Assigned to: Jon Olav Hauglid CPU Architecture:Any

[7 Dec 2009 10:20] Philip Stoev
Description:
When executing a RQG workload that is heavy on DDL, mysqld asserted as follows:

mysqld: field.cc:3695: virtual longlong Field_long::val_int(): Assertion `table->in_use == _current_thd()' failed.

# 11:47:54 #6  0x000000315a42bec9 in __assert_fail () from /lib64/libc.so.6
# 11:47:54 #7  0x000000000063a1f1 in Field_long::val_int (this=0x3b1a208) at field.cc:3695
# 11:47:54 #8  0x0000000000736743 in mysql_insert (thd=0x7fe4702b1088, table_list=0x3ce96c8, fields=@0x3ce8fa8, values_list=@0x3ce8ff0, update_fields=@0x3ce8fd8,
# 11:47:54     update_values=@0x3ce8fc0, duplic=DUP_REPLACE, ignore=false) at sql_insert.cc:968
# 11:47:54 #9  0x0000000000686c6e in mysql_execute_command (thd=0x7fe4702b1088) at sql_parse.cc:3267
# 11:47:54 #10 0x000000000073dde9 in Prepared_statement::execute (this=0x3988798, expanded_query=0x7fe47781a2c0, open_cursor=false) at sql_prepare.cc:3768
# 11:47:54 #11 0x0000000000741d71 in Prepared_statement::execute_loop (this=0x3988798, expanded_query=0x7fe47781a2c0, open_cursor=false, packet=0x0, packet_end=0x0)
# 11:47:54     at sql_prepare.cc:3401
# 11:47:54 #12 0x0000000000741fed in mysql_sql_stmt_execute (thd=0x7fe4702b1088) at sql_prepare.cc:2574
# 11:47:54 #13 0x0000000000684105 in mysql_execute_command (thd=0x7fe4702b1088) at sql_parse.cc:2166
# 11:47:54 #14 0x000000000068c5f9 in mysql_parse (thd=0x7fe4702b1088, inBuf=0x3b9cff0 "EXECUTE st1", length=11, found_semicolon=0x7fe47781bf00) at sql_parse.cc:5975
# 11:47:54 #15 0x000000000068d244 in dispatch_command (command=COM_QUERY, thd=0x7fe4702b1088, packet=0x7fe4702bbbf9 " EXECUTE st1 ", packet_length=13)
# 11:47:54     at sql_parse.cc:1076
# 11:47:54 #16 0x000000000068e793 in do_command (thd=0x7fe4702b1088) at sql_parse.cc:758
# 11:47:54 #17 0x000000000067bbeb in handle_one_connection (arg=0x7fe4702b1088) at sql_connect.cc:1164
# 11:47:54 #18 0x000000315b0073da in start_thread () from /lib64/libpthread.so.0
# 11:47:54 #19 0x000000315a4e627d in clone () from /lib64/libc.so.6

How to repeat:
If this is repeatable, a test case will be provided. In the meantime, the core and the binary will be uploaded.
[7 Dec 2009 10:40] Philip Stoev
core and binary:

http://mysql-systemqa.s3.amazonaws.com/var-bug49498.zip

source:

revision-id: alik@sun.com-20091204125107-ayyi25ov1fgoyc9q
date: 2009-12-04 15:51:07 +0300
build-date: 2009-12-07 12:21:25 +0200
revno: 3755
branch-nick: 6.0-codebase-bugfixing
[15 May 2010 9:03] Philip Stoev
Seen only once or twice. Setting to Verified in the hope that this can be fixed based on core file alone.
[19 May 2010 13:47] Jon Olav Hauglid
Unable to reproduce with mysql-trunk-runtime (5.5.5-m3). 
Closing as "Can't repeat".
Please reopen the bug if the assertion is seen again.