| 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/not_group_replication_plugin.inc |
| 16 |
--source include/have_binlog_format_row.inc |
| 17 |
--source include/force_myisam_default.inc |
| 18 |
--source include/have_myisam.inc |
| 19 |
--source include/master-slave.inc |
| 20 |
--connection master |
| 21 |
|
| 22 |
CREATE TABLE t1 (a int) ENGINE=MyISAM; |
| 23 |
CREATE TABLE t2 (a int) ENGINE=MyISAM; |
| 24 |
INSERT INTO t1 VALUES (1), (2), (3); |
| 25 |
INSERT INTO t2 VALUES (4), (5), (6); |
| 26 |
# Changed a little to check also an issue reported on BUG#20574550 |
| 27 |
CREATE TEMPORARY TABLE IF NOT EXISTS tt1_merge LIKE t1; |
| 28 |
ALTER TABLE tt1_merge ENGINE=MERGE UNION (t2, t1); |
| 29 |
CREATE TABLE t1_merge LIKE tt1_merge; |
| 30 |
|
| 31 |
--source include/sync_slave_sql_with_master.inc |
| 32 |
|
| 33 |
--let diff_tables=master:test.t1, slave:test.t1 |
| 34 |
--source include/diff_tables.inc |
| 35 |
|
| 36 |
--let diff_tables=master:test.t2, slave:test.t2 |
| 37 |
--source include/diff_tables.inc |
| 38 |
|
| 39 |
--connection master |
| 40 |
UPDATE t1_merge SET a=10 WHERE a=1; |
| 41 |
DELETE FROM t1_merge WHERE a=10; |
| 42 |
|
| 43 |
--source include/sync_slave_sql_with_master.inc |
| 44 |
--connection master |
| 45 |
|
| 46 |
--let diff_tables=master:test.t1, slave:test.t1 |
| 47 |
--source include/diff_tables.inc |
| 48 |
|
| 49 |
--let diff_tables=master:test.t2, slave:test.t2 |
| 50 |
--source include/diff_tables.inc |
| 51 |
|
| 52 |
DROP TABLE t1_merge, t1, t2; |
| 53 |
--source include/sync_slave_sql_with_master.inc |
| 54 |
|
| 55 |
--source include/rpl_end.inc |