1source include/have_binlog_format_row.inc; 2source include/have_innodb.inc; 3source include/master-slave.inc; 4 5call mtr.add_suppression("Deadlock found"); 6call mtr.add_suppression("Can't find record in 't.'"); 7 8connection master; 9CREATE TABLE t1 (a INT PRIMARY KEY, b INT); 10INSERT INTO t1 VALUES (1,1), (2,2), (3,3), (4,4); 11sync_slave_with_master; 12SHOW STATUS LIKE 'Slave_retried_transactions'; 13# since bug#31552/31609 idempotency is not default any longer. In order 14# the following UPDATE t1 to pass the mode is switched temprorarily 15set @@global.slave_exec_mode= 'IDEMPOTENT'; 16UPDATE t1 SET a = 5, b = 47 WHERE a = 1; 17SELECT * FROM t1; 18connection master; 19UPDATE t1 SET a = 5, b = 5 WHERE a = 1; 20SELECT * FROM t1; 21#SHOW BINLOG EVENTS; 22sync_slave_with_master; 23set @@global.slave_exec_mode= default; 24SHOW STATUS LIKE 'Slave_retried_transactions'; 25SELECT * FROM t1; 26source include/check_slave_is_running.inc; 27 28connection slave; 29call mtr.add_suppression("Slave SQL.*Could not execute Update_rows event on table test.t1"); 30 31connection master; 32DROP TABLE t1; 33--sync_slave_with_master 34--connection master 35 36# We must wait for the slave to stop. 37# Otherwise the warnings in the error log about deadlock may be written to 38# the error log only during shutdown, and currently the suppression of 39# "Deadlock found" set in this test case is not effective during server 40# shutdown. 41 42--source include/rpl_end.inc 43