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

ALTER ends with different auto-incremented values on master and slave, RBR fails with HA_ERR_KEY_NOT_FOUND

    XMLWordPrintable

Details

    Description

      Maybe we already have it filed, but I've looked through 19 open JIRA tickets which a search for "Can't find record in" && Replication returned, and none of them was quite the same, so I'm filing it separately.

      --source include/have_binlog_format_row.inc
      --source include/have_sequence.inc
      --source include/master-slave.inc
       
      CREATE TABLE t1 (a INT, b CHAR(1)) ENGINE=MEMORY;
      INSERT INTO t1 SELECT NULL, '' FROM seq_1_to_20;
      UPDATE t1 SET b='x' ORDER BY a LIMIT 9;
      ALTER TABLE t1 MODIFY a INT AUTO_INCREMENT, ADD PRIMARY KEY (a,b);
      UPDATE t1 SET b='y';
      --source include/sync_slave_sql_with_master.inc
       
      --connection master
      DROP TABLE t1;
      --source include/rpl_end.inc
      

      main 9d7ab2c0092df4bc73b64b915464aecf7e5fe6c4

      2026-10-11 14:52:42 7 [ERROR] mariadbd: Can't find record in 't1'
      2026-10-11 14:52:42 7 [ERROR] Slave SQL: Could not execute Update_rows_v1 event on table test.t1; Can't find record in 't1', Error_code: 1032; handler error HA_ERR_KEY_NOT_FOUND; the event's master log master-bin.000001, end_log_pos 0, Gtid 0-1-5, Internal MariaDB error code: 1032
      2026-10-11 14:52:42 7 [Warning] Slave: Can't find record in 't1' Error_code: 1032
      

      Attachments

        Activity

          People

            Elkin Andrei Elkin
            elenst Elena Stepanova
            Votes:
            0 Vote for this issue
            Watchers:
            2 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.