2000-12-28 02:56:38 +01:00
|
|
|
#
|
|
|
|
# test of DELAYED insert and timestamps
|
|
|
|
# (Can't be tested with purify :( )
|
|
|
|
#
|
|
|
|
|
2003-01-06 00:48:59 +01:00
|
|
|
--disable_warnings
|
2002-08-30 20:32:59 +02:00
|
|
|
drop table if exists t1;
|
2003-01-06 00:48:59 +01:00
|
|
|
--enable_warnings
|
2000-12-28 02:56:38 +01:00
|
|
|
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);
|
2004-12-14 08:35:23 +01:00
|
|
|
--sleep 2
|
2000-12-28 02:56:38 +01:00
|
|
|
insert into t1 set a = 8,tmsp=19711006010203;
|
|
|
|
select * from t1 where tmsp=0;
|
|
|
|
select * from t1 where tmsp=19711006010203;
|
|
|
|
drop table t1;
|
2001-03-08 20:49:15 +01:00
|
|
|
|
|
|
|
#
|
|
|
|
# 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");
|
2005-01-06 15:59:29 +01:00
|
|
|
# 2 was not enough for --ps-protocol
|
|
|
|
--sleep 4
|
|
|
|
show status like 'not_flushed_delayed_rows';
|
2001-03-08 20:49:15 +01:00
|
|
|
select * from t1;
|
|
|
|
drop table t1;
|