2000-12-28 03:56:38 +02:00
|
|
|
#
|
|
|
|
# test of DELAYED insert and timestamps
|
|
|
|
# (Can't be tested with purify :( )
|
|
|
|
#
|
|
|
|
|
2006-02-24 18:34:15 +02:00
|
|
|
# This tests not performed with embedded server
|
|
|
|
-- source include/not_embedded.inc
|
|
|
|
|
2003-01-06 01:48:59 +02:00
|
|
|
--disable_warnings
|
2002-08-30 21:32:59 +03:00
|
|
|
drop table if exists t1;
|
2003-01-06 01:48:59 +02:00
|
|
|
--enable_warnings
|
2000-12-28 03:56:38 +02: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 11:35:23 +04:00
|
|
|
--sleep 2
|
2000-12-28 03:56:38 +02: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 21:49:15 +02: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 16:59:29 +02:00
|
|
|
# 2 was not enough for --ps-protocol
|
|
|
|
--sleep 4
|
|
|
|
show status like 'not_flushed_delayed_rows';
|
2001-03-08 21:49:15 +02:00
|
|
|
select * from t1;
|
|
|
|
drop table t1;
|
2005-07-28 03:22:47 +03:00
|
|
|
|
|
|
|
# End of 4.1 tests
|
2005-08-01 17:00:03 -07:00
|
|
|
|
|
|
|
#
|
|
|
|
# Bug #12226: Crash when a delayed insert fails due to a duplicate key
|
|
|
|
#
|
|
|
|
create table t1 (a int not null primary key);
|
|
|
|
insert into t1 values (1);
|
|
|
|
insert delayed into t1 values (1);
|
|
|
|
select * from t1;
|
|
|
|
drop table t1;
|