~ubuntu-branches/ubuntu/maverick/mysql-5.1/maverick-proposed

« back to all changes in this revision

Viewing changes to mysql-test/suite/rpl/r/rpl_insert_ignore.result

  • Committer: Package Import Robot
  • Author(s): Marc Deslauriers
  • Date: 2012-02-22 14:16:05 UTC
  • mto: This revision was merged to the branch mainline in revision 20.
  • Revision ID: package-import@ubuntu.com-20120222141605-nxlu9yzc6attylc2
Tags: upstream-5.1.61
ImportĀ upstreamĀ versionĀ 5.1.61

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
 
CREATE TABLE t1 (
8
 
a int unsigned not null auto_increment primary key,
9
 
b int unsigned,
10
 
unique (b)
11
 
) ENGINE=innodb;
12
 
CREATE TABLE t2 (
13
 
a int unsigned, # to force INSERT SELECT to have a certain order
14
 
b int unsigned
15
 
) ENGINE=innodb;
16
 
INSERT INTO t1 VALUES (NULL, 1);
17
 
INSERT INTO t1 VALUES (NULL, 2);
18
 
INSERT INTO t1 VALUES (NULL, 3);
19
 
INSERT INTO t1 VALUES (NULL, 4);
20
 
INSERT INTO t2 VALUES (1, 1);
21
 
INSERT INTO t2 VALUES (2, 2);
22
 
INSERT INTO t2 VALUES (3, 5);
23
 
INSERT INTO t2 VALUES (4, 3);
24
 
INSERT INTO t2 VALUES (5, 4);
25
 
INSERT INTO t2 VALUES (6, 6);
26
 
INSERT IGNORE INTO t1 SELECT NULL, t2.b FROM t2 ORDER BY t2.a;
27
 
SELECT * FROM t1 ORDER BY a;
28
 
a       b
29
 
1       1
30
 
2       2
31
 
3       3
32
 
4       4
33
 
5       5
34
 
6       6
35
 
SELECT * FROM t1 ORDER BY a;
36
 
a       b
37
 
1       1
38
 
2       2
39
 
3       3
40
 
4       4
41
 
5       5
42
 
6       6
43
 
drop table t1;
44
 
CREATE TABLE t1 (
45
 
a int unsigned not null auto_increment primary key,
46
 
b int unsigned,
47
 
unique (b)
48
 
) ENGINE=myisam;
49
 
INSERT INTO t1 VALUES (1, 1);
50
 
INSERT INTO t1 VALUES (2, 2);
51
 
INSERT INTO t1 VALUES (3, 3);
52
 
INSERT INTO t1 VALUES (4, 4);
53
 
INSERT IGNORE INTO t1 SELECT NULL, t2.b FROM t2 ORDER BY t2.a;
54
 
SELECT * FROM t1 ORDER BY a;
55
 
a       b
56
 
1       1
57
 
2       2
58
 
3       3
59
 
4       4
60
 
5       5
61
 
6       6
62
 
SELECT * FROM t1 ORDER BY a;
63
 
a       b
64
 
1       1
65
 
2       2
66
 
3       3
67
 
4       4
68
 
5       5
69
 
6       6
70
 
drop table t1, t2;
 
1
include/master-slave.inc
 
2
[connection master]
 
3
CREATE TABLE t1 (
 
4
a int unsigned not null auto_increment primary key,
 
5
b int unsigned,
 
6
unique (b)
 
7
) ENGINE=innodb;
 
8
CREATE TABLE t2 (
 
9
a int unsigned, # to force INSERT SELECT to have a certain order
 
10
b int unsigned
 
11
) ENGINE=innodb;
 
12
INSERT INTO t1 VALUES (NULL, 1);
 
13
INSERT INTO t1 VALUES (NULL, 2);
 
14
INSERT INTO t1 VALUES (NULL, 3);
 
15
INSERT INTO t1 VALUES (NULL, 4);
 
16
INSERT INTO t2 VALUES (1, 1);
 
17
INSERT INTO t2 VALUES (2, 2);
 
18
INSERT INTO t2 VALUES (3, 5);
 
19
INSERT INTO t2 VALUES (4, 3);
 
20
INSERT INTO t2 VALUES (5, 4);
 
21
INSERT INTO t2 VALUES (6, 6);
 
22
INSERT IGNORE INTO t1 SELECT NULL, t2.b FROM t2 ORDER BY t2.a;
 
23
include/assert.inc [Count of elements in t1 should be 6.]
 
24
include/diff_tables.inc [master:test.t1 , slave:test.t1]
 
25
INSERT IGNORE INTO t1 SELECT NULL, t2.b FROM t2 ORDER BY t2.a;
 
26
include/assert.inc [Count of elements in t1 should be 6.]
 
27
include/assert.inc [In SBR or MIXED modes, the event in the binlog should be the same that was executed. In RBR mode, binlog position should stay unchanged.]
 
28
drop table t1, t2;
 
29
CREATE TABLE t1 (
 
30
a int unsigned not null auto_increment primary key,
 
31
b int unsigned,
 
32
unique (b)
 
33
) ENGINE=myisam;
 
34
CREATE TABLE t2 (
 
35
a int unsigned, # to force INSERT SELECT to have a certain order
 
36
b int unsigned
 
37
) ENGINE=myisam;
 
38
INSERT INTO t1 VALUES (NULL, 1);
 
39
INSERT INTO t1 VALUES (NULL, 2);
 
40
INSERT INTO t1 VALUES (NULL, 3);
 
41
INSERT INTO t1 VALUES (NULL, 4);
 
42
INSERT INTO t2 VALUES (1, 1);
 
43
INSERT INTO t2 VALUES (2, 2);
 
44
INSERT INTO t2 VALUES (3, 5);
 
45
INSERT INTO t2 VALUES (4, 3);
 
46
INSERT INTO t2 VALUES (5, 4);
 
47
INSERT INTO t2 VALUES (6, 6);
 
48
INSERT IGNORE INTO t1 SELECT NULL, t2.b FROM t2 ORDER BY t2.a;
 
49
include/assert.inc [Count of elements in t1 should be 6.]
 
50
include/diff_tables.inc [master:test.t1 , slave:test.t1]
 
51
INSERT IGNORE INTO t1 SELECT NULL, t2.b FROM t2 ORDER BY t2.a;
 
52
include/assert.inc [Count of elements in t1 should be 6.]
 
53
include/assert.inc [In SBR or MIXED modes, the event in the binlog should be the same that was executed. In RBR mode, binlog position should stay unchanged.]
 
54
drop table t1, t2;
 
55
include/rpl_end.inc