mirror of
https://github.com/MariaDB/server.git
synced 2025-02-01 19:41:47 +01:00
77 lines
1.5 KiB
Text
77 lines
1.5 KiB
Text
stop slave;
|
|
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
|
reset master;
|
|
reset slave;
|
|
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
|
start slave;
|
|
call mtr.add_suppression("Slave: Can't find record in 't.' Error_code: 1032");
|
|
call mtr.add_suppression("Slave: Cannot delete or update a parent row: a foreign key constraint fails .* Error_code: 1451");
|
|
call mtr.add_suppression("Slave: Cannot add or update a child row: a foreign key constraint fails .* Error_code: 1452");
|
|
CREATE TABLE t1 (a INT PRIMARY KEY);
|
|
CREATE TABLE t2 (a INT);
|
|
INSERT INTO t1 VALUES (-1),(-2),(-3);
|
|
INSERT INTO t2 VALUES (-1),(-2),(-3);
|
|
SET @old_slave_exec_mode= @@global.slave_exec_mode;
|
|
SET @@global.slave_exec_mode= IDEMPOTENT;
|
|
DELETE FROM t1 WHERE a = -2;
|
|
DELETE FROM t2 WHERE a = -2;
|
|
DELETE FROM t1 WHERE a = -2;
|
|
DELETE FROM t2 WHERE a = -2;
|
|
SELECT * FROM t1 ORDER BY a;
|
|
a
|
|
-3
|
|
-1
|
|
SELECT * FROM t2 ORDER BY a;
|
|
a
|
|
-3
|
|
-1
|
|
SELECT * FROM t1 ORDER BY a;
|
|
a
|
|
-3
|
|
-1
|
|
SELECT * FROM t2 ORDER BY a;
|
|
a
|
|
-3
|
|
-1
|
|
Last_SQL_Error
|
|
0
|
|
INSERT IGNORE INTO t1 VALUES (-2);
|
|
INSERT IGNORE INTO t1 VALUES (-2);
|
|
SELECT * FROM t1 ORDER BY a;
|
|
a
|
|
-3
|
|
-2
|
|
-1
|
|
SELECT * FROM t1 ORDER BY a;
|
|
a
|
|
-3
|
|
-2
|
|
-1
|
|
Last_SQL_Error
|
|
0
|
|
UPDATE t1 SET a = 1 WHERE a = -1;
|
|
UPDATE t2 SET a = 1 WHERE a = -1;
|
|
UPDATE t1 SET a = 1 WHERE a = -1;
|
|
UPDATE t2 SET a = 1 WHERE a = -1;
|
|
SELECT * FROM t1 ORDER BY a;
|
|
a
|
|
-3
|
|
-2
|
|
1
|
|
SELECT * FROM t2 ORDER BY a;
|
|
a
|
|
-3
|
|
1
|
|
SELECT * FROM t1 ORDER BY a;
|
|
a
|
|
-3
|
|
-2
|
|
1
|
|
SELECT * FROM t2 ORDER BY a;
|
|
a
|
|
-3
|
|
1
|
|
Last_SQL_Error
|
|
0
|
|
DROP TABLE t1, t2;
|
|
SET @@global.slave_exec_mode= @old_slave_exec_mode;
|