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

RBR fails with ER_KEY_NOT_FOUND upon DML on Aria table

    XMLWordPrintable

Details

    • Can result in unexpected behaviour

    Description

      Quite possibly it shares the root cause with MDEV-31663. However, there are no "special" character sets here, which makes it a more normal test case (a BIT field may be somewhat unusual, but I've also seen it in users' structures from production instances. Also, maybe the analysis will show that it doesn't have to be BIT, even though I couldn't replace it with a more common data type).

      --source include/have_binlog_format_row.inc
      --source include/master-slave.inc
       
      CREATE TABLE t (
       f01 int,
       f02 int,
       f03 int,
       f04 int,
       f05 int,
       f06 int,
       f07 int,
       f08 int,
       f09 int default 0,
       f10 varchar(1) not null default '',
       f11 int,
       f12 int,
       f13 int,
       f14 int,
       f15 int,
       f16 int,
       f17 bit default 1,
       KEY (f17)
      ) ENGINE=Aria;
      INSERT INTO t VALUES ();
      DELETE FROM t;
       
      --sync_slave_with_master
       
      --connection master
      DROP TABLE t;
      --source include/rpl_end.inc
      

      main 00a9afb5818433c26537ccaf6b2c59ad493dd473

      2025-05-23 14:15:59 7 [ERROR] mariadbd: Can't find record in 't'
      2025-05-23 14:15:59 7 [ERROR] Slave SQL: Could not execute Delete_rows_v1 event on table test.t; Can't find record in 't', 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-3, Internal MariaDB error code: 1032
      2025-05-23 14:15:59 7 [Warning] Slave: Can't find record in 't' Error_code: 1032
      2025-05-23 14:15:59 7 [ERROR] Error running query, slave SQL thread aborted. Fix the problem, and restart the slave SQL thread with "SLAVE START". We stopped at log 'master-bin.000001' position 958; GTID position '0-1-2'
      

      Binlog events:

      #250523 14:15:59 server id 1  end_log_pos 0 CRC32 0x411ca73a 	Write_rows: table id 32 flags: STMT_END_F
      ### INSERT INTO `test`.`t`
      ### SET
      ###   @1=NULL
      ###   @2=NULL
      ###   @3=NULL
      ###   @4=NULL
      ###   @5=NULL
      ###   @6=NULL
      ###   @7=NULL
      ###   @8=NULL
      ###   @9=0
      ###   @10=''
      ###   @11=NULL
      ###   @12=NULL
      ###   @13=NULL
      ###   @14=NULL
      ###   @15=NULL
      ###   @16=NULL
      ###   @17=b'1'
      # Number of rows: 1
      # at 885
      #250523 14:15:59 server id 1  end_log_pos 958 CRC32 0xe1e6cb6b 	Query	thread_id=8	exec_time=0	error_code=0	xid=0
      SET TIMESTAMP=1747998959/*!*/;
      COMMIT
      /*!*/;
      # at 958
      #250523 14:15:59 server id 1  end_log_pos 1000 CRC32 0x1374dfad 	GTID 0-1-3 thread_id=8
      /*M!100001 SET @@session.gtid_seq_no=3*//*!*/;
      START TRANSACTION
      /*!*/;
      # at 1000
      # at 1036
      #250523 14:15:59 server id 1  end_log_pos 0 CRC32 0x7c438281 	Annotate_rows:
      #Q> DELETE FROM t
      #250523 14:15:59 server id 1  end_log_pos 0 CRC32 0x3596dd77 	Table_map: `test`.`t` mapped to number 32
      # at 1102
      #250523 14:15:59 server id 1  end_log_pos 0 CRC32 0xf87ce1e8 	Delete_rows: table id 32 flags: STMT_END_F
      ### DELETE FROM `test`.`t`
      ### WHERE
      ###   @1=NULL
      ###   @2=NULL
      ###   @3=NULL
      ###   @4=NULL
      ###   @5=NULL
      ###   @6=NULL
      ###   @7=NULL
      ###   @8=NULL
      ###   @9=0
      ###   @10=''
      ###   @11=NULL
      ###   @12=NULL
      ###   @13=NULL
      ###   @14=NULL
      ###   @15=NULL
      ###   @16=NULL
      ###   @17=b'1'
      # Number of rows: 1
      

      Attachments

        Issue Links

          Activity

            People

              bnestere Brandon Nesterenko
              elenst Elena Stepanova
              Votes:
              0 Vote for this issue
              Watchers:
              3 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.