rpl_truncate_3innodb.result 1.36 KB
Newer Older
1 2 3 4 5 6
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;
Mats Kindahl's avatar
Mats Kindahl committed
7
**** Resetting master and slave ****
8
include/stop_slave.inc
9 10
RESET SLAVE;
RESET MASTER;
11
include/start_slave.inc
12 13 14 15 16
**** On Master ****
CREATE TABLE t1 (a INT, b LONG) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1,1), (2,2);
**** On Master ****
TRUNCATE TABLE t1;
Mats Kindahl's avatar
Mats Kindahl committed
17 18
Comparing tables master:test.t1 and slave:test.t1
==== Test using a table with delete triggers ====
19
**** On Master ****
Mats Kindahl's avatar
Mats Kindahl committed
20 21 22
SET @count := 1;
CREATE TABLE t2 (a INT, b LONG) ENGINE=InnoDB;
CREATE TRIGGER trg1 BEFORE DELETE ON t1 FOR EACH ROW SET @count := @count + 1;
23 24
**** On Master ****
TRUNCATE TABLE t1;
Mats Kindahl's avatar
Mats Kindahl committed
25 26 27
Comparing tables master:test.t2 and slave:test.t2
DROP TABLE t1,t2;
**** Resetting master and slave ****
28
include/stop_slave.inc
29 30
RESET SLAVE;
RESET MASTER;
31
include/start_slave.inc
32 33 34 35 36
**** On Master ****
CREATE TABLE t1 (a INT, b LONG) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1,1), (2,2);
**** On Master ****
DELETE FROM t1;
Mats Kindahl's avatar
Mats Kindahl committed
37 38
Comparing tables master:test.t1 and slave:test.t1
==== Test using a table with delete triggers ====
39
**** On Master ****
Mats Kindahl's avatar
Mats Kindahl committed
40 41 42
SET @count := 1;
CREATE TABLE t2 (a INT, b LONG) ENGINE=InnoDB;
CREATE TRIGGER trg1 BEFORE DELETE ON t1 FOR EACH ROW SET @count := @count + 1;
43 44
**** On Master ****
DELETE FROM t1;
Mats Kindahl's avatar
Mats Kindahl committed
45 46
Comparing tables master:test.t2 and slave:test.t2
DROP TABLE t1,t2;