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;