delayed.test 1.02 KB
Newer Older
1 2 3 4 5
#
# test of DELAYED insert and timestamps
# (Can't be tested with purify :( )
#

6
--disable_warnings
7
drop table if exists t1;
8
--enable_warnings
9 10 11 12 13 14 15 16
create table t1 (a char(10), tmsp timestamp);
insert into t1 set a = 1;
insert delayed into t1 set a = 2;
insert into t1 set a = 3, tmsp=NULL;
insert delayed into t1 set a = 4;
insert delayed into t1 set a = 5, tmsp = 19711006010203;
insert delayed into t1 (a, tmsp) values (6, 19711006010203);
insert delayed into t1 (a, tmsp) values (7, NULL);
17
--sleep 2
18 19 20 21
insert into t1 set a = 8,tmsp=19711006010203;
select * from t1 where tmsp=0;
select * from t1 where tmsp=19711006010203;
drop table t1;
22 23 24 25 26 27 28 29 30 31 32 33

#
# Test bug when inserting NULL into an auto_increment field with
# INSERT DELAYED
#

create table t1 (a int not null auto_increment primary key, b char(10));
insert delayed into t1 values (1,"b");
insert delayed into t1 values (null,"c");
insert delayed into t1 values (3,"d"),(null,"e");
--error 1136
insert delayed into t1 values (3,"this will give an","error");
34
--sleep 2
35 36
select * from t1;
drop table t1;