Inconsistent error on slave for Update_rows event on table with non-exists partition
General
Escalation
General
Escalation
Description
Environment
None
AFFECTED CS IDs
259719
Smart Checklist
Activity
Show:

Julia Vural March 4, 2025 at 9:01 PM
It appears that this issue is no longer being worked on, so we are closing it for housekeeping purposes. If you believe the issue still exists, please open a new ticket after confirming it's present in the latest release.
Won't Do
Details
Details
Assignee
Unassigned
UnassignedReporter

Labels
Upstream Bug URL
Affects versions
Priority
Smart Checklist
Open Smart Checklist
Smart Checklist

Open Smart Checklist
Created July 9, 2019 at 11:51 AM
Updated March 4, 2025 at 9:01 PM
Resolved March 4, 2025 at 9:01 PM
my.cnf
binlog_checksum=CRC32 binlog_format=ROW binlog_row_image=FULL
Slave has an inconsistent error message under "show slave status" output for Update_rows event on the table with non-exists partition as compare to table without partitioning.
Last_Error: Could not execute Update_rows event on table test.fooPar; Got error 1 from storage engine, Error_code: 1030; handler error No Error!; the event's master log mysql-bin.000002, end_log_pos 19648118
Test case:
Table without partitioning.
updating row on the master which is missing on the slave will result in the following error,
Last_Error: Could not execute Update_rows event on table test.foo; Can't find record in 'foo', Error_code: 1032; handler error HA_ERR_KEY_NOT_FOUND; the event's master log mysql-bin.000002, end_log_pos 19646907
Table with partitioning.
updating row on the master which is missing on the slave will result in the following error,
create table fooPar (c1 int not null,c2 int not null,c3 char(100), primary key (c1,c2)) ENGINE=InnoDB DEFAULT CHARSET=utf8 /*!50100 PARTITION BY LIST (c2) (PARTITION P2 VALUES IN (2) ENGINE = InnoDB, PARTITION P3 VALUES IN (3) ENGINE = InnoDB, PARTITION P4 VALUES IN (4) ENGINE = InnoDB) */ ; master [localhost] {msandbox} (test) > insert into fooPar values(1,2,'test1'); Query OK, 1 row affected (0.02 sec) master [localhost] {msandbox} (test) > insert into fooPar values(2,3,'test2'); Query OK, 1 row affected (0.01 sec) master [localhost] {msandbox} (test) > insert into fooPar values(3,4,'test2'); Query OK, 1 row affected (0.02 sec) master [localhost] {msandbox} (test) > select * from fooPar; +----+----+-------+ | c1 | c2 | c3 | +----+----+-------+ | 1 | 2 | test1 | | 2 | 3 | test2 | | 3 | 4 | test2 | +----+----+-------+ 3 rows in set (0.00 sec) master [localhost] {msandbox} (test) > SELECT * FROM fooPar PARTITION (p4); +----+----+-------+ | c1 | c2 | c3 | +----+----+-------+ | 3 | 4 | test2 | +----+----+-------+ 1 row in set (0.00 sec) slave1 [localhost] {msandbox} (test) > SELECT * FROM fooPar PARTITION (p4); +----+----+-------+ | c1 | c2 | c3 | +----+----+-------+ | 3 | 4 | test2 | +----+----+-------+ 1 row in set (0.00 sec) slave1 [localhost] {msandbox} (test) > alter table fooPar drop partition p4; Query OK, 0 rows affected (0.07 sec) Records: 0 Duplicates: 0 Warnings: 0 CREATE TABLE `fooPar` ( `c1` int(11) NOT NULL, `c2` int(11) NOT NULL, `c3` char(100) DEFAULT NULL, PRIMARY KEY (`c1`,`c2`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 /*!50100 PARTITION BY LIST (c2) (PARTITION P2 VALUES IN (2) ENGINE = InnoDB, PARTITION P3 VALUES IN (3) ENGINE = InnoDB) */ 1 row in set (0.00 sec) master [localhost] {msandbox} (test) > update fooPar set c3='lalit' where c1=3 and c2=4; Query OK, 1 row affected (0.01 sec) Rows matched: 1 Changed: 1 Warnings: 0 master [localhost] {msandbox} (test) > select * from fooPar; +----+----+-------+ | c1 | c2 | c3 | +----+----+-------+ | 1 | 2 | test1 | | 2 | 3 | test2 | | 3 | 4 | lalit | +----+----+-------+ 3 rows in set (0.00 sec) slave1 [localhost] {msandbox} (test) > show slave status\G *************************** 1. row *************************** Slave_IO_State: Waiting for master to send event Master_Host: 127.0.0.1 Master_User: rsandbox Master_Port: 25509 Connect_Retry: 60 Master_Log_File: mysql-bin.000002 Read_Master_Log_Pos: 19648149 Relay_Log_File: mysql-relay.000006 Relay_Log_Pos: 13950183 Relay_Master_Log_File: mysql-bin.000002 Slave_IO_Running: Yes Slave_SQL_Running: No Last_Errno: 1030 Last_Error: Could not execute Update_rows event on table test.fooPar; Got error 1 from storage engine, Error_code: 1030; handler error No Error!; the event's master log mysql-bin.000002, end_log_pos 19648118 Skip_Counter: 0 Exec_Master_Log_Pos: 19647925 Relay_Log_Space: 19648597 Until_Condition: None Seconds_Behind_Master: NULL Master_SSL_Verify_Server_Cert: No Last_IO_Errno: 0 Last_IO_Error: Last_SQL_Errno: 1030 Last_SQL_Error: Could not execute Update_rows event on table test.fooPar; Got error 1 from storage engine, Error_code: 1030; handler error No Error!; the event's master log mysql-bin.000002, end_log_pos 19648118 Replicate_Ignore_Server_Ids: Master_Server_Id: 1 Master_UUID: 00025509-1111-1111-1111-111111111111 Master_Info_File: /home/lalit/sandboxes/rsandbox_Percona-Server-5_6_44/node1/data/master.info SQL_Delay: 0 SQL_Remaining_Delay: NULL Slave_SQL_Running_State: Master_Retry_Count: 86400 Master_Bind: Last_IO_Error_Timestamp: Last_SQL_Error_Timestamp: 190709 16:45:40 Master_SSL_Crl: Master_SSL_Crlpath: Retrieved_Gtid_Set: Executed_Gtid_Set: Auto_Position: 0 1 row in set (0.00 sec) slave1 [localhost] {msandbox} (test) >