~linuxjedi/drizzle/trunk-bug-667053

« back to all changes in this revision

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

  • Committer: brian
  • Date: 2008-06-25 05:29:13 UTC
  • Revision ID: brian@localhost.localdomain-20080625052913-6upwo0jsrl4lnapl
clean slate

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(a int auto_increment, primary key(a));
 
8
create table t2(b int auto_increment, c int, primary key(b));
 
9
insert into t1 values (1),(2),(3);
 
10
insert into t1 values (null);
 
11
insert into t2 values (null,last_insert_id());
 
12
select * from t1 ORDER BY a;
 
13
a
 
14
1
 
15
2
 
16
3
 
17
4
 
18
select * from t2 ORDER BY b;
 
19
b       c
 
20
1       4
 
21
drop table t1;
 
22
drop table t2;
 
23
create table t1(a int auto_increment, key(a)) engine=innodb;
 
24
create table t2(b int auto_increment, c int, key(b), foreign key(b) references t1(a)) engine=innodb;
 
25
SET FOREIGN_KEY_CHECKS=0;
 
26
insert into t1 values (10);
 
27
insert into t1 values (null),(null),(null);
 
28
insert into t2 values (5,0);
 
29
insert into t2 values (null,last_insert_id());
 
30
SET FOREIGN_KEY_CHECKS=1;
 
31
select * from t1;
 
32
a
 
33
10
 
34
11
 
35
12
 
36
13
 
37
select * from t2;
 
38
b       c
 
39
5       0
 
40
6       11
 
41
drop table t2;
 
42
drop table t1;
 
43
create table t1(a int auto_increment, primary key(a));
 
44
create table t2(b int auto_increment, c int, primary key(b));
 
45
insert into t1 values (10);
 
46
insert into t1 values (null),(null),(null);
 
47
insert into t2 values (5,0);
 
48
insert into t2 (c) select * from t1 ORDER BY a;
 
49
select * from t2 ORDER BY b;
 
50
b       c
 
51
5       0
 
52
6       10
 
53
7       11
 
54
8       12
 
55
9       13
 
56
select * from t1 ORDER BY a;
 
57
a
 
58
10
 
59
11
 
60
12
 
61
13
 
62
select * from t2 ORDER BY b;
 
63
b       c
 
64
5       0
 
65
6       10
 
66
7       11
 
67
8       12
 
68
9       13
 
69
drop table t1;
 
70
drop table t2;
 
71
SET TIMESTAMP=1000000000;
 
72
CREATE TABLE t1 ( a INT UNIQUE );
 
73
SET FOREIGN_KEY_CHECKS=0;
 
74
INSERT INTO t1 VALUES (1),(1);
 
75
Got one of the listed errors
 
76
drop table t1;