Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-37929

Assertion !thd->rgi_slave' failed on REPAIR TABLE on replica

    XMLWordPrintable

Details

    • Not for Release Notes
    • Q4/2025 Server Development, Q1/2026 Server Maintenance

    Description

      --source include/have_binlog_format_mixed.inc
      --source include/master-slave.inc
      CREATE GLOBAL TEMPORARY TABLE t (x INT);
      LOCK TABLES t READ;
      REPAIR TABLE t;
      DROP TABLE t;  # Cleanup
      --source include/rpl_end.inc
      

      Leads to:

      MDEV-35915-8 CS 12.2.0 c7ea08421d34fa7d45e27919a869ade968bd88c4 (Debug, Clang 21.1.3-20250923) Build 20/10/2025

      mariadbd: /test/bb-12.2-nikita-global-tmp_dbg/sql/sql_table.cc:6244: my_bool open_global_temporary_table(THD *, TABLE_SHARE *, TABLE_LIST *, MDL_ticket *): Assertion `!thd->rgi_slave' failed.
      

      MDEV-35915-8 CS 12.2.0 c7ea08421d34fa7d45e27919a869ade968bd88c4 (Debug, Clang 21.1.3-20250923) Build 20/10/2025

      Core was generated by `/test/MDEV-35915_8_MD201025-mariadb-12.2.0-linux-x86_64-dbg/bin/mariadbd --defa'.
      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 1383508)]
      (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  0x000071f746c4526e in __GI_raise (sig=sig@entry=6)at ../sysdeps/posix/raise.c:26
      #4  0x000071f746c288ff in __GI_abort () at ./stdlib/abort.c:79
      #5  0x000071f746c2881b in __assert_fail_base (fmt=0x71f746dd01e8 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0x6004c3689b1e "!thd->rgi_slave", file=file@entry=0x6004c35c2e7a "/test/bb-12.2-nikita-global-tmp_dbg/sql/sql_table.cc", line=line@entry=6244, function=function@entry=0x6004c3651763 "my_bool open_global_temporary_table(THD *, TABLE_SHARE *, TABLE_LIST *, MDL_ticket *)") at ./assert/assert.c:94
      #6  0x000071f746c3b507 in __assert_fail (assertion=0x6004c3689b1e "!thd->rgi_slave", file=0x6004c35c2e7a "/test/bb-12.2-nikita-global-tmp_dbg/sql/sql_table.cc", line=6244, function=0x6004c3651763 "my_bool open_global_temporary_table(THD *, TABLE_SHARE *, TABLE_LIST *, MDL_ticket *)") at ./assert/assert.c:103
      #7  0x00006004c43afd1b in open_global_temporary_table (thd=0x71f63c001b18, source=0x71f63c051d50, out_table=0x71f63c00fd50, mdl_ticket=0x71f63c01c4c0)at /test/bb-12.2-nikita-global-tmp_dbg/sql/sql_table.cc:6244
      #8  0x00006004c412b269 in open_table (thd=0x71f63c001b18, table_list=0x71f63c00fd50, ot_ctx=0x71f7443195d8)at /test/bb-12.2-nikita-global-tmp_dbg/sql/sql_base.cc:2351
      #9  0x00006004c41302d1 in open_and_process_table (thd=0x71f63c001b18, tables=0x71f63c00fd50, counter=0x71f74431968c, flags=0, prelocking_strategy=0x71f7443196f0, has_prelocking_list=false, ot_ctx=0x71f7443195d8)at /test/bb-12.2-nikita-global-tmp_dbg/sql/sql_base.cc:4308
      #10 0x00006004c412f11b in open_tables (thd=0x71f63c001b18, options=@0x71f63c0074f4: {m_options = DDL_options_st::OPT_NONE}, start=0x71f7443196a0, counter=0x71f74431968c, flags=0, prelocking_strategy=0x71f7443196f0)at /test/bb-12.2-nikita-global-tmp_dbg/sql/sql_base.cc:4791
      #11 0x00006004c4131eca in open_and_lock_tables (thd=0x71f63c001b18, options=@0x71f63c0074f4: {m_options = DDL_options_st::OPT_NONE}, tables=0x71f63c00fd50, derived=true, flags=0, prelocking_strategy=0x71f7443196f0)at /test/bb-12.2-nikita-global-tmp_dbg/sql/sql_base.cc:5779
      #12 0x00006004c3fb453e in open_and_lock_tables (thd=0x71f63c001b18, tables=0x71f63c00fd50, derived=true, flags=0)at /test/bb-12.2-nikita-global-tmp_dbg/sql/sql_base.h:544
      #13 0x00006004c44943ed in open_only_one_table (thd=0x71f63c001b18, table=0x71f63c00fd50, repair_table_use_frm=false, is_view_operator_func=true)at /test/bb-12.2-nikita-global-tmp_dbg/sql/sql_admin.cc:436
      #14 0x00006004c448f934 in mysql_admin_table (thd=0x71f63c001b18, tables=0x71f63c00fd50, check_opt=0x71f63c007290, operator_name=0x6004c502dfb8 <msg_repair>, lock_type=TL_WRITE, org_open_for_modify=true, no_errors_from_open=false, extra_open_options=32, prepare_func=0x6004c4493620 <prepare_for_repair(THD*, TABLE_LIST*, st_ha_check_opt*)>, operator_func=(int (handler::*)(class handler * const, class THD *, HA_CHECK_OPT *)) 0x6004c3e4b2b0 <handler::ha_repair(THD*, st_ha_check_opt*)>, view_operator_func=0x6004c44006a0 <view_repair(THD*, TABLE_LIST*, st_ha_check_opt*)>, is_cmd_replicated=true)at /test/bb-12.2-nikita-global-tmp_dbg/sql/sql_admin.cc:653
      #15 0x00006004c44935e0 in Sql_cmd_repair_table::execute (this=0x71f63c010488, thd=0x71f63c001b18)at /test/bb-12.2-nikita-global-tmp_dbg/sql/sql_admin.cc:1738
      #16 0x00006004c42932ae in mysql_execute_command (thd=0x71f63c001b18, is_called_from_prepared_stmt=false)at /test/bb-12.2-nikita-global-tmp_dbg/sql/sql_parse.cc:5862
      #17 0x00006004c4284538 in mysql_parse (thd=0x71f63c001b18, rawbuf=0x71f63c038003 "REPAIR TABLE t", length=14, parser_state=0x71f74431c760)at /test/bb-12.2-nikita-global-tmp_dbg/sql/sql_parse.cc:7895
      #18 0x00006004c3f9d709 in Query_log_event::do_apply_event (this=0x71f63c034b98, rgi=0x71f63c000cf0, query_arg=0x71f63c038003 "REPAIR TABLE t", q_len_arg=14)at /test/bb-12.2-nikita-global-tmp_dbg/sql/log_event_server.cc:2090
      #19 0x00006004c3f9c727 in Query_log_event::do_apply_event (this=0x71f63c034b98, rgi=0x71f63c000cf0)at /test/bb-12.2-nikita-global-tmp_dbg/sql/log_event_server.cc:1515
      #20 0x00006004c3fc26a2 in Log_event::apply_event (this=0x71f63c034b98, rgi=0x71f63c000cf0)at /test/bb-12.2-nikita-global-tmp_dbg/sql/log_event.cc:3984
      #21 0x00006004c40ab59b in apply_event_and_update_pos_apply (ev=0x71f63c034b98, thd=0x71f63c001b18, rgi=0x71f63c000cf0, reason=0)at /test/bb-12.2-nikita-global-tmp_dbg/sql/slave.cc:3615
      #22 0x00006004c40ab3cc in apply_event_and_update_pos (ev=0x71f63c034b98, thd=0x71f63c001b18, rgi=0x71f63c000cf0)at /test/bb-12.2-nikita-global-tmp_dbg/sql/slave.cc:3791
      #23 0x00006004c40b44e6 in exec_relay_log_event (thd=0x71f63c001b18, rli=0x6004c6834f40, serial_rgi=0x71f63c000cf0)at /test/bb-12.2-nikita-global-tmp_dbg/sql/slave.cc:4233
      #24 0x00006004c40a7357 in handle_slave_sql (arg=0x6004c6832e70)at /test/bb-12.2-nikita-global-tmp_dbg/sql/slave.cc:5465
      #25 0x000071f746c9ca94 in start_thread (arg=<optimized out>)at ./nptl/pthread_create.c:447
      #26 0x000071f746d29c3c in clone3 ()at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:78
      

      Attachments

        Issue Links

          Activity

            People

              Roel Roel Van de Paar
              Roel Roel Van de Paar
              Nikita Malyavin Nikita Malyavin
              Michael Widenius Michael Widenius
              Roel Van de Paar Roel Van de Paar
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.