2
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
5
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
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;
18
select * from t2 ORDER BY b;
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;
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;
56
select * from t1 ORDER BY a;
62
select * from t2 ORDER BY b;
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