~vadim-tk/percona-server/percona-galera-5.1.57-0.8.1

« back to all changes in this revision

Viewing changes to mysql-test/suite/rpl_ndb/r/rpl_ndb_multi_update2.result

  • Committer: root
  • Date: 2011-07-28 00:14:23 UTC
  • Revision ID: root@r815.office.percona.com-20110728001423-6pw0v4b7r0dkbsr4
Ported to Galera 0.8.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
include/master-slave.inc
 
2
[connection master]
 
3
drop table if exists t1,t2;
 
4
CREATE TABLE t1 (
 
5
a int unsigned not null auto_increment primary key,
 
6
b int unsigned
 
7
) ENGINE=NDB;
 
8
CREATE TABLE t2 (
 
9
a int unsigned not null auto_increment primary key,
 
10
b int unsigned
 
11
) ENGINE=NDB;
 
12
INSERT INTO t1 VALUES (NULL, 0);
 
13
INSERT INTO t1 SELECT NULL, 0 FROM t1;
 
14
INSERT INTO t2 VALUES (NULL, 0), (NULL,1);
 
15
SELECT * FROM t1 ORDER BY a;
 
16
a       b
 
17
1       0
 
18
2       0
 
19
SELECT * FROM t2 ORDER BY a;
 
20
a       b
 
21
1       0
 
22
2       1
 
23
UPDATE t1, t2 SET t1.b = (t2.b+4) WHERE t1.a = t2.a;
 
24
SELECT * FROM t1 ORDER BY a;
 
25
a       b
 
26
1       4
 
27
2       5
 
28
SELECT * FROM t2 ORDER BY a;
 
29
a       b
 
30
1       0
 
31
2       1
 
32
SELECT * FROM t1 ORDER BY a;
 
33
a       b
 
34
1       4
 
35
2       5
 
36
SELECT * FROM t2 ORDER BY a;
 
37
a       b
 
38
1       0
 
39
2       1
 
40
drop table t1,t2;
 
41
reset master;
 
42
CREATE TABLE t1 ( a INT );
 
43
INSERT INTO t1 VALUES (0);
 
44
UPDATE t1, (SELECT 3 as b) AS x SET t1.a = x.b;
 
45
select * from t1;
 
46
a
 
47
3
 
48
select * from t1;
 
49
a
 
50
3
 
51
drop table t1;
 
52
include/rpl_end.inc