blob: 0c038c41ebf94d5f365084b66ebed0b06fdd8b88 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
# ==== Purpose ====
#
# Verify that slave gives an error message if master updates a table
# that slave does not have.
#
# ==== Method ====
#
# Create a table on master, wait till it's on slave, remove it from
# slave. Then update the table on master.
--source include/have_binlog_format_row.inc
source include/master-slave.inc;
--echo ==== Setup table on master but not on slave ====
--echo [on master]
CREATE TABLE t1 (a INT);
--echo [on slave]
sync_slave_with_master;
DROP TABLE t1;
--echo ==== Modify table on master ====
--echo [on master]
connection master;
INSERT INTO t1 VALUES (1);
--echo ==== Verify error on slave ====
--echo [on slave]
connection slave;
# slave should have stopped because can't find table t1
--source include/wait_for_slave_sql_to_stop.inc
# see if we have a good error message:
let $err= query_get_value(SHOW SLAVE STATUS, Last_SQL_Error, 1);
--echo Last_SQL_Error = $err
--echo ==== Clean up ====
source include/stop_slave.inc;
--echo [on master]
connection master;
DROP TABLE t1;
|