Debian Codegraph @

mysql-test/suite/rpl/t/rpl_multi_update4.test

raw
1 # Let's verify that multi-update is not always skipped by slave if
2 # some replicate-* rules exist.
3 # (BUG#15699)
4
5 source include/master-slave.inc;
6
7 ### Clean-up
8
9 connection master;
10 --disable_warnings
11 drop database if exists d1;
12 drop database if exists d2;
13
14 connection slave;
15 drop database if exists d2;
16 --enable_warnings
17
18 ### Do on master
19
20 connection master;
21 create database d1; # accepted by slave
22 create table d1.t0 (id int);
23 create database d2; # ignored by slave
24 use d2;
25 create table t1 (id int);
26 create table t2 (id int);
27 insert into t1 values (1), (2), (3), (4), (5);
28 insert into t2 select id + 3 from t1;
29 # a problematic query which must be filter out by slave
30 update t1 join t2 using (id) set t1.id = 0;
31 insert into d1.t0 values (0); # replication works
32
33 ### Check on slave
34
35 sync_slave_with_master;
36 use d1;
37 select * from t0 where id=0; # must find
38
39 ### Clean-up
40 connection master;
41 drop database d1;
42 drop database d2;
43 sync_slave_with_master;
44
45 # End of test
46 --source include/rpl_end.inc