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

« back to all changes in this revision

Viewing changes to mysql-test/suite/rpl/r/rpl_insert_ignore.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
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;