Debian Codegraph @

mysql-test/suite/engines/funcs/t/rpl_row_inexist_tbl.test

raw
1 # Test to see what slave says when master is updating a table it does
2 # not have
3 --source include/have_binlog_format_row.inc
4
5 --source include/master-slave.inc
6
7 connection master;
8 create table t1 (a int not null primary key);
9 insert into t1 values (1);
10 create table t2 (a int);
11 insert into t2 values (1);
12 update t1, t2 set t1.a = 0 where t1.a = t2.a;
13
14 --sync_slave_with_master
15 # t2 should not have been replicated
16 # t1 should have been properly updated
17 show tables;
18 select * from t1;
19 drop table t1;
20
21 connection master;
22 insert into t1 values (1);
23
24 connection slave;
25 # slave should have stopped because can't find table t1
26 # 1146 = ER_NO_SUCH_TABLE
27 call mtr.add_suppression("Slave SQL.*Error executing row event: .Table .test.t1. doesn.t exist., error.* 1146");
28 --let $slave_sql_errno= 1146
29 --source include/wait_for_slave_sql_error.inc
30
31 --echo ==== Clean up ====
32 --source include/stop_slave_io.inc
33 RESET SLAVE;
34
35 connection master;
36 drop table t1, t2;
37 --let $rpl_only_running_threads= 1
38 --source include/rpl_end.inc