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

Assertion `thd_arg->in_multi_stmt_transaction_mode()' failed in Gtid_log_event::Gtid_log_event

    XMLWordPrintable

Details

    • Q2/2025 Development

    Description

      --source include/have_binlog_format_statement.inc
      --source include/have_innodb.inc
      CREATE TABLE t1 (c CHAR(1),c2 CHAR(1)) ENGINE=MyISAM;  
      CREATE TEMPORARY TABLE t (a INT) ENGINE=InnoDB SELECT+1 a;
      XA START 'a';
      INSERT t SELECT+1 seq_1_to_1;
      SET pseudo_slave_mode=1;
      INSERT INTO t1 (c) VALUES (1);
      XA END 'a';
      XA PREPARE 'a';
      

      Leads to:

      bb-12.1-MDEV-32830_xa CS 12.0.1 dd6f8d29c276ec86b32a1833e9fd1f20751d16f8 (Debug) Build 12/05/2025

      mariadbd: /test/bb-12.1-MDEV-32830_xa_dbg/sql/log_event_server.cc:2910: Gtid_log_event::Gtid_log_event(THD *, uint64, uint32, bool, uint16, bool, uint64, bool, bool): Assertion `thd_arg->in_multi_stmt_transaction_mode()' failed.
      

      bb-12.1-MDEV-32830_xa CS 12.0.1 dd6f8d29c276ec86b32a1833e9fd1f20751d16f8 (Debug) Build 12/05/2025

      Core was generated by `/test/MDEV-32830_MD120525-mariadb-12.0.1-linux-x86_64-dbg/bin/mariadbd --defaul'.
      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 3809253)]
      (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  0x000070d9b3a4526e in __GI_raise (sig=sig@entry=6)at ../sysdeps/posix/raise.c:26
      #4  0x000070d9b3a288ff in __GI_abort () at ./stdlib/abort.c:79
      #5  0x000070d9b3a2881b in __assert_fail_base (fmt=0x70d9b3bd01e8 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0x5fcf1916353c "thd_arg->in_multi_stmt_transaction_mode()", file=file@entry=0x5fcf192f883f "/test/bb-12.1-MDEV-32830_xa_dbg/sql/log_event_server.cc", line=line@entry=2910, function=function@entry=0x5fcf1920c00b "Gtid_log_event::Gtid_log_event(THD *, uint64, uint32, bool, uint16, bool, uint64, bool, bool)")at ./assert/assert.c:94
      #6  0x000070d9b3a3b507 in __assert_fail (assertion=0x5fcf1916353c "thd_arg->in_multi_stmt_transaction_mode()", file=0x5fcf192f883f "/test/bb-12.1-MDEV-32830_xa_dbg/sql/log_event_server.cc", line=2910, function=0x5fcf1920c00b "Gtid_log_event::Gtid_log_event(THD *, uint64, uint32, bool, uint16, bool, uint64, bool, bool)") at ./assert/assert.c:103
      #7  0x00005fcf19b5a6f5 in Gtid_log_event::Gtid_log_event (this=0x70d9ac71a270, thd_arg=0x70d8b0000d58, seq_no_arg=4, domain_id_arg=0, standalone=false, flags_arg=8, is_transactional=true, commit_id_arg=0, has_xid=false, ro_1pc=false)at /test/bb-12.1-MDEV-32830_xa_dbg/sql/log_event_server.cc:2910
      #8  0x00005fcf199afaf5 in MYSQL_BIN_LOG::write_gtid_event (this=0x5fcf1afba8b8 <mysql_bin_log>, thd=0x70d8b0000d58, standalone=false, is_transactional=true, commit_id=0, commit_by_rotate=false, has_xid=false, is_ro_1pc=false) at /test/bb-12.1-MDEV-32830_xa_dbg/sql/log.cc:7136
      #9  0x00005fcf199b854c in MYSQL_BIN_LOG::write_transaction_or_stmt (this=0x5fcf1afba8b8 <mysql_bin_log>, entry=0x70d9ac71aaf8, commit_id=0, commit_by_rotate=false) at /test/bb-12.1-MDEV-32830_xa_dbg/sql/log.cc:9506
      #10 0x00005fcf199b6e5c in MYSQL_BIN_LOG::trx_group_commit_with_engines (this=0x5fcf1afba8b8 <mysql_bin_log>, leader=0x70d9ac71aaf8, tail=0x70d9ac71aaf8, commit_by_rotate=false)at /test/bb-12.1-MDEV-32830_xa_dbg/sql/log.cc:9207
      #11 0x00005fcf199b600b in MYSQL_BIN_LOG::trx_group_commit_leader (this=0x5fcf1afba8b8 <mysql_bin_log>, leader=0x70d9ac71aaf8)at /test/bb-12.1-MDEV-32830_xa_dbg/sql/log.cc:9151
      #12 0x00005fcf199b5a1b in MYSQL_BIN_LOG::write_transaction_with_group_commit (this=0x5fcf1afba8b8 <mysql_bin_log>, entry=0x70d9ac71aaf8)at /test/bb-12.1-MDEV-32830_xa_dbg/sql/log.cc:8985
      #13 0x00005fcf199c788e in MYSQL_BIN_LOG::write_transaction_to_binlog_events (this=0x5fcf1afba8b8 <mysql_bin_log>, entry=0x70d9ac71aaf8)at /test/bb-12.1-MDEV-32830_xa_dbg/sql/log.cc:8936
      #14 0x00005fcf199b46c2 in MYSQL_BIN_LOG::write_transaction_to_binlog (this=0x5fcf1afba8b8 <mysql_bin_log>, thd=0x70d8b0000d58, cache_mngr=0x70d8b0060c58, end_ev=0x70d9ac71ac50, all=true, using_stmt_cache=false, using_trx_cache=true, is_ro_1pc=false)at /test/bb-12.1-MDEV-32830_xa_dbg/sql/log.cc:8563
      #15 0x00005fcf199c1a50 in binlog_flush_cache (thd=0x70d8b0000d58, cache_mngr=0x70d8b0060c58, end_ev=0x70d9ac71ac50, all=true, using_stmt=false, using_trx=true, is_ro_1pc=false)at /test/bb-12.1-MDEV-32830_xa_dbg/sql/log.cc:1933
      #16 0x00005fcf199c17f3 in binlog_rollback_flush_trx_cache (thd=0x70d8b0000d58, all=true, cache_mngr=0x70d8b0060c58)at /test/bb-12.1-MDEV-32830_xa_dbg/sql/log.cc:2106
      #17 0x00005fcf199c11af in binlog_rollback (thd=0x70d8b0000d58, all=true)at /test/bb-12.1-MDEV-32830_xa_dbg/sql/log.cc:2521
      #18 0x00005fcf199cf18d in ha_rollback_trans (thd=0x70d8b0000d58, all=true)at /test/bb-12.1-MDEV-32830_xa_dbg/sql/handler.cc:2373
      #19 0x00005fcf1a1f608e in xa_trans_force_rollback (thd=0x70d8b0000d58)at /test/bb-12.1-MDEV-32830_xa_dbg/sql/xa.cc:477
      #20 0x00005fcf1a1f6f04 in slave_applier_reset_xa_trans (thd=0x70d8b0000d58)at /test/bb-12.1-MDEV-32830_xa_dbg/sql/xa.cc:1225
      #21 0x00005fcf1a1f6b27 in trans_xa_prepare (thd=0x70d8b0000d58)at /test/bb-12.1-MDEV-32830_xa_dbg/sql/xa.cc:692
      #22 0x00005fcf19e74241 in mysql_execute_command (thd=0x70d8b0000d58, is_called_from_prepared_stmt=false)at /test/bb-12.1-MDEV-32830_xa_dbg/sql/sql_parse.cc:5722
      #23 0x00005fcf19e63e34 in mysql_parse (thd=0x70d8b0000d58, rawbuf=0x70d8b0016c00 "XA PREPARE 'a'", length=14, parser_state=0x70d9ac71ca10)at /test/bb-12.1-MDEV-32830_xa_dbg/sql/sql_parse.cc:7891
      #24 0x00005fcf19e61208 in dispatch_command (command=COM_QUERY, thd=0x70d8b0000d58, packet=0x70d8b01c9489 "XA PREPARE 'a'", packet_length=14, blocking=true)at /test/bb-12.1-MDEV-32830_xa_dbg/sql/sql_parse.cc:1877
      #25 0x00005fcf19e649e3 in do_command (thd=0x70d8b0000d58, blocking=true)at /test/bb-12.1-MDEV-32830_xa_dbg/sql/sql_parse.cc:1416
      #26 0x00005fcf1a0819e9 in do_handle_one_connection (connect=0x5fcf1ca61628, put_in_cache=true)at /test/bb-12.1-MDEV-32830_xa_dbg/sql/sql_connect.cc:1414
      #27 0x00005fcf1a08178e in handle_one_connection (arg=0x5fcf1ca4dd78)at /test/bb-12.1-MDEV-32830_xa_dbg/sql/sql_connect.cc:1326
      #28 0x000070d9b3a9ca94 in start_thread (arg=<optimized out>)at ./nptl/pthread_create.c:447
      #29 0x000070d9b3b29c3c in clone3 ()at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:78
      

      Attachments

        Issue Links

          Activity

            People

              Elkin Andrei Elkin
              Roel 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.