Debian Codegraph @

mysql-test/suite/rpl/r/rpl_multi_update2.result

raw
1 include/master-slave.inc
2 [connection master]
3 call mtr.add_suppression('Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT');
4 drop table if exists t1,t2;
5 CREATE TABLE t1 (
6 a int unsigned not null auto_increment primary key,
7 b int unsigned
8 ) ENGINE=MyISAM;
9 CREATE TABLE t2 (
10 a int unsigned not null auto_increment primary key,
11 b int unsigned
12 ) ENGINE=MyISAM;
13 INSERT INTO t1 VALUES (NULL, 0);
14 INSERT INTO t1 SELECT NULL, 0 FROM t1;
15 INSERT INTO t2 VALUES (NULL, 0), (NULL,1);
16 SELECT * FROM t1 ORDER BY a;
17 a b
18 1 0
19 2 0
20 SELECT * FROM t2 ORDER BY a;
21 a b
22 1 0
23 2 1
24 UPDATE t1, t2 SET t1.b = (t2.b+4) WHERE t1.a = t2.a;
25 SELECT * FROM t1 ORDER BY a;
26 a b
27 1 4
28 2 5
29 SELECT * FROM t2 ORDER BY a;
30 a b
31 1 0
32 2 1
33 connection slave;
34 SELECT * FROM t1 ORDER BY a;
35 a b
36 1 4
37 2 5
38 SELECT * FROM t2 ORDER BY a;
39 a b
40 1 0
41 2 1
42 connection master;
43 drop table t1,t2;
44 connection slave;
45 reset master;
46 connection master;
47 CREATE TABLE t1 ( a INT );
48 INSERT INTO t1 VALUES (0);
49 UPDATE t1, (SELECT 3 as b) AS x SET t1.a = x.b;
50 select * from t1;
51 a
52 3
53 connection slave;
54 connection slave;
55 select * from t1;
56 a
57 3
58 connection master;
59 drop table t1;
60 connection slave;
61 include/rpl_end.inc