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

Slave SQL: Could not execute Delete_rows_v1/Update_rows_v1 event; Can't find record, Error_code: 1032; handler error HA_ERR_KEY_NOT_FOUND or HA_ERR_NO_PARTITION_FOUND

    XMLWordPrintable

Details

    Description

      While the testcase does not immediately look significant (we're deleting from mysql.innodb_table_stats) note that this is likely just an artifact, i.e. the issue can likely be reproduced in other ways without deleting from innodb_table_stats. There are number of bugs open that look somewhat related (linked), but they are on older versions (except MDEV-33022 which is in combination with Galera), and this issue could be reproduced on 10.6+ only.

      # Requires standard master/slave setup
      CREATE TABLE t (c VARCHAR(2000) BINARY CHARACTER SET 'utf8') ENGINE=InnoDB;
      ALTER TABLE t ADD UNIQUE (c);
      SELECT c FROM t;
      DELETE FROM mysql.innodb_table_stats;
      

      Leads to (on slave):

      11.4.0 8bf9f21855606ddeb0fe90fb1e70165adbec6746 (Debug, Slave)

      2024-01-22 15:37:12 6 [Note] Slave SQL thread initialized, starting replication in log 'FIRST' at position 4, relay log './relaylog.000001' position: 4; GTID position ''
      2024-01-22 15:37:15 69 [ERROR] mariadbd: Can't find record in 'innodb_table_stats'
      2024-01-22 15:37:15 69 [Warning] Slave SQL: Could not execute Delete_rows_v1 event on table mysql.innodb_table_stats; Can't find record in 'innodb_table_stats', Error_code: 1032; handler error HA_ERR_KEY_NOT_FOUND; the event's master log binlog.000001, end_log_pos 0, Gtid 0-1-6, Internal MariaDB error code: 1032
      

      Present in 10.6+, opt+dbg builds

      Attachments

        Issue Links

          Activity

            People

              Elkin Andrei Elkin
              Roel Roel Van de Paar
              Votes:
              1 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.