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

thd::transaction::modified_non_trans_tables isn't set before Rows_log_event caching

    XMLWordPrintable

Details

    Description

      # mysqld options required for replay: --log-bin
      SET GLOBAL max_binlog_stmt_cache_size=0;
      CREATE TEMPORARY TABLE t (c INT) ENGINE=InnoDB;
      SELECT @@GLOBAL.innodb_flush_method=variable_value FROM information_schema.global_variables;
      DELETE FROM mysql.proc;
      

      Leads to:

      10.6.0 a3e3225cd3b816d47621e749e21a71b6a864a96a (Debug)

      mysqld: /test/10.6_dbg/sql/log.cc:7424: int MYSQL_BIN_LOG::write_cache(THD*, IO_CACHE*): Assertion `!writer.checksum_len || writer.remains == 0' failed.
      

      10.6.0 a3e3225cd3b816d47621e749e21a71b6a864a96a (Debug)

      Core was generated by `/test/MD150421-mariadb-10.6.0-linux-x86_64-dbg/bin/mysqld --no-defaults --core-'.
      Program terminated with signal SIGABRT, Aborted.
      #0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
      [Current thread is 1 (Thread 0x14c2a4c73700 (LWP 3661648))]
      (gdb) bt
      #0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
      #1  0x000014c2bab53859 in __GI_abort () at abort.c:79
      #2  0x000014c2bab53729 in __assert_fail_base (fmt=0x14c2bace9588 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x55c5bde51990 "!writer.checksum_len || writer.remains == 0", file=0x55c5bde4f364 "/test/10.6_dbg/sql/log.cc", line=7424, function=<optimized out>) at assert.c:92
      #3  0x000014c2bab64f36 in __GI___assert_fail (assertion=assertion@entry=0x55c5bde51990 "!writer.checksum_len || writer.remains == 0", file=file@entry=0x55c5bde4f364 "/test/10.6_dbg/sql/log.cc", line=line@entry=7424, function=function@entry=0x55c5bde518a8 "int MYSQL_BIN_LOG::write_cache(THD*, IO_CACHE*)") at assert.c:101
      #4  0x000055c5bd4331ad in MYSQL_BIN_LOG::write_cache (this=this@entry=0x55c5be6135c0 <mysql_bin_log>, thd=<optimized out>, cache=cache@entry=0x14c26c2260f8) at /test/10.6_dbg/sql/log.cc:7424
      #5  0x000055c5bd433d31 in MYSQL_BIN_LOG::write_transaction_or_stmt (this=this@entry=0x55c5be6135c0 <mysql_bin_log>, entry=entry@entry=0x14c2a4c71a20, commit_id=commit_id@entry=0) at /test/10.6_dbg/sql/log.cc:562
      #6  0x000055c5bd440d43 in MYSQL_BIN_LOG::trx_group_commit_leader (this=this@entry=0x55c5be6135c0 <mysql_bin_log>, leader=leader@entry=0x14c2a4c71a20) at /test/10.6_dbg/sql/log.cc:8251
      #7  0x000055c5bd4423a4 in MYSQL_BIN_LOG::write_transaction_to_binlog_events (this=this@entry=0x55c5be6135c0 <mysql_bin_log>, entry=entry@entry=0x14c2a4c71a20) at /test/10.6_dbg/sql/log.cc:8045
      #8  0x000055c5bd442944 in MYSQL_BIN_LOG::write_transaction_to_binlog (this=this@entry=0x55c5be6135c0 <mysql_bin_log>, thd=thd@entry=0x14c26c000db8, cache_mngr=cache_mngr@entry=0x14c26c2260f8, end_ev=end_ev@entry=0x14c2a4c71bd0, all=all@entry=false, using_stmt_cache=using_stmt_cache@entry=true, using_trx_cache=false) at /test/10.6_dbg/sql/log.cc:7642
      #9  0x000055c5bd442c14 in binlog_flush_cache (thd=thd@entry=0x14c26c000db8, cache_mngr=cache_mngr@entry=0x14c26c2260f8, end_ev=end_ev@entry=0x14c2a4c71bd0, all=all@entry=false, using_stmt=using_stmt@entry=true, using_trx=using_trx@entry=false) at /test/10.6_dbg/sql/log.cc:1797
      #10 0x000055c5bd443c6d in binlog_commit_flush_stmt_cache (thd=0x14c26c000db8, all=<optimized out>, cache_mngr=0x14c26c2260f8) at /test/10.6_dbg/sql/log.cc:1849
      #11 0x000055c5bd4441ac in binlog_rollback (hton=<optimized out>, thd=0x14c26c000db8, all=<optimized out>) at /test/10.6_dbg/sql/log.cc:2253
      #12 0x000055c5bd2d78a5 in ha_rollback_trans (thd=thd@entry=0x14c26c000db8, all=all@entry=false) at /test/10.6_dbg/sql/handler.cc:2054
      #13 0x000055c5bd17e74a in trans_rollback_stmt (thd=thd@entry=0x14c26c000db8) at /test/10.6_dbg/sql/transaction.cc:535
      #14 0x000055c5bd017042 in mysql_execute_command (thd=thd@entry=0x14c26c000db8) at /test/10.6_dbg/sql/sql_parse.cc:6039
      #15 0x000055c5bcffca06 in mysql_parse (thd=thd@entry=0x14c26c000db8, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x14c2a4c72410) at /test/10.6_dbg/sql/sql_parse.cc:8017
      #16 0x000055c5bd00b7df in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x14c26c000db8, packet=packet@entry=0x14c26c00b489 "DELETE FROM mysql.proc", packet_length=packet_length@entry=22, blocking=blocking@entry=true) at /test/10.6_dbg/sql/sql_class.h:1331
      #17 0x000055c5bd00ebd5 in do_command (thd=0x14c26c000db8, blocking=blocking@entry=true) at /test/10.6_dbg/sql/sql_parse.cc:1406
      #18 0x000055c5bd16877c in do_handle_one_connection (connect=<optimized out>, connect@entry=0x55c5c12aea48, put_in_cache=put_in_cache@entry=true) at /test/10.6_dbg/sql/sql_connect.cc:1410
      #19 0x000055c5bd168d81 in handle_one_connection (arg=arg@entry=0x55c5c12aea48) at /test/10.6_dbg/sql/sql_connect.cc:1312
      #20 0x000055c5bd616a03 in pfs_spawn_thread (arg=0x55c5c11df348) at /test/10.6_dbg/storage/perfschema/pfs.cc:2201
      #21 0x000014c2bb061609 in start_thread (arg=<optimized out>) at pthread_create.c:477
      #22 0x000014c2bac50293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      Bug confirmed present in:
      10.6.0 (dbg)

      Bug (or feature/syntax) confirmed not present in:
      MariaDB: 10.2.38 (dbg), 10.2.38 (opt), 10.3.29 (dbg), 10.3.29 (opt), 10.4.19 (dbg), 10.4.19 (opt), 10.5.10 (dbg), 10.5.10 (opt), 10.6.0 (opt)

      On optimized:

      10.6.0 a3e3225cd3b816d47621e749e21a71b6a864a96a (Optimized)

      10.6.0-opt>DELETE FROM mysql.proc;
      ERROR 1705 (HY000): Multi-row statements required more than 'max_binlog_stmt_cache_size' bytes of storage.
      

      Attachments

        Issue Links

          Activity

            People

              Elkin Andrei Elkin
              Roel Roel Van de Paar
              Votes:
              0 Vote for this issue
              Watchers:
              7 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.