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

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

    XMLWordPrintable

Details

    Description

      --source include/have_binlog_format_mixed.inc
      --source include/master-slave.inc
      --source include/have_partition.inc
       
       create table t1 ( i1 int, i2 int)  with system versioning partition by system_time limit 2
      (partition ver_p1 history, partition ver_p2 history, partition ver_pn current);
        
      insert into t1 values (1, 0), (1, 0);
      delete from t1 where i1 = 1 ;
      insert into t1 values (1, 0);
       update  t1 set i2 = 1 limit 1;
       
      --sync_slave_with_master
      select * from t1;
       
      --connection master
      drop table t1;
      --sync_slave_with_master
      --connection master
      --source include/rpl_end.inc
      

      Reproducible with myisam, aria, innodb
      on 10.5-debug:

      10.5 8677c14e65f436db00be5ae

      mariadbd: /10.5/sql/ha_partition.cc:4510: virtual int ha_partition::update_row(const uchar*, const uchar*): Assertion `old_part_id == m_last_part' failed.
      201215 10:13:25 [ERROR] mysqld got signal 6 ;
       
      Server version: 10.5.9-MariaDB-debug-log
       
      ??:0(__assert_fail)[0x7fe17e824102]
      sql/ha_partition.cc:4511(ha_partition::update_row(unsigned char const*, unsigned char const*))[0x55ae3b8e7405]
      sql/handler.cc:7197(handler::ha_update_row(unsigned char const*, unsigned char const*))[0x55ae3b061edc]
      sql/log_event_server.cc:8344(Update_rows_log_event::do_exec_row(rpl_group_info*))[0x55ae3b3c6d5f]
      sql/log_event_server.cc:5669(Rows_log_event::do_apply_event(rpl_group_info*))[0x55ae3b3b1a52]
      sql/log_event.h:1498(Log_event::apply_event(rpl_group_info*))[0x55ae3a5ee835]
      sql/slave.cc:4004(apply_event_and_update_pos_apply(Log_event*, THD*, rpl_group_info*, int))[0x55ae3a5d0b30]
      sql/slave.cc:4166(apply_event_and_update_pos(Log_event*, THD*, rpl_group_info*))[0x55ae3a5d1608]
      sql/slave.cc:4483(exec_relay_log_event(THD*, Relay_log_info*, rpl_group_info*))[0x55ae3a5d2c6c]
      sql/slave.cc:5660(handle_slave_sql)[0x55ae3a5da5bb]
      perfschema/pfs.cc:2203(pfs_spawn_thread)[0x55ae3b92f28e]
      nptl/pthread_create.c:487(start_thread)[0x7fe17f2e6fa3]
      x86_64/clone.S:97(clone)[0x7fe17e8ed4cf]
       
      Query (0x61200009445b): UPDATE  t1 SET i2 = 1 LIMIT 1
      

      Wrong result on the slave: On non-debug 10.3-10.5 + on debug-build for 10.3-10.4:
      with mixed binlog format:

       
      MariaDB [test]> select * from t1;
      +------+------+
      | i1   | i2   |
      +------+------+
      |    1 |    0 |
      |    1 |    1 |
      +------+------+
      2 rows in set (0.001 sec)
      

      with row binlog format:

      select * from t1;
      i1	i2
      1	0
      1	0
      1	1
      

      Attachments

        Issue Links

          Activity

            People

              midenok Aleksey Midenkov
              alice Alice Sherepa
              Votes:
              0 Vote for this issue
              Watchers:
              4 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.