| 1 |
# ==== Purpose ==== |
| 2 |
# |
| 3 |
# Verify that slave gives an error message if master updates a table |
| 4 |
# that slave does not have. |
| 5 |
# |
| 6 |
# ==== Method ==== |
| 7 |
# |
| 8 |
# Create a table on master, wait till it's on slave, remove it from |
| 9 |
# slave. Then update the table on master. |
| 10 |
--source include/not_group_replication_plugin.inc |
| 11 |
--source include/have_binlog_format_row.inc |
| 12 |
|
| 13 |
source include/master-slave.inc; |
| 14 |
|
| 15 |
--echo ==== Setup table on master but not on slave ==== |
| 16 |
--echo [on master] |
| 17 |
CREATE TABLE t1 (a INT); |
| 18 |
|
| 19 |
--echo [on slave] |
| 20 |
--source include/sync_slave_sql_with_master.inc |
| 21 |
DROP TABLE t1; |
| 22 |
|
| 23 |
--echo ==== Modify table on master ==== |
| 24 |
--echo [on master] |
| 25 |
connection master; |
| 26 |
INSERT INTO t1 VALUES (1); |
| 27 |
|
| 28 |
--echo ==== Verify error on slave ==== |
| 29 |
--echo [on slave] |
| 30 |
connection slave; |
| 31 |
# slave should have stopped because can't find table t1 |
| 32 |
# 1146 = ER_NO_SUCH_TABLE |
| 33 |
call mtr.add_suppression("Replica SQL.*Error executing row event: .Table .test.t1. doesn.t exist., Error_code: MY-001146"); |
| 34 |
call mtr.add_suppression("The replica coordinator and worker threads are stopped, possibly leaving data in inconsistent state"); |
| 35 |
|
| 36 |
--let $slave_sql_errno= 1146 |
| 37 |
--source include/wait_for_slave_sql_error.inc |
| 38 |
|
| 39 |
--echo ==== Clean up ==== |
| 40 |
source include/stop_slave_io.inc; |
| 41 |
RESET SLAVE; |
| 42 |
|
| 43 |
--echo [on master] |
| 44 |
connection master; |
| 45 |
DROP TABLE t1; |
| 46 |
--let $rpl_only_running_threads= 1 |
| 47 |
--source include/rpl_end.inc |