mirror of
https://github.com/MariaDB/server.git
synced 2025-01-18 04:53:01 +01:00
615cd4ff75
After merge fixes libmysql/libmysql.c: Fixed a bug in prepared statements error handling introduced by me on a recent patch mysql-test/r/delayed.result: Updated results mysql-test/t/delayed.test: Bigger timeout needed when using --ps-protocol (don't understand why yet) Added output of not_flushed_dealyed_rows for easier debugging sql/sql_base.cc: USE tables_share fix for prepared statements sql/sql_prepare.cc: After merge fix
38 lines
1.1 KiB
Text
38 lines
1.1 KiB
Text
#
|
|
# test of DELAYED insert and timestamps
|
|
# (Can't be tested with purify :( )
|
|
#
|
|
|
|
--disable_warnings
|
|
drop table if exists t1;
|
|
--enable_warnings
|
|
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);
|
|
--sleep 2
|
|
insert into t1 set a = 8,tmsp=19711006010203;
|
|
select * from t1 where tmsp=0;
|
|
select * from t1 where tmsp=19711006010203;
|
|
drop table t1;
|
|
|
|
#
|
|
# 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");
|
|
# 2 was not enough for --ps-protocol
|
|
--sleep 4
|
|
show status like 'not_flushed_delayed_rows';
|
|
select * from t1;
|
|
drop table t1;
|