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

ignored error at binlogging by CREATE-TABLE-SELECT leads to assert

Details

    Description

      Somewhat similar to MDEV-25488, but max_binlog_stmt_cache_size is not modified and instead we have max_allowed_packet and max_tmp_session_space_usage play a role, and versions differ (looks to be a 11.6 regression).

      # mysqld options required for replay: --log-bin
      SET max_tmp_session_space_usage=64*1024;
      SET default_storage_engine=MyISAM;
      SET autocommit=0;
      CREATE TABLE t SELECT 2 AS a,CONCAT (REPEAT (1,@@max_allowed_packet/10),1) AS b;
      

      Leads to:

      CS 11.7.0 4016c905cbabea7f29ed282dc2125254c7c0d419 (Debug)

      mariadbd: /test/11.7_dbg/sql/log.cc:9221: int MYSQL_BIN_LOG::write_transaction_or_stmt(group_commit_entry*, uint64): Assertion `!(entry->using_trx_cache && !mngr->trx_cache.empty() && mngr->get_binlog_cache_log((1))->error)' failed.
      

      CS 11.7.0 4016c905cbabea7f29ed282dc2125254c7c0d419 (Debug)

      Core was generated by `/test/MD141024-mariadb-11.7.0-linux-x86_64-dbg/bin/mariadbd --no-defaults --max'.
      Program terminated with signal SIGABRT, Aborted.
      Download failed: Invalid argument.  Continuing without source file ./nptl/./nptl/pthread_kill.c.
      #0  __pthread_kill_implementation (no_tid=0, signo=6, threadid=<optimized out>)at ./nptl/pthread_kill.c:44
       
      [Current thread is 1 (LWP 4028841)]
      (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  0x000014982d24526e in __GI_raise (sig=sig@entry=6)at ../sysdeps/posix/raise.c:26
      #4  0x000014982d2288ff in __GI_abort () at ./stdlib/abort.c:79
      #5  0x000014982d22881b in __assert_fail_base (fmt=0x14982d3d01e8 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0x55af13dced80 "!(entry->using_trx_cache && !mngr->trx_cache.empty() && mngr->get_binlog_cache_log((1))->error)", file=file@entry=0x55af13f2b444 "/test/11.7_dbg/sql/log.cc", line=line@entry=9221, function=function@entry=0x55af13dced30 "int MYSQL_BIN_LOG::write_transaction_or_stmt(group_commit_entry*, uint64)") at ./assert/assert.c:94
      #6  0x000014982d23b507 in __assert_fail (assertion=0x55af13dced80 "!(entry->using_trx_cache && !mngr->trx_cache.empty() && mngr->get_binlog_cache_log((1))->error)", file=0x55af13f2b444 "/test/11.7_dbg/sql/log.cc", line=9221, function=0x55af13dced30 "int MYSQL_BIN_LOG::write_transaction_or_stmt(group_commit_entry*, uint64)") at ./assert/assert.c:103
      #7  0x000055af1347b7ef in MYSQL_BIN_LOG::write_transaction_or_stmt (this=this@entry=0x55af1489afa0 <mysql_bin_log>, entry=entry@entry=0x14982c0d2970, commit_id=commit_id@entry=0)at /test/11.7_dbg/sql/log.cc:9221
      #8  0x000055af13488081 in MYSQL_BIN_LOG::trx_group_commit_leader (this=this@entry=0x55af1489afa0 <mysql_bin_log>, leader=leader@entry=0x14982c0d2970) at /test/11.7_dbg/sql/log.cc:8953
      #9  0x000055af1348b918 in MYSQL_BIN_LOG::write_transaction_to_binlog_events (this=this@entry=0x55af1489afa0 <mysql_bin_log>, entry=entry@entry=0x14982c0d2970) at /test/11.7_dbg/sql/log.cc:8745
      #10 0x000055af1348bf53 in MYSQL_BIN_LOG::write_transaction_to_binlog (this=this@entry=0x55af1489afa0 <mysql_bin_log>, thd=thd@entry=0x1497dc000d58, cache_mngr=cache_mngr@entry=0x1497dc01a0c8, end_ev=end_ev@entry=0x14982c0d2af0, all=all@entry=true, using_stmt_cache=using_stmt_cache@entry=false, using_trx_cache=true, is_ro_1pc=true) at /test/11.7_dbg/sql/log.cc:8337
      #11 0x000055af1348c11a in binlog_flush_cache (thd=thd@entry=0x1497dc000d58, cache_mngr=cache_mngr@entry=0x1497dc01a0c8, end_ev=end_ev@entry=0x14982c0d2af0, all=all@entry=true, using_stmt=using_stmt@entry=false, using_trx=using_trx@entry=true, is_ro_1pc=true) at /test/11.7_dbg/sql/log.cc:1755
      #12 0x000055af1348da13 in binlog_commit_flush_trx_cache (thd=thd@entry=0x1497dc000d58, all=all@entry=true, cache_mngr=cache_mngr@entry=0x1497dc01a0c8, ro_1pc=ro_1pc@entry=true)at /test/11.7_dbg/sql/log.cc:1854
      #13 0x000055af1348dcdd in binlog_commit (thd=thd@entry=0x1497dc000d58, all=all@entry=true, ro_1pc=true) at /test/11.7_dbg/sql/log.cc:2220
      #14 0x000055af13323eb7 in commit_one_phase_2 (thd=thd@entry=0x1497dc000d58, all=all@entry=true, trans=trans@entry=0x1497dc004898, is_real_trans=true)at /test/11.7_dbg/sql/handler.cc:2189
      #15 0x000055af133242cd in ha_commit_one_phase (thd=thd@entry=0x1497dc000d58, all=all@entry=true) at /test/11.7_dbg/sql/handler.cc:2150
      #16 0x000055af13325fa3 in ha_commit_trans (thd=thd@entry=0x1497dc000d58, all=all@entry=true) at /test/11.7_dbg/sql/handler.cc:1944
      #17 0x000055af1319a1b1 in trans_commit_implicit (thd=0x1497dc000d58)at /test/11.7_dbg/sql/transaction.cc:338
      #18 0x000055af12fbefc9 in select_create::send_eof (this=0x1497dc01ca40)at /test/11.7_dbg/sql/sql_insert.cc:5269
      #19 0x000055af130961f1 in JOIN::exec_inner (this=this@entry=0x1497dc01cb80)at /test/11.7_dbg/sql/sql_select.cc:4925
      #20 0x000055af13097056 in JOIN::exec (this=this@entry=0x1497dc01cb80)at /test/11.7_dbg/sql/sql_select.cc:4826
      #21 0x000055af13094e3b in mysql_select (thd=thd@entry=0x1497dc000d58, tables=0x0, fields=@0x1497dc01b748: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x1497dc01b9e8, last = 0x1497dc01bfe8, elements = 2}, <No data fields>}, conds=0x0, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2201188305408, result=0x1497dc01ca40, unit=0x1497dc005258, select_lex=0x1497dc01b490) at /test/11.7_dbg/sql/sql_select.cc:5359
      #22 0x000055af13095664 in handle_select (thd=thd@entry=0x1497dc000d58, lex=lex@entry=0x1497dc005178, result=result@entry=0x1497dc01ca40, setup_tables_done_option=setup_tables_done_option@entry=0)at /test/11.7_dbg/sql/sql_select.cc:642
      #23 0x000055af130fd731 in Sql_cmd_create_table_like::execute (this=<optimized out>, thd=0x1497dc000d58)at /test/11.7_dbg/sql/sql_table.cc:13198
      #24 0x000055af13004b5b in mysql_execute_command (thd=thd@entry=0x1497dc000d58, is_called_from_prepared_stmt=is_called_from_prepared_stmt@entry=false)at /test/11.7_dbg/sql/sql_parse.cc:5858
      #25 0x000055af13005d36 in mysql_parse (thd=thd@entry=0x1497dc000d58, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x14982c0d6260)at /test/11.7_dbg/sql/sql_parse.cc:7885
      #26 0x000055af130081ee in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x1497dc000d58, packet=packet@entry=0x1497dc00b3d9 "CREATE TABLE t SELECT 2 AS a,CONCAT (REPEAT (1,@@max_allowed_packet/10),1) AS b", packet_length=packet_length@entry=79, blocking=blocking@entry=true)at /test/11.7_dbg/sql/sql_class.h:257
      #27 0x000055af1300a552 in do_command (thd=0x1497dc000d58, blocking=blocking@entry=true) at /test/11.7_dbg/sql/sql_parse.cc:1405
      #28 0x000055af13183e5f in do_handle_one_connection (connect=<optimized out>, connect@entry=0x55af16813938, put_in_cache=put_in_cache@entry=true)at /test/11.7_dbg/sql/sql_connect.cc:1448
      #29 0x000055af13184173 in handle_one_connection (arg=arg@entry=0x55af16813938)at /test/11.7_dbg/sql/sql_connect.cc:1350
      #30 0x000055af135d9bcf in pfs_spawn_thread (arg=0x55af167e29f8)at /test/11.7_dbg/storage/perfschema/pfs.cc:2198
      #31 0x000014982d29ca94 in start_thread (arg=<optimized out>)at ./nptl/pthread_create.c:447
      #32 0x000014982d329c3c in clone3 ()at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:78
      

      Bug confirmed present in:
      MariaDB: 11.6.2 (dbg), 11.7.0 (dbg)

      Bug (or feature/syntax) confirmed not present in:
      MariaDB: 10.5.27 (dbg), 10.5.27 (opt), 10.6.20 (dbg), 10.6.20 (opt), 10.11.10 (dbg), 10.11.10 (opt), 11.2.6 (dbg), 11.2.6 (opt), 11.4.4 (dbg), 11.4.4 (opt), 11.6.2 (opt), 11.7.0 (opt)
      MySQL: 5.5.62 (dbg), 5.5.62 (opt), 5.6.51 (dbg), 5.6.51 (opt), 5.7.44 (dbg), 5.7.44 (opt), 8.0.36 (dbg), 8.0.36 (opt)

      Attachments

        Issue Links

          Activity

            Aria testcase:

            # mysqld options required for replay: --log_bin
            SET sql_mode='';
            SET max_tmp_session_space_usage=64*1024;
            SET LOCAL enforce_storage_engine=Aria;
            SET autocommit=0;
            CREATE TABLE t SELECT 2 AS a,CONCAT (REPEAT (1,@@max_allowed_packet/10),1) AS b;
            

            Oddly, the sql_mode blanking is required here. If we do not blank sql_mode in this testcase we get instead:

            CS 11.7.0 4016c905cbabea7f29ed282dc2125254c7c0d419 (Debug)

            11.7.0-dbg>CREATE TABLE t SELECT 2 AS a,CONCAT (REPEAT (1,@@max_allowed_packet/10),1) AS b;
            ERROR 1286 (42000): Unknown storage engine 'InnoDB'
            

            Roel Roel Van de Paar added a comment - Aria testcase: # mysqld options required for replay: --log_bin SET sql_mode= '' ; SET max_tmp_session_space_usage=64*1024; SET LOCAL enforce_storage_engine=Aria; SET autocommit=0; CREATE TABLE t SELECT 2 AS a,CONCAT (REPEAT (1,@@max_allowed_packet/10),1) AS b; Oddly, the sql_mode blanking is required here. If we do not blank sql_mode in this testcase we get instead: CS 11.7.0 4016c905cbabea7f29ed282dc2125254c7c0d419 (Debug) 11.7.0-dbg>CREATE TABLE t SELECT 2 AS a,CONCAT (REPEAT (1,@@max_allowed_packet/10),1) AS b; ERROR 1286 (42000): Unknown storage engine 'InnoDB'

            default_storage_engine=InnoDB does not fail:

            CS 11.7.0 4016c905cbabea7f29ed282dc2125254c7c0d419 (Debug)

            11.7.0-dbg>CREATE TABLE t SELECT 2 AS a,CONCAT (REPEAT (1,@@max_allowed_packet/10),1) AS b;
            ERROR 41 (HY000): Local temporary space limit reached
            

            default_storage_engine=MEMORY produces:

            CS 11.7.0 4016c905cbabea7f29ed282dc2125254c7c0d419 (Debug)

            11.7.0-dbg>CREATE TABLE t SELECT 2 AS a,CONCAT (REPEAT (1,@@max_allowed_packet/10),1) AS b;
            ERROR 1163 (42000): Storage engine MEMORY doesn't support BLOB/TEXT columns
            

            Roel Roel Van de Paar added a comment - default_storage_engine=InnoDB does not fail: CS 11.7.0 4016c905cbabea7f29ed282dc2125254c7c0d419 (Debug) 11.7.0-dbg>CREATE TABLE t SELECT 2 AS a,CONCAT (REPEAT (1,@@max_allowed_packet/10),1) AS b; ERROR 41 (HY000): Local temporary space limit reached default_storage_engine=MEMORY produces: CS 11.7.0 4016c905cbabea7f29ed282dc2125254c7c0d419 (Debug) 11.7.0-dbg>CREATE TABLE t SELECT 2 AS a,CONCAT (REPEAT (1,@@max_allowed_packet/10),1) AS b; ERROR 1163 (42000): Storage engine MEMORY doesn't support BLOB/TEXT columns

            Commit 11d7bd2ed3322279e14068bdf8a913626900f4ac / a build from 5 June 24 is bad, so it was introduced into 11.6 early on.

            Roel Roel Van de Paar added a comment - Commit 11d7bd2ed3322279e14068bdf8a913626900f4ac / a build from 5 June 24 is bad, so it was introduced into 11.6 early on.

            MTR Testcases:

            --source include/have_log_bin.inc
            SET max_tmp_session_space_usage=64*1024;
            SET default_storage_engine=MyISAM;
            SET autocommit=0;
            CREATE TABLE t SELECT 2 AS a,CONCAT (REPEAT (1,@@max_allowed_packet/10),1) AS b;
            

            --source include/have_log_bin.inc
            SET sql_mode='';
            SET max_tmp_session_space_usage=64*1024;
            SET LOCAL enforce_storage_engine=Aria;
            SET autocommit=0;
            CREATE TABLE t SELECT 2 AS a,CONCAT (REPEAT (1,@@max_allowed_packet/10),1) AS b;
            

            Roel Roel Van de Paar added a comment - MTR Testcases: --source include/have_log_bin.inc SET max_tmp_session_space_usage=64*1024; SET default_storage_engine=MyISAM; SET autocommit=0; CREATE TABLE t SELECT 2 AS a,CONCAT (REPEAT (1,@@max_allowed_packet/10),1) AS b; --source include/have_log_bin.inc SET sql_mode= '' ; SET max_tmp_session_space_usage=64*1024; SET LOCAL enforce_storage_engine=Aria; SET autocommit=0; CREATE TABLE t SELECT 2 AS a,CONCAT (REPEAT (1,@@max_allowed_packet/10),1) AS b;

            Kristian reviewed, reassigning to Andrei.

            bnestere Brandon Nesterenko added a comment - Kristian reviewed, reassigning to Andrei.
            Elkin Andrei Elkin added a comment -

            Howdy Brandon.

            I've just requested the 2nd review round from Kristian. The 2nd patch has expanded a bit to additionally (to review notes) cover two more things as the Pr explains in the Description.

            I suggest for you to wait until Kristian has finished the 2nd time.

            Cheers,
            Andrei

            Elkin Andrei Elkin added a comment - Howdy Brandon. I've just requested the 2nd review round from Kristian. The 2nd patch has expanded a bit to additionally (to review notes) cover two more things as the Pr explains in the Description. I suggest for you to wait until Kristian has finished the 2nd time. Cheers, Andrei
            Roel Roel Van de Paar added a comment - - edited

            Original t/c on 11.8 Leads to:

            CS 11.8.1 33e0796e7a154e02a5e53c55cefc5d6feb4f5e6d (Debug) Build 15/02/2025

            mariadbd: /test/11.8_dbg/sql/log.cc:9441: int MYSQL_BIN_LOG::write_transaction_or_stmt(group_commit_entry *, uint64, bool): Assertion `!(entry->using_trx_cache && !mngr->trx_cache.empty() && mngr->get_binlog_cache_log((1))->error)' failed.
            

            CS 11.8.1 33e0796e7a154e02a5e53c55cefc5d6feb4f5e6d (Debug) Build 15/02/2025

            Core was generated by `/test/MD150225-mariadb-11.8.1-linux-x86_64-dbg/bin/mariadbd --no-defaults --max'.
            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 1912124)]
            (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  0x000014db5364526e in __GI_raise (sig=sig@entry=6)at ../sysdeps/posix/raise.c:26
            #4  0x000014db536288ff in __GI_abort () at ./stdlib/abort.c:79
            #5  0x000014db5362881b in __assert_fail_base (fmt=0x14db537d01e8 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0x55d3c84c7225 "!(entry->using_trx_cache && !mngr->trx_cache.empty() && mngr->get_binlog_cache_log((1))->error)", file=file@entry=0x55d3c84c3f86 "/test/11.8_dbg/sql/log.cc", line=line@entry=9441, function=function@entry=0x55d3c84c7285 "int MYSQL_BIN_LOG::write_transaction_or_stmt(group_commit_entry *, uint64, bool)") at ./assert/assert.c:94
            #6  0x000014db5363b507 in __assert_fail (assertion=0x55d3c84c7225 "!(entry->using_trx_cache && !mngr->trx_cache.empty() && mngr->get_binlog_cache_log((1))->error)", file=0x55d3c84c3f86 "/test/11.8_dbg/sql/log.cc", line=9441, function=0x55d3c84c7285 "int MYSQL_BIN_LOG::write_transaction_or_stmt(group_commit_entry *, uint64, bool)") at ./assert/assert.c:103
            #7  0x000055d3c79c0632 in MYSQL_BIN_LOG::write_transaction_or_stmt (this=0x55d3c9004648 <mysql_bin_log>, entry=0x14db47f194b8, commit_id=0, commit_by_rotate=false) at /test/11.8_dbg/sql/log.cc:9440
            #8  0x000055d3c79bf1bc in MYSQL_BIN_LOG::trx_group_commit_with_engines (this=0x55d3c9004648 <mysql_bin_log>, leader=0x14db47f194b8, tail=0x14db47f194b8, commit_by_rotate=false)at /test/11.8_dbg/sql/log.cc:9173
            #9  0x000055d3c79be53b in MYSQL_BIN_LOG::trx_group_commit_leader (this=0x55d3c9004648 <mysql_bin_log>, leader=0x14db47f194b8)at /test/11.8_dbg/sql/log.cc:9117
            #10 0x000055d3c79bdf4b in MYSQL_BIN_LOG::write_transaction_with_group_commit (this=0x55d3c9004648 <mysql_bin_log>, entry=0x14db47f194b8)at /test/11.8_dbg/sql/log.cc:8951
            #11 0x000055d3c79cca4e in MYSQL_BIN_LOG::write_transaction_to_binlog_events (this=0x55d3c9004648 <mysql_bin_log>, entry=0x14db47f194b8)at /test/11.8_dbg/sql/log.cc:8902
            #12 0x000055d3c79bcb90 in MYSQL_BIN_LOG::write_transaction_to_binlog (this=0x55d3c9004648 <mysql_bin_log>, thd=0x14dae8000d58, cache_mngr=0x14dae8018e58, end_ev=0x14db47f19620, all=true, using_stmt_cache=false, using_trx_cache=true, is_ro_1pc=true)at /test/11.8_dbg/sql/log.cc:8524
            #13 0x000055d3c79c92b2 in binlog_flush_cache (thd=0x14dae8000d58, cache_mngr=0x14dae8018e58, end_ev=0x14db47f19620, all=true, using_stmt=false, using_trx=true, is_ro_1pc=true)at /test/11.8_dbg/sql/log.cc:1923
            #14 0x000055d3c79ab077 in binlog_commit_flush_trx_cache (thd=0x14dae8000d58, all=true, cache_mngr=0x14dae8018e58, ro_1pc=true)at /test/11.8_dbg/sql/log.cc:2022
            #15 0x000055d3c79a9edc in binlog_commit (thd=0x14dae8000d58, all=true, ro_1pc=true) at /test/11.8_dbg/sql/log.cc:2390
            #16 0x000055d3c7821cad in commit_one_phase_2 (thd=0x14dae8000d58, all=true, trans=0x14dae80048c0, is_real_trans=true)at /test/11.8_dbg/sql/handler.cc:2199
            #17 0x000055d3c782244c in ha_commit_one_phase (thd=0x14dae8000d58, all=true)at /test/11.8_dbg/sql/handler.cc:2160
            #18 0x000055d3c7820961 in ha_commit_trans (thd=0x14dae8000d58, all=true)at /test/11.8_dbg/sql/handler.cc:1954
            #19 0x000055d3c76035c9 in trans_commit_implicit (thd=0x14dae8000d58)at /test/11.8_dbg/sql/transaction.cc:337
            #20 0x000055d3c73b3e7e in select_create::send_eof (this=0x14dae801bc30)at /test/11.8_dbg/sql/sql_insert.cc:5317
            #21 0x000055d3c748d9b6 in JOIN::exec_inner (this=0x14dae801bd70)at /test/11.8_dbg/sql/sql_select.cc:4941
            #22 0x000055d3c748d0de in JOIN::exec (this=0x14dae801bd70)at /test/11.8_dbg/sql/sql_select.cc:4842
            #23 0x000055d3c746834d in mysql_select (thd=0x14dae8000d58, tables=0x0, fields=@0x14dae801a910: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x14dae801abb0, last = 0x14dae801b1c0, elements = 2}, <No data fields>}, conds=0x0, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2201188305408, result=0x14dae801bc30, unit=0x14dae8005080, select_lex=0x14dae801a658) at /test/11.8_dbg/sql/sql_select.cc:5375
            #24 0x000055d3c7467dd5 in handle_select (thd=0x14dae8000d58, lex=0x14dae8004fa0, result=0x14dae801bc30, setup_tables_done_option=0)at /test/11.8_dbg/sql/sql_select.cc:633
            #25 0x000055d3c753b031 in Sql_cmd_create_table_like::execute (this=0x14dae8019eb8, thd=0x14dae8000d58)at /test/11.8_dbg/sql/sql_table.cc:13538
            #26 0x000055d3c740d5bf in mysql_execute_command (thd=0x14dae8000d58, is_called_from_prepared_stmt=false) at /test/11.8_dbg/sql/sql_parse.cc:5886
            #27 0x000055d3c73fc7d4 in mysql_parse (thd=0x14dae8000d58, rawbuf=0x14dae8019dc0 "CREATE TABLE t SELECT 2 AS a,CONCAT (REPEAT (1,@@max_allowed_packet/10),1) AS b", length=79, parser_state=0x14db47f1ca20)at /test/11.8_dbg/sql/sql_parse.cc:7915
            #28 0x000055d3c73f9ba4 in dispatch_command (command=COM_QUERY, thd=0x14dae8000d58, packet=0x14dae800b139 "CREATE TABLE t SELECT 2 AS a,CONCAT (REPEAT (1,@@max_allowed_packet/10),1) AS b", packet_length=79, blocking=true)at /test/11.8_dbg/sql/sql_parse.cc:1902
            #29 0x000055d3c73fd383 in do_command (thd=0x14dae8000d58, blocking=true)at /test/11.8_dbg/sql/sql_parse.cc:1415
            #30 0x000055d3c75e6a19 in do_handle_one_connection (connect=0x55d3cc1b4328, put_in_cache=true) at /test/11.8_dbg/sql/sql_connect.cc:1415
            #31 0x000055d3c75e67be in handle_one_connection (arg=0x55d3cc1b42b8)at /test/11.8_dbg/sql/sql_connect.cc:1327
            #32 0x000014db5369ca94 in start_thread (arg=<optimized out>)at ./nptl/pthread_create.c:447
            #33 0x000014db53729c3c in clone3 ()at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:78
            

            Please note the MYSQL_BIN_LOG::trx_group_commit_with_engines vs MYSQL_BIN_LOG::trx_group_commit_leader difference

            Roel Roel Van de Paar added a comment - - edited Original t/c on 11.8 Leads to: CS 11.8.1 33e0796e7a154e02a5e53c55cefc5d6feb4f5e6d (Debug) Build 15/02/2025 mariadbd: /test/11.8_dbg/sql/log.cc:9441: int MYSQL_BIN_LOG::write_transaction_or_stmt(group_commit_entry *, uint64, bool): Assertion `!(entry->using_trx_cache && !mngr->trx_cache.empty() && mngr->get_binlog_cache_log((1))->error)' failed. CS 11.8.1 33e0796e7a154e02a5e53c55cefc5d6feb4f5e6d (Debug) Build 15/02/2025 Core was generated by `/test/MD150225-mariadb-11.8.1-linux-x86_64-dbg/bin/mariadbd --no-defaults --max'. 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 1912124)] (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 0x000014db5364526e in __GI_raise (sig=sig@entry=6)at ../sysdeps/posix/raise.c:26 #4 0x000014db536288ff in __GI_abort () at ./stdlib/abort.c:79 #5 0x000014db5362881b in __assert_fail_base (fmt=0x14db537d01e8 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0x55d3c84c7225 "!(entry->using_trx_cache && !mngr->trx_cache.empty() && mngr->get_binlog_cache_log((1))->error)", file=file@entry=0x55d3c84c3f86 "/test/11.8_dbg/sql/log.cc", line=line@entry=9441, function=function@entry=0x55d3c84c7285 "int MYSQL_BIN_LOG::write_transaction_or_stmt(group_commit_entry *, uint64, bool)") at ./assert/assert.c:94 #6 0x000014db5363b507 in __assert_fail (assertion=0x55d3c84c7225 "!(entry->using_trx_cache && !mngr->trx_cache.empty() && mngr->get_binlog_cache_log((1))->error)", file=0x55d3c84c3f86 "/test/11.8_dbg/sql/log.cc", line=9441, function=0x55d3c84c7285 "int MYSQL_BIN_LOG::write_transaction_or_stmt(group_commit_entry *, uint64, bool)") at ./assert/assert.c:103 #7 0x000055d3c79c0632 in MYSQL_BIN_LOG::write_transaction_or_stmt (this=0x55d3c9004648 <mysql_bin_log>, entry=0x14db47f194b8, commit_id=0, commit_by_rotate=false) at /test/11.8_dbg/sql/log.cc:9440 #8 0x000055d3c79bf1bc in MYSQL_BIN_LOG::trx_group_commit_with_engines (this=0x55d3c9004648 <mysql_bin_log>, leader=0x14db47f194b8, tail=0x14db47f194b8, commit_by_rotate=false)at /test/11.8_dbg/sql/log.cc:9173 #9 0x000055d3c79be53b in MYSQL_BIN_LOG::trx_group_commit_leader (this=0x55d3c9004648 <mysql_bin_log>, leader=0x14db47f194b8)at /test/11.8_dbg/sql/log.cc:9117 #10 0x000055d3c79bdf4b in MYSQL_BIN_LOG::write_transaction_with_group_commit (this=0x55d3c9004648 <mysql_bin_log>, entry=0x14db47f194b8)at /test/11.8_dbg/sql/log.cc:8951 #11 0x000055d3c79cca4e in MYSQL_BIN_LOG::write_transaction_to_binlog_events (this=0x55d3c9004648 <mysql_bin_log>, entry=0x14db47f194b8)at /test/11.8_dbg/sql/log.cc:8902 #12 0x000055d3c79bcb90 in MYSQL_BIN_LOG::write_transaction_to_binlog (this=0x55d3c9004648 <mysql_bin_log>, thd=0x14dae8000d58, cache_mngr=0x14dae8018e58, end_ev=0x14db47f19620, all=true, using_stmt_cache=false, using_trx_cache=true, is_ro_1pc=true)at /test/11.8_dbg/sql/log.cc:8524 #13 0x000055d3c79c92b2 in binlog_flush_cache (thd=0x14dae8000d58, cache_mngr=0x14dae8018e58, end_ev=0x14db47f19620, all=true, using_stmt=false, using_trx=true, is_ro_1pc=true)at /test/11.8_dbg/sql/log.cc:1923 #14 0x000055d3c79ab077 in binlog_commit_flush_trx_cache (thd=0x14dae8000d58, all=true, cache_mngr=0x14dae8018e58, ro_1pc=true)at /test/11.8_dbg/sql/log.cc:2022 #15 0x000055d3c79a9edc in binlog_commit (thd=0x14dae8000d58, all=true, ro_1pc=true) at /test/11.8_dbg/sql/log.cc:2390 #16 0x000055d3c7821cad in commit_one_phase_2 (thd=0x14dae8000d58, all=true, trans=0x14dae80048c0, is_real_trans=true)at /test/11.8_dbg/sql/handler.cc:2199 #17 0x000055d3c782244c in ha_commit_one_phase (thd=0x14dae8000d58, all=true)at /test/11.8_dbg/sql/handler.cc:2160 #18 0x000055d3c7820961 in ha_commit_trans (thd=0x14dae8000d58, all=true)at /test/11.8_dbg/sql/handler.cc:1954 #19 0x000055d3c76035c9 in trans_commit_implicit (thd=0x14dae8000d58)at /test/11.8_dbg/sql/transaction.cc:337 #20 0x000055d3c73b3e7e in select_create::send_eof (this=0x14dae801bc30)at /test/11.8_dbg/sql/sql_insert.cc:5317 #21 0x000055d3c748d9b6 in JOIN::exec_inner (this=0x14dae801bd70)at /test/11.8_dbg/sql/sql_select.cc:4941 #22 0x000055d3c748d0de in JOIN::exec (this=0x14dae801bd70)at /test/11.8_dbg/sql/sql_select.cc:4842 #23 0x000055d3c746834d in mysql_select (thd=0x14dae8000d58, tables=0x0, fields=@0x14dae801a910: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x14dae801abb0, last = 0x14dae801b1c0, elements = 2}, <No data fields>}, conds=0x0, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2201188305408, result=0x14dae801bc30, unit=0x14dae8005080, select_lex=0x14dae801a658) at /test/11.8_dbg/sql/sql_select.cc:5375 #24 0x000055d3c7467dd5 in handle_select (thd=0x14dae8000d58, lex=0x14dae8004fa0, result=0x14dae801bc30, setup_tables_done_option=0)at /test/11.8_dbg/sql/sql_select.cc:633 #25 0x000055d3c753b031 in Sql_cmd_create_table_like::execute (this=0x14dae8019eb8, thd=0x14dae8000d58)at /test/11.8_dbg/sql/sql_table.cc:13538 #26 0x000055d3c740d5bf in mysql_execute_command (thd=0x14dae8000d58, is_called_from_prepared_stmt=false) at /test/11.8_dbg/sql/sql_parse.cc:5886 #27 0x000055d3c73fc7d4 in mysql_parse (thd=0x14dae8000d58, rawbuf=0x14dae8019dc0 "CREATE TABLE t SELECT 2 AS a,CONCAT (REPEAT (1,@@max_allowed_packet/10),1) AS b", length=79, parser_state=0x14db47f1ca20)at /test/11.8_dbg/sql/sql_parse.cc:7915 #28 0x000055d3c73f9ba4 in dispatch_command (command=COM_QUERY, thd=0x14dae8000d58, packet=0x14dae800b139 "CREATE TABLE t SELECT 2 AS a,CONCAT (REPEAT (1,@@max_allowed_packet/10),1) AS b", packet_length=79, blocking=true)at /test/11.8_dbg/sql/sql_parse.cc:1902 #29 0x000055d3c73fd383 in do_command (thd=0x14dae8000d58, blocking=true)at /test/11.8_dbg/sql/sql_parse.cc:1415 #30 0x000055d3c75e6a19 in do_handle_one_connection (connect=0x55d3cc1b4328, put_in_cache=true) at /test/11.8_dbg/sql/sql_connect.cc:1415 #31 0x000055d3c75e67be in handle_one_connection (arg=0x55d3cc1b42b8)at /test/11.8_dbg/sql/sql_connect.cc:1327 #32 0x000014db5369ca94 in start_thread (arg=<optimized out>)at ./nptl/pthread_create.c:447 #33 0x000014db53729c3c in clone3 ()at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:78 Please note the MYSQL_BIN_LOG::trx_group_commit_with_engines vs MYSQL_BIN_LOG::trx_group_commit_leader difference

            People

              Elkin Andrei Elkin
              Roel Roel Van de Paar
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:

                Git Integration

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