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

Wrong result or Assertion `old_part_id == m_last_part' failed in ha_partition::update_row on slave

    XMLWordPrintable

Details

    Description

      --source include/have_partition.inc
      --source include/have_binlog_format_row.inc
      --source include/master-slave.inc
       
      CREATE TABLE t1 (i INT) WITH SYSTEM VERSIONING PARTITION BY system_time LIMIT 8 ( PARTITION p1 HISTORY, PARTITION p2 HISTORY, PARTITION pn CURRENT );
      INSERT INTO t1 VALUES (1);
      UPDATE t1 SET i = 1;
      UPDATE t1 SET i = 0;
       
      --sync_slave_with_master
       
      # Cleanup
      --connection master
      DROP TABLE t1;
      --sync_slave_with_master
      --connection master
      --source include/rpl_end.inc
      

      bb-10.3-release 186f9fe90803

      mysqld: /data/src/bb-10.3-release/sql/ha_partition.cc:4345: virtual int ha_partition::update_row(const uchar*, const uchar*): Assertion `old_part_id == m_last_part' failed.
      180223 18:21:24 [ERROR] mysqld got signal 6 ;
       
      #7  0x00007f87106fcee2 in __assert_fail () from /lib/x86_64-linux-gnu/libc.so.6
      #8  0x000055e85d6f0183 in ha_partition::update_row (this=0x7f86ac024988, old_data=0x7f86ac022a50 "\375\001", new_data=0x7f86ac022a38 "\375") at /data/src/bb-10.3-release/sql/ha_partition.cc:4345
      #9  0x000055e85cf6b35a in handler::ha_update_row (this=0x7f86ac024988, old_data=0x7f86ac022a50 "\375\001", new_data=0x7f86ac022a38 "\375") at /data/src/bb-10.3-release/sql/handler.cc:6245
      #10 0x000055e85d0a5d43 in Update_rows_log_event::do_exec_row (this=0x7f86ac019a90, rgi=0x7f86ac000a90) at /data/src/bb-10.3-release/sql/log_event.cc:14244
      #11 0x000055e85d09eda5 in Rows_log_event::do_apply_event (this=0x7f86ac019a90, rgi=0x7f86ac000a90) at /data/src/bb-10.3-release/sql/log_event.cc:11400
      #12 0x000055e85cbbfb25 in Log_event::apply_event (this=0x7f86ac019a90, rgi=0x7f86ac000a90) at /data/src/bb-10.3-release/sql/log_event.h:1481
      #13 0x000055e85cbb3ea6 in apply_event_and_update_pos_apply (ev=0x7f86ac019a90, thd=0x7f86ac001560, rgi=0x7f86ac000a90, reason=0) at /data/src/bb-10.3-release/sql/slave.cc:3883
      #14 0x000055e85cbb4370 in apply_event_and_update_pos (ev=0x7f86ac019a90, thd=0x7f86ac001560, rgi=0x7f86ac000a90) at /data/src/bb-10.3-release/sql/slave.cc:4031
      #15 0x000055e85cbb4adc in exec_relay_log_event (thd=0x7f86ac001560, rli=0x55e860adad88, serial_rgi=0x7f86ac000a90) at /data/src/bb-10.3-release/sql/slave.cc:4318
      #16 0x000055e85cbb810a in handle_slave_sql (arg=0x55e860ad90c0) at /data/src/bb-10.3-release/sql/slave.cc:5477
      #17 0x000055e85d275e7f in pfs_spawn_thread (arg=0x7f86b00408b0) at /data/src/bb-10.3-release/storage/perfschema/pfs.cc:1862
      #18 0x00007f87123d3494 in start_thread (arg=0x7f870819c700) at pthread_create.c:333
      #19 0x00007f87107b993f in clone () from /lib/x86_64-linux-gnu/libc.so.6
      

      Non-debug:

      --source include/have_partition.inc
      --source include/master-slave.inc
      --source include/have_binlog_format_row.inc
       
      CREATE TABLE t1 (i INT) WITH SYSTEM VERSIONING PARTITION BY system_time LIMIT 8 ( PARTITION p1 HISTORY, PARTITION p2 HISTORY, PARTITION pn CURRENT );
      INSERT INTO t1 VALUES (1);
      UPDATE t1 SET i = 1;
      UPDATE t1 SET i = 0;
       
      SELECT * FROM t1;
       
      --sync_slave_with_master
       
      # Cleanup
      SELECT * FROM t1;
       
      --connection master
      DROP TABLE t1;
      --sync_slave_with_master
      --connection master
      --source include/rpl_end.inc
      

      Actual result

      CREATE TABLE t1 (i INT) WITH SYSTEM VERSIONING PARTITION BY system_time LIMIT 8 ( PARTITION p1 HISTORY, PARTITION p2 HISTORY, PARTITION pn CURRENT );
      INSERT INTO t1 VALUES (1);
      UPDATE t1 SET i = 1;
      UPDATE t1 SET i = 0;
      SELECT * FROM t1;
      i
      0
      connection slave;
      SELECT * FROM t1;
      i
      1
      0
      

      Wrong result is reproducible on main 10.3 2732fcc60, assertion failure is not.

      Attachments

        Issue Links

          Activity

            People

              serg Sergei Golubchik
              elenst Elena Stepanova
              Votes:
              0 Vote for this issue
              Watchers:
              1 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.