summaryrefslogtreecommitdiff
path: root/mysql-test/suite/engines/funcs/t/rpl_row_inexist_tbl.test
blob: 793b94e63a6ca48b068b69b3025150ce1e3985d8 (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
# Test to see what slave says when master is updating a table it does
# not have
--source include/have_binlog_format_row.inc

--source include/master-slave.inc

connection master;
create table t1 (a int not null primary key);
insert into  t1 values (1);
create table t2 (a int);
insert into  t2 values (1);
update t1, t2 set t1.a = 0 where t1.a = t2.a;

--sync_slave_with_master
# t2 should not have been replicated
# t1 should have been properly updated 
show tables;
select * from t1;
drop table t1;

connection master;
insert into t1 values (1);

connection slave;
# slave should have stopped because can't find table t1
# 1146 = ER_NO_SUCH_TABLE
call mtr.add_suppression("Slave SQL.*Error executing row event: .Table .test.t1. doesn.t exist., error.* 1146");
--let $slave_sql_errno= 1146
--source include/wait_for_slave_sql_error.inc

--echo ==== Clean up ====
--source include/stop_slave_io.inc
RESET SLAVE;

connection master;
drop table t1, t2;
--let $rpl_only_running_threads= 1
--source include/rpl_end.inc