Details
-
Bug
-
Status: Closed (View Workflow)
-
Critical
-
Resolution: Fixed
-
N/A
-
None
Description
Does not look related to MDEV-16539. Present only in preview-12.0-preview.
--source include/have_binlog_format_statement.inc
|
CREATE TEMPORARY TABLE t (c INT); |
REPAIR TABLE t; |
Leads to:
preview-12.0-preview CS 12.0.0 61c96785d1910976fd740aa0724105b16952786d (Debug) Build 29/03/2025 |
mariadbd: /test/preview-12.0-preview_dbg/sql/temporary_tables.cc:833: void THD::mark_tmp_table_as_free_for_reuse(TABLE *): Assertion `!mysql_bin_log.is_open()' failed.
|
preview-12.0-preview CS 12.0.0 61c96785d1910976fd740aa0724105b16952786d (Debug) Build 29/03/2025 |
Core was generated by `/test/P12_MD290325-mariadb-12.0.0-linux-x86_64-dbg/bin/mariadbd --defaults-grou'.
|
Program terminated with signal SIGABRT, Aborted.
|
#0 __pthread_kill_implementation (no_tid=0, signo=6, threadid=<optimized out>)at ./nptl/pthread_kill.c:44
|
|
[Current thread is 1 (LWP 391420)]
|
(gdb) bt
|
#0 __pthread_kill_implementation (no_tid=0, signo=6, threadid=<optimized out>)at ./nptl/pthread_kill.c:44
|
#1 __pthread_kill_internal (signo=6, threadid=<optimized out>)at ./nptl/pthread_kill.c:78
|
#2 __GI___pthread_kill (threadid=<optimized out>, signo=signo@entry=6)at ./nptl/pthread_kill.c:89
|
#3 0x00007d182ec4526e in __GI_raise (sig=sig@entry=6)at ../sysdeps/posix/raise.c:26
|
#4 0x00007d182ec288ff in __GI_abort () at ./stdlib/abort.c:79
|
#5 0x00007d182ec2881b in __assert_fail_base (fmt=0x7d182edd01e8 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0x618839317619 "!mysql_bin_log.is_open()", file=file@entry=0x61883931731b "/test/preview-12.0-preview_dbg/sql/temporary_tables.cc", line=line@entry=833, function=function@entry=0x6188393175e5 "void THD::mark_tmp_table_as_free_for_reuse(TABLE *)") at ./assert/assert.c:94
|
#6 0x00007d182ec3b507 in __assert_fail (assertion=0x618839317619 "!mysql_bin_log.is_open()", file=0x61883931731b "/test/preview-12.0-preview_dbg/sql/temporary_tables.cc", line=833, function=0x6188393175e5 "void THD::mark_tmp_table_as_free_for_reuse(TABLE *)") at ./assert/assert.c:103
|
#7 0x00006188385ae734 in THD::mark_tmp_table_as_free_for_reuse (this=0x7d17ec000d58, table=0x7d17ec093468)at /test/preview-12.0-preview_dbg/sql/temporary_tables.cc:833
|
#8 0x00006188385ae502 in THD::mark_tmp_tables_as_free_for_reuse (this=0x7d17ec000d58)at /test/preview-12.0-preview_dbg/sql/temporary_tables.cc:787
|
#9 0x00006188381ae15b in close_thread_tables (thd=0x7d17ec000d58)at /test/preview-12.0-preview_dbg/sql/sql_base.cc:942
|
#10 0x000061883847ec3d in mysql_admin_table (thd=0x7d17ec000d58, tables=0x7d17ec016d98, check_opt=0x7d17ec0064c8, operator_name=0x618839ac5b98 <msg_repair>, lock_type=TL_WRITE, org_open_for_modify=true, no_errors_from_open=false, extra_open_options=32, prepare_func=0x61883847f9f0 <prepare_for_repair(THD*, TABLE_LIST*, st_ha_check_opt*)>, operator_func=(int (handler::*)(class handler * const, class THD *, HA_CHECK_OPT *)) 0x6188386b65e0 <handler::ha_repair(THD*, st_ha_check_opt*)>, view_operator_func=0x6188383f87a0 <view_repair(THD*, TABLE_LIST*, st_ha_check_opt*)>, is_cmd_replicated=true)at /test/preview-12.0-preview_dbg/sql/sql_admin.cc:1471
|
#11 0x000061883847f9ab in Sql_cmd_repair_table::execute (this=0x7d17ec0174d0, thd=0x7d17ec000d58) at /test/preview-12.0-preview_dbg/sql/sql_admin.cc:1715
|
#12 0x00006188382887f2 in mysql_execute_command (thd=0x7d17ec000d58, is_called_from_prepared_stmt=false)at /test/preview-12.0-preview_dbg/sql/sql_parse.cc:5859
|
#13 0x0000618838277b54 in mysql_parse (thd=0x7d17ec000d58, rawbuf=0x7d17ec016ce0 "REPAIR TABLE t", length=14, parser_state=0x7d1828a17a10)at /test/preview-12.0-preview_dbg/sql/sql_parse.cc:7889
|
#14 0x0000618838274f28 in dispatch_command (command=COM_QUERY, thd=0x7d17ec000d58, packet=0x7d17ec1c87a9 "", packet_length=14, blocking=true) at /test/preview-12.0-preview_dbg/sql/sql_parse.cc:1875
|
#15 0x0000618838278703 in do_command (thd=0x7d17ec000d58, blocking=true)at /test/preview-12.0-preview_dbg/sql/sql_parse.cc:1416
|
#16 0x00006188384657e9 in do_handle_one_connection (connect=0x61883c4bd258, put_in_cache=true)at /test/preview-12.0-preview_dbg/sql/sql_connect.cc:1415
|
#17 0x000061883846558e in handle_one_connection (arg=0x61883c4b9178)at /test/preview-12.0-preview_dbg/sql/sql_connect.cc:1327
|
#18 0x00007d182ec9ca94 in start_thread (arg=<optimized out>)at ./nptl/pthread_create.c:447
|
#19 0x00007d182ed29c3c in clone3 ()at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:78
|
Attachments
Issue Links
- is caused by
-
MDEV-36099 Ensure that creation and usage of temporary tables in replication is predictable
-
- Closed
-
Please also test with InnoDB:
--source include/have_innodb.inc
--source include/have_binlog_format_statement.inc
Which produces a slightly different stack trace:
CS 12.0.0 61c96785d1910976fd740aa0724105b16952786d (Debug) Build 29/03/2025
mariadbd: /test/preview-12.0-preview_dbg/sql/temporary_tables.cc:833: void THD::mark_tmp_table_as_free_for_reuse(TABLE *): Assertion `!mysql_bin_log.is_open()' failed.
CS 12.0.0 61c96785d1910976fd740aa0724105b16952786d (Debug) Build 29/03/2025
Core was generated by `/test/P12_MD290325-mariadb-12.0.0-linux-x86_64-dbg/bin/mariadbd --defaults-grou'.
Program terminated with signal SIGABRT, Aborted.
#0 __pthread_kill_implementation (no_tid=0, signo=6, threadid=<optimized out>)at ./nptl/pthread_kill.c:44
[Current thread is 1 (LWP 888545)]
(gdb) bt
#0 __pthread_kill_implementation (no_tid=0, signo=6, threadid=<optimized out>)at ./nptl/pthread_kill.c:44
#1 __pthread_kill_internal (signo=6, threadid=<optimized out>)at ./nptl/pthread_kill.c:78
#2 __GI___pthread_kill (threadid=<optimized out>, signo=signo@entry=6)at ./nptl/pthread_kill.c:89
#3 0x00007f44a464526e in __GI_raise (sig=sig@entry=6)at ../sysdeps/posix/raise.c:26
#4 0x00007f44a46288ff in __GI_abort () at ./stdlib/abort.c:79
#5 0x00007f44a462881b in __assert_fail_base (fmt=0x7f44a47d01e8 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0x59d8b42a5619 "!mysql_bin_log.is_open()", file=file@entry=0x59d8b42a531b "/test/preview-12.0-preview_dbg/sql/temporary_tables.cc", line=line@entry=833, function=function@entry=0x59d8b42a55e5 "void THD::mark_tmp_table_as_free_for_reuse(TABLE *)") at ./assert/assert.c:94
#6 0x00007f44a463b507 in __assert_fail (assertion=0x59d8b42a5619 "!mysql_bin_log.is_open()", file=0x59d8b42a531b "/test/preview-12.0-preview_dbg/sql/temporary_tables.cc", line=833, function=0x59d8b42a55e5 "void THD::mark_tmp_table_as_free_for_reuse(TABLE *)") at ./assert/assert.c:103
#7 0x000059d8b353c734 in THD::mark_tmp_table_as_free_for_reuse (this=0x7f43c0000d58, table=0x7f43c0038508)at /test/preview-12.0-preview_dbg/sql/temporary_tables.cc:833
#8 0x000059d8b353c502 in THD::mark_tmp_tables_as_free_for_reuse (this=0x7f43c0000d58)at /test/preview-12.0-preview_dbg/sql/temporary_tables.cc:787
#9 0x000059d8b313c15b in close_thread_tables (thd=0x7f43c0000d58)at /test/preview-12.0-preview_dbg/sql/sql_base.cc:942
#10 0x000059d8b340ebe6 in admin_recreate_table (thd=0x7f43c0000d58, table_list=0x7f43c0016d98, recreate_info=0x7f449d7fbe30, table_copy=true)at /test/preview-12.0-preview_dbg/sql/sql_admin.cc:60
#11 0x000059d8b340b29e in mysql_admin_table (thd=0x7f43c0000d58, tables=0x7f43c0016d98, check_opt=0x7f43c00064c8, operator_name=0x59d8b4a53b98 <msg_repair>, lock_type=TL_WRITE, org_open_for_modify=true, no_errors_from_open=false, extra_open_options=32, prepare_func=0x59d8b340d9f0 <prepare_for_repair(THD*, TABLE_LIST*, st_ha_check_opt*)>, operator_func=(int (handler::*)(class handler * const, class THD *, HA_CHECK_OPT *)) 0x59d8b36445e0 <handler::ha_repair(THD*, st_ha_check_opt*)>, view_operator_func=0x59d8b33867a0 <view_repair(THD*, TABLE_LIST*, st_ha_check_opt*)>, is_cmd_replicated=true)at /test/preview-12.0-preview_dbg/sql/sql_admin.cc:1130
#12 0x000059d8b340d9ab in Sql_cmd_repair_table::execute (this=0x7f43c00174d0, thd=0x7f43c0000d58) at /test/preview-12.0-preview_dbg/sql/sql_admin.cc:1715
#13 0x000059d8b32167f2 in mysql_execute_command (thd=0x7f43c0000d58, is_called_from_prepared_stmt=false)at /test/preview-12.0-preview_dbg/sql/sql_parse.cc:5859
#14 0x000059d8b3205b54 in mysql_parse (thd=0x7f43c0000d58, rawbuf=0x7f43c0016ce0 "REPAIR TABLE t", length=14, parser_state=0x7f449d7fda10)at /test/preview-12.0-preview_dbg/sql/sql_parse.cc:7889
#15 0x000059d8b3202f28 in dispatch_command (command=COM_QUERY, thd=0x7f43c0000d58, packet=0x7f43c01c9539 "", packet_length=14, blocking=true) at /test/preview-12.0-preview_dbg/sql/sql_parse.cc:1875
#16 0x000059d8b3206703 in do_command (thd=0x7f43c0000d58, blocking=true)at /test/preview-12.0-preview_dbg/sql/sql_parse.cc:1416
#17 0x000059d8b33f37e9 in do_handle_one_connection (connect=0x59d8b75d36f8, put_in_cache=true)at /test/preview-12.0-preview_dbg/sql/sql_connect.cc:1415
#18 0x000059d8b33f358e in handle_one_connection (arg=0x59d8b75908f8)at /test/preview-12.0-preview_dbg/sql/sql_connect.cc:1327
#19 0x00007f44a469ca94 in start_thread (arg=<optimized out>)at ./nptl/pthread_create.c:447
#20 0x00007f44a4729c3c in clone3 ()at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:78