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

Assertion `!current_stmt_is_commit || !rgi->tables_to_lock' failed in Query_log_event::do_apply_event

    XMLWordPrintable

Details

    Description

      Note: There was a bug report with a similar assertion failure, MDEV-8203. But even thought it's not closed in JIRA, there had been commits for MDEV-8203 in main trees (and hence in change logs) fixing it, and indeed, it's not reproducible any longer with that particular scenario in 10.3+.

      --source include/have_innodb.inc
      --source include/have_binlog_format_mixed_or_row.inc
      --source include/master-slave.inc
       
      CREATE TABLE t1 (a INT) ENGINE=MyISAM;
      CREATE TABLE t2 (b INT);
      CREATE TABLE t3 (c INT) ENGINE=InnoDB;
      --delimiter $
      CREATE TRIGGER d AFTER UPDATE ON t1 FOR EACH ROW
      BEGIN
        UPDATE t2 SET b = 0 LIMIT 0;
        INSERT INTO t3 VALUES (NULL);
        CALL x();
      END $
      --delimiter ;
      INSERT INTO t1 VALUES (1);
      --error ER_SP_DOES_NOT_EXIST
      UPDATE t1 SET a = 0;
       
      --sync_slave_with_master
       
      # Cleanup
      --connection master
      DROP TABLE t1, t2, t3;
      --source include/rpl_end.inc
      

      10.4 a65d3b2c

      mysqld: /data/src/10.4/sql/log_event.cc:5479: int Query_log_event::do_apply_event(rpl_group_info*, const char*, uint32): Assertion `!current_stmt_is_commit || !rgi->tables_to_lock' failed.
      190422 16:00:39 [ERROR] mysqld got signal 6 ;
       
      #7  0x00007fae1d785ee2 in __assert_fail () from /lib/x86_64-linux-gnu/libc.so.6
      #8  0x0000562a574cc884 in Query_log_event::do_apply_event (this=0x7fadb0031040, rgi=0x7fadb0000a90, query_arg=0x7fadb00a4b4b "COMMIT", q_len_arg=6) at /data/src/10.4/sql/log_event.cc:5479
      #9  0x0000562a574cc4a3 in Query_log_event::do_apply_event (this=0x7fadb0031040, rgi=0x7fadb0000a90) at /data/src/10.4/sql/log_event.cc:5373
      #10 0x0000562a56f64013 in Log_event::apply_event (this=0x7fadb0031040, rgi=0x7fadb0000a90) at /data/src/10.4/sql/log_event.h:1482
      #11 0x0000562a56f57620 in apply_event_and_update_pos_apply (ev=0x7fadb0031040, thd=0x7fadb0001560, rgi=0x7fadb0000a90, reason=0) at /data/src/10.4/sql/slave.cc:3953
      #12 0x0000562a56f57c52 in apply_event_and_update_pos (ev=0x7fadb0031040, thd=0x7fadb0001560, rgi=0x7fadb0000a90) at /data/src/10.4/sql/slave.cc:4107
      #13 0x0000562a56f5868c in exec_relay_log_event (thd=0x7fadb0001560, rli=0x562a5a2920d8, serial_rgi=0x7fadb0000a90) at /data/src/10.4/sql/slave.cc:4428
      #14 0x0000562a56f5be6f in handle_slave_sql (arg=0x562a5a290410) at /data/src/10.4/sql/slave.cc:5592
      #15 0x0000562a575ea2f5 in pfs_spawn_thread (arg=0x7fadc4049160) at /data/src/10.4/storage/perfschema/pfs.cc:1862
      #16 0x00007fae1f87a494 in start_thread (arg=0x7fae129b3700) at pthread_create.c:333
      #17 0x00007fae1d84293f in clone () from /lib/x86_64-linux-gnu/libc.so.6
      

      Not reproducible on 10.3.
      No obvious problems on a non-debug build.

      Attachments

        Issue Links

          Activity

            People

              sujatha.sivakumar Sujatha Sivakumar (Inactive)
              elenst Elena Stepanova
              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.