mirror of
https://github.com/MariaDB/server.git
synced 2025-07-04 01:23:45 +03:00
43 lines
916 B
Plaintext
43 lines
916 B
Plaintext
include/master-slave.inc
|
|
[connection master]
|
|
call mtr.add_suppression("Deadlock found");
|
|
**** On Master ****
|
|
CREATE TABLE t1 (a INT PRIMARY KEY, b INT);
|
|
INSERT INTO t1 VALUES (1,1), (2,2), (3,3), (4,4);
|
|
**** On Slave ****
|
|
SHOW STATUS LIKE 'Slave_retried_transactions';
|
|
Variable_name Value
|
|
Slave_retried_transactions 0
|
|
set @@global.slave_exec_mode= 'IDEMPOTENT';
|
|
UPDATE t1 SET a = 5, b = 47 WHERE a = 1;
|
|
SELECT * FROM t1;
|
|
a b
|
|
5 47
|
|
2 2
|
|
3 3
|
|
4 4
|
|
**** On Master ****
|
|
UPDATE t1 SET a = 5, b = 5 WHERE a = 1;
|
|
SELECT * FROM t1;
|
|
a b
|
|
5 5
|
|
2 2
|
|
3 3
|
|
4 4
|
|
**** On Slave ****
|
|
set @@global.slave_exec_mode= default;
|
|
SHOW STATUS LIKE 'Slave_retried_transactions';
|
|
Variable_name Value
|
|
Slave_retried_transactions 0
|
|
SELECT * FROM t1;
|
|
a b
|
|
5 47
|
|
2 2
|
|
3 3
|
|
4 4
|
|
include/check_slave_is_running.inc
|
|
call mtr.add_suppression("Slave SQL.*Could not execute Update_rows event on table test.t1");
|
|
**** On Master ****
|
|
DROP TABLE t1;
|
|
include/rpl_end.inc
|