~ubuntu-branches/ubuntu/precise/mysql-5.1/precise

« back to all changes in this revision

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

  • Committer: Bazaar Package Importer
  • Author(s): Norbert Tretkowski
  • Date: 2010-03-17 14:56:02 UTC
  • Revision ID: james.westby@ubuntu.com-20100317145602-x7e30l1b2sb5s6w6
Tags: upstream-5.1.45
ImportĀ upstreamĀ versionĀ 5.1.45

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
### 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