Description:
When executing a workload containing transactional LOCK TABLE against the next-mr-wl3561 tree, mysqld asserted as follows:
mysqld: sql_error.cc:425: void Diagnostics_area::set_error_status(THD*, uint, const char*, const char*): Assertion `! is_set() || can_overwrite_status' failed.
# 18:07:32 #6 0x000000315a42bec9 in __assert_fail () from /lib64/libc.so.6
# 18:07:32 #7 0x00000000006ee054 in Diagnostics_area::set_error_status (this=0x7f8f50083ca8, thd=0x7f8f50081568, sql_errno_arg=1615,
# 18:07:32 message_arg=0x206db41 "Prepared statement needs to be re-prepared", sqlstate=0xb2459b "HY000") at sql_error.cc:425
# 18:07:32 #8 0x00000000006e5fde in Reprepare_observer::report_error (this=0x7f8f5702e2c3, thd=0x7f8f50081568) at sql_prepare.cc:2884
# 18:07:32 #9 0x000000000068fa66 in check_and_update_table_version (thd=0x7f8f50081568, tables=0x2c0fdd8, table_share=0x2bbef88) at sql_base.cc:3832
# 18:07:32 #10 0x0000000000697a39 in open_tables (thd=0x7f8f50081568, start=0x7f8f5702cbb0, counter=0x7f8f5702cbe4, flags=0) at sql_base.cc:4751
# 18:07:32 #11 0x0000000000697f2e in open_and_lock_tables_derived (thd=0x7f8f50081568, tables=0x2c27140, derived=true) at sql_base.cc:5031
# 18:07:32 #12 0x000000000064d17d in open_and_lock_tables (thd=0x7f8f50081568, tables=0x2c27140) at mysql_priv.h:1564
# 18:07:32 #13 0x000000000063f4e5 in execute_sqlcom_select (thd=0x7f8f50081568, all_tables=0x2c27140) at sql_parse.cc:4994
# 18:07:32 #14 0x0000000000641276 in mysql_execute_command (thd=0x7f8f50081568) at sql_parse.cc:2123
# 18:07:32 #15 0x00000000006e776e in Prepared_statement::execute (this=0x2c40008, expanded_query=0x7f8f5702e310, open_cursor=false) at sql_prepare.cc:3750
# 18:07:32 #16 0x00000000006eb691 in Prepared_statement::execute_loop (this=0x2c40008, expanded_query=0x7f8f5702e310, open_cursor=false, packet=0x0, packet_end=0x0)
# 18:07:32 at sql_prepare.cc:3383
# 18:07:32 #17 0x00000000006eb90d in mysql_sql_stmt_execute (thd=0x7f8f50081568) at sql_prepare.cc:2573
# 18:07:32 #18 0x00000000006412a1 in mysql_execute_command (thd=0x7f8f50081568) at sql_parse.cc:2133
# 18:07:32 #19 0x000000000064a299 in mysql_parse (thd=0x7f8f50081568, inBuf=0x2c50e08 "EXECUTE st1", length=11, found_semicolon=0x7f8f5702ff10) at sql_parse.cc:6045
# 18:07:32 #20 0x000000000064aefb in dispatch_command (command=COM_QUERY, thd=0x7f8f50081568, packet=0x7f8f500d9289 " EXECUTE st1 ", packet_length=13)
# 18:07:32 at sql_parse.cc:1128
# 18:07:32 #21 0x000000000064c2fd in do_command (thd=0x7f8f50081568) at sql_parse.cc:798
# 18:07:32 #22 0x00000000006391c0 in handle_one_connection (arg=0x7f8f50081568) at sql_connect.cc:1163
# 18:07:32 #23 0x000000315b0073da in start_thread () from /lib64/libpthread.so.0
# 18:07:32 #24 0x000000315a4e627d in clone () from /lib64/libc.so.6
This assertion has not been observed previously on that workload, and with this backtrace. The disk was not full at the time of the crash.
How to repeat:
This was found using the workload from bug #49960 . The core and the binary will be uploaded shortly.