Debian Codegraph @

mysql-test/suite/rpl/include/rpl_truncate_helper.test

raw
1 --source include/rpl_reset.inc
2
3 connection master;
4 eval CREATE TABLE t1 (a INT, b LONG) ENGINE=$engine;
5 INSERT INTO t1 VALUES (1,1), (2,2);
6 sync_slave_with_master;
7 connection master;
8 eval $trunc_stmt t1;
9 sync_slave_with_master;
10
11 let $diff_tables= master:t1, slave:t1;
12 source include/diff_tables.inc;
13
14 --echo ==== Test using a table with delete triggers ====
15 connection master;
16 SET @count := 1;
17 eval CREATE TABLE t2 (a INT, b LONG) ENGINE=$engine;
18 CREATE TRIGGER trg1 BEFORE DELETE ON t1 FOR EACH ROW SET @count := @count + 1;
19 sync_slave_with_master;
20 connection master;
21 eval $trunc_stmt t1;
22 sync_slave_with_master;
23
24 let $diff_tables= master:t2, slave:t2;
25 source include/diff_tables.inc;
26
27 connection master;
28 DROP TABLE t1,t2;
29 sync_slave_with_master;