Debian Codegraph @

mysql-test/suite/rpl/t/rpl_row_merge_engine.test

raw
1 #
2 # BUG#47103
3 #
4 # This test case checks whether the slave crashes or not when there is
5 # a merge table in use.
6 #
7 # Description
8 # ===========
9 #
10 # The test case creates two regular MyISAM tables on the master and
11 # one MERGE table. Then it populates the MyISAM tables, updates and
12 # deletes their contents through the merge table. Finally, the slave
13 # is synchronized with the master and (after the fix) it won't crash.
14 #
15 --source include/have_binlog_format_row.inc
16 --source include/master-slave.inc
17 --connection master
18
19 CREATE TABLE t1 (a int) ENGINE=MyISAM;
20 CREATE TABLE t2 (a int) ENGINE=MyISAM;
21 INSERT INTO t1 VALUES (1), (2), (3);
22 INSERT INTO t2 VALUES (4), (5), (6);
23 # Changed a little to check also an issue reported on BUG#20574550
24 CREATE TEMPORARY TABLE IF NOT EXISTS tt1_merge LIKE t1;
25 ALTER TABLE tt1_merge ENGINE=MERGE UNION (t2, t1);
26 CREATE TABLE t1_merge LIKE tt1_merge;
27
28 --sync_slave_with_master
29
30 --let diff_tables=master:test.t1, slave:test.t1
31 --source include/diff_tables.inc
32
33 --let diff_tables=master:test.t2, slave:test.t2
34 --source include/diff_tables.inc
35
36 --connection master
37 UPDATE t1_merge SET a=10 WHERE a=1;
38 DELETE FROM t1_merge WHERE a=10;
39
40 --sync_slave_with_master
41 --connection master
42
43 --let diff_tables=master:test.t1, slave:test.t1
44 --source include/diff_tables.inc
45
46 --let diff_tables=master:test.t2, slave:test.t2
47 --source include/diff_tables.inc
48
49 DROP TABLE t1_merge, t1, t2;
50 --sync_slave_with_master
51
52 --source include/rpl_end.inc