4
# This test case checks whether the slave crashes or not when there is
5
# a merge table in use.
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.
15
--source include/master-slave.inc
16
--source include/have_binlog_format_row.inc
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
CREATE TABLE IF NOT EXISTS t1_merge LIKE t1;
24
ALTER TABLE t1_merge ENGINE=MERGE UNION (t2, t1);
26
--sync_slave_with_master
28
--let diff_tables=master:test.t1, slave:test.t1
29
--source include/diff_tables.inc
31
--let diff_tables=master:test.t2, slave:test.t2
32
--source include/diff_tables.inc
35
UPDATE t1_merge SET a=10 WHERE a=1;
36
DELETE FROM t1_merge WHERE a=10;
38
--sync_slave_with_master
41
--let diff_tables=master:test.t1, slave:test.t1
42
--source include/diff_tables.inc
44
--let diff_tables=master:test.t2, slave:test.t2
45
--source include/diff_tables.inc
47
DROP TABLE t1_merge, t1, t2;
48
--sync_slave_with_master
50
--source include/rpl_end.inc