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

« back to all changes in this revision

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

  • 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
stop slave;
 
2
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
 
3
reset master;
 
4
reset slave;
 
5
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
 
6
start slave;
 
7
drop table if exists t1,t2;
 
8
CREATE TABLE t1 (
 
9
a int unsigned not null auto_increment primary key,
 
10
b int unsigned
 
11
) ENGINE=NDB;
 
12
CREATE TABLE t2 (
 
13
a int unsigned not null auto_increment primary key,
 
14
b int unsigned
 
15
) ENGINE=NDB;
 
16
INSERT INTO t1 VALUES (NULL, 0);
 
17
INSERT INTO t1 SELECT NULL, 0 FROM t1;
 
18
INSERT INTO t2 VALUES (NULL, 0), (NULL,1);
 
19
SELECT * FROM t1 ORDER BY a;
 
20
a       b
 
21
1       0
 
22
2       0
 
23
SELECT * FROM t2 ORDER BY a;
 
24
a       b
 
25
1       0
 
26
2       1
 
27
UPDATE t1, t2 SET t1.b = (t2.b+4) WHERE t1.a = t2.a;
 
28
SELECT * FROM t1 ORDER BY a;
 
29
a       b
 
30
1       4
 
31
2       5
 
32
SELECT * FROM t2 ORDER BY a;
 
33
a       b
 
34
1       0
 
35
2       1
 
36
SELECT * FROM t1 ORDER BY a;
 
37
a       b
 
38
1       4
 
39
2       5
 
40
SELECT * FROM t2 ORDER BY a;
 
41
a       b
 
42
1       0
 
43
2       1
 
44
drop table t1,t2;
 
45
reset master;
 
46
CREATE TABLE t1 ( a INT );
 
47
INSERT INTO t1 VALUES (0);
 
48
UPDATE t1, (SELECT 3 as b) AS x SET t1.a = x.b;
 
49
select * from t1;
 
50
a
 
51
3
 
52
select * from t1;
 
53
a
 
54
3
 
55
drop table t1;