2006-06-01 11:53:27 +02:00
|
|
|
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;
|
2009-02-06 17:06:41 +01:00
|
|
|
**** Resetting master and slave ****
|
2009-02-10 15:44:58 +01:00
|
|
|
include/stop_slave.inc
|
2007-11-02 14:00:38 +02:00
|
|
|
RESET SLAVE;
|
|
|
|
RESET MASTER;
|
2009-02-10 15:44:58 +01:00
|
|
|
include/start_slave.inc
|
2006-06-01 11:53:27 +02:00
|
|
|
**** On Master ****
|
|
|
|
CREATE TABLE t1 (a INT, b LONG) ENGINE=InnoDB;
|
|
|
|
INSERT INTO t1 VALUES (1,1), (2,2);
|
|
|
|
**** On Master ****
|
|
|
|
TRUNCATE TABLE t1;
|
2009-02-06 17:06:41 +01:00
|
|
|
Comparing tables master:test.t1 and slave:test.t1
|
|
|
|
==== Test using a table with delete triggers ====
|
2006-06-01 11:53:27 +02:00
|
|
|
**** On Master ****
|
2009-02-06 17:06:41 +01:00
|
|
|
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;
|
2006-06-01 11:53:27 +02:00
|
|
|
**** On Master ****
|
|
|
|
TRUNCATE TABLE t1;
|
2009-02-06 17:06:41 +01:00
|
|
|
Comparing tables master:test.t2 and slave:test.t2
|
|
|
|
DROP TABLE t1,t2;
|
|
|
|
**** Resetting master and slave ****
|
2009-02-10 15:44:58 +01:00
|
|
|
include/stop_slave.inc
|
2007-11-02 14:00:38 +02:00
|
|
|
RESET SLAVE;
|
|
|
|
RESET MASTER;
|
2009-02-10 15:44:58 +01:00
|
|
|
include/start_slave.inc
|
2006-06-01 11:53:27 +02:00
|
|
|
**** On Master ****
|
|
|
|
CREATE TABLE t1 (a INT, b LONG) ENGINE=InnoDB;
|
|
|
|
INSERT INTO t1 VALUES (1,1), (2,2);
|
|
|
|
**** On Master ****
|
|
|
|
DELETE FROM t1;
|
2009-02-06 17:06:41 +01:00
|
|
|
Comparing tables master:test.t1 and slave:test.t1
|
|
|
|
==== Test using a table with delete triggers ====
|
2006-06-01 11:53:27 +02:00
|
|
|
**** On Master ****
|
2009-02-06 17:06:41 +01:00
|
|
|
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;
|
2006-06-01 11:53:27 +02:00
|
|
|
**** On Master ****
|
|
|
|
DELETE FROM t1;
|
2009-02-06 17:06:41 +01:00
|
|
|
Comparing tables master:test.t2 and slave:test.t2
|
|
|
|
DROP TABLE t1,t2;
|