Debian Codegraph @

mysql-test/suite/rpl_nogtid/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/not_group_replication_plugin.inc
6 source include/master-slave.inc;
7
8 ### Clean-up
9
10 connection master;
11 --disable_warnings
12 drop database if exists d1;
13 drop database if exists d2;
14
15 connection slave;
16 drop database if exists d2;
17 --enable_warnings
18
19 ### Do on master
20
21 connection master;
22 create database d1; # accepted by slave
23 create table d1.t0 (id int);
24 create database d2; # ignored by slave
25 use d2;
26 create table t1 (id int);
27 create table t2 (id int);
28 insert into t1 values (1), (2), (3), (4), (5);
29 insert into t2 select id + 3 from t1;
30 # a problematic query which must be filter out by slave
31 update t1 join t2 using (id) set t1.id = 0;
32 insert into d1.t0 values (0); # replication works
33
34 ### Check on slave
35
36 --source include/sync_slave_sql_with_master.inc
37 use d1;
38 select * from t0 where id=0; # must find
39
40 ### Clean-up
41 connection master;
42 drop database d1;
43 drop database d2;
44 --source include/sync_slave_sql_with_master.inc
45
46 # End of test
47 --source include/rpl_end.inc