~vlad-lesin/percona-server/mysql-5.0.33-original

« back to all changes in this revision

Viewing changes to mysql-test/t/rpl_multi_update4.test

  • Committer: Vlad Lesin
  • Date: 2012-07-31 09:21:34 UTC
  • Revision ID: vladislav.lesin@percona.com-20120731092134-zfodx022b7992wsi
VirginĀ 5.0.33

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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
### Test
 
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
sync_slave_with_master;
 
34
use d1;
 
35
#connection slave;
 
36
select * from t0 where id=0;  # must find
 
37
 
 
38
### Clean-up
 
39
connection master;
 
40
drop database d1;
 
41
drop database d2;
 
42
 
 
43
 
 
44
# End of test