mirror of
https://github.com/MariaDB/server.git
synced 2025-01-22 14:54:20 +01:00
9cc4b8dd80
The rpl_trigger test case indicated a problem with idempotency support when run under row-based replication, which this patch fixes. However, despite this, the test is not designed for execution under row-based replication and hence rpl_trigger.test is not executed under row-based replication. The problem is that the test expects triggers to be executed when the slave updates rows on the slave, and this is (deliberately) not done with row-based replication.
71 lines
1 KiB
Text
71 lines
1 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;
|
|
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);
|
|
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;
|