30
30
# Test insert syntax
33
create table t1 (a int not null auto_increment, primary key (a), t timestamp, c char(10) default "hello", i int);
34
insert into t1 values (default,default,default,default), (default,default,default,default), (4,0,"a",5),(default,default,default,default);
35
select a,t>0,c,i from t1;
33
create table t1 (a int not null auto_increment, primary key (a), t timestamp null, c char(10) default "hello", i int);
34
insert into t1 values (default,default,default,default);
35
insert into t1 values (default,default,default,default);
36
--error 1685 # Bad timestamp
37
insert into t1 values (4,0,"a",5);
38
insert into t1 values (default,default,default,default);
39
select a,t is not null,c,i from t1;
37
41
insert into t1 set a=default,t=default,c=default;
38
42
insert into t1 set a=default,t=default,c=default,i=default;
39
insert into t1 set a=4,t=0,c="a",i=5;
40
insert into t1 set a=5,t=0,c="a",i=null;
43
insert into t1 set a=4,t= NULL,c="a",i=5;
44
insert into t1 set a=5,t= NULL,c="a",i=null;
41
45
insert into t1 set a=default,t=default,c=default,i=default;
42
select a,t>0,c,i from t1;
46
select a,t is not null,c,i from t1;
169
173
insert ignore into t1 values(NULL,100),(NULL,110),(NULL,120);
170
174
insert ignore into t1 values(NULL,10),(NULL,20),(NULL,110),(NULL,120),(NULL,100),(NULL,90);
171
175
insert ignore into t1 values(NULL,130),(NULL,140),(500,110),(550,120),(450,100),(NULL,150);
176
# PBXT differs from InnoDB here. Main reason is that inserting
177
# 500 causes auto inc value to be set to 501, this is never
178
# undone because of possible concurrent inserts.
172
179
select * from t1 order by id;