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

« back to all changes in this revision

Viewing changes to mysql-test/suite/innodb/r/innodb_multi_update.result

  • Committer: Bazaar Package Importer
  • Author(s): Chuck Short
  • Date: 2010-06-21 15:31:05 UTC
  • mfrom: (1.1.3 upstream)
  • mto: This revision was merged to the branch mainline in revision 6.
  • Revision ID: james.westby@ubuntu.com-20100621153105-pbbz3t6nyrf9t2zq
Tags: upstream-5.1.48
ImportĀ upstreamĀ versionĀ 5.1.48

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
CREATE TABLE bug38999_1 (a int not null primary key, b int not null, key (b)) engine=innodb;
 
2
CREATE TABLE bug38999_2 (a int not null primary key, b int not null, key (b)) engine=innodb;
 
3
INSERT INTO bug38999_1 values (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10),(11,11),(12,12);
 
4
INSERT INTO bug38999_2 values (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9);
 
5
update bug38999_1,bug38999_2 set bug38999_1.a=bug38999_1.a+100;
 
6
select * from bug38999_1;
 
7
a       b
 
8
101     1
 
9
102     2
 
10
103     3
 
11
104     4
 
12
105     5
 
13
106     6
 
14
107     7
 
15
108     8
 
16
109     9
 
17
110     10
 
18
111     11
 
19
112     12
 
20
update bug38999_1,bug38999_2 set bug38999_1.a=bug38999_1.a+100 where bug38999_1.a=101;
 
21
select * from bug38999_1;
 
22
a       b
 
23
201     1
 
24
102     2
 
25
103     3
 
26
104     4
 
27
105     5
 
28
106     6
 
29
107     7
 
30
108     8
 
31
109     9
 
32
110     10
 
33
111     11
 
34
112     12
 
35
update bug38999_1,bug38999_2 set bug38999_1.b=bug38999_1.b+10 where bug38999_1.b=2;
 
36
select * from bug38999_1;
 
37
a       b
 
38
201     1
 
39
103     3
 
40
104     4
 
41
105     5
 
42
106     6
 
43
107     7
 
44
108     8
 
45
109     9
 
46
110     10
 
47
111     11
 
48
102     12
 
49
112     12
 
50
update bug38999_1,bug38999_2 set bug38999_1.b=bug38999_1.b+2,bug38999_2.b=bug38999_1.b+10 where bug38999_1.b between 3 and 5 and bug38999_1.a=bug38999_2.a+100;
 
51
select * from bug38999_1;
 
52
a       b
 
53
201     1
 
54
103     5
 
55
104     6
 
56
106     6
 
57
105     7
 
58
107     7
 
59
108     8
 
60
109     9
 
61
110     10
 
62
111     11
 
63
102     12
 
64
112     12
 
65
select * from bug38999_2;
 
66
a       b
 
67
1       1
 
68
2       2
 
69
6       6
 
70
7       7
 
71
8       8
 
72
9       9
 
73
3       13
 
74
4       14
 
75
5       15
 
76
drop table bug38999_1,bug38999_2;