diff options
author | unknown <thek@adventure.(none)> | 2007-08-23 10:22:20 +0200 |
---|---|---|
committer | unknown <thek@adventure.(none)> | 2007-08-23 10:22:20 +0200 |
commit | 44d04c81acf75ae1ea0f81caa0698a7b49e77e22 (patch) | |
tree | ab64ed25fb3f04dd0f653d408fe5fbbdfec82ad4 /mysql-test/r/delayed.result | |
parent | e6701d746df9f4ed778fac78870c6639e4c84880 (diff) | |
download | mariadb-git-44d04c81acf75ae1ea0f81caa0698a7b49e77e22.tar.gz |
Bug#27358 INSERT DELAYED does not honour SQL_MODE of the client
SQL_MODE was ignored when a client issued INSERT DELAYED.
Some system settings weren't copied as intended when a record was saved for
a delayed insert.
mysql-test/r/delayed.result:
Added test case
mysql-test/t/delayed.test:
Added test case
sql/sql_insert.cc:
- Added two new variables (sql_mode, auto_increment_field_not_null) to support
SQL_MODE in INSERT DELAYED statements.
Diffstat (limited to 'mysql-test/r/delayed.result')
-rw-r--r-- | mysql-test/r/delayed.result | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/mysql-test/r/delayed.result b/mysql-test/r/delayed.result index b37679847be..5b56a6e27bc 100644 --- a/mysql-test/r/delayed.result +++ b/mysql-test/r/delayed.result @@ -255,3 +255,32 @@ CREATE TABLE t2(c1 INT) ENGINE=MERGE UNION=(t1); INSERT DELAYED INTO t2 VALUES(1); ERROR HY000: Table storage engine for 't2' doesn't have this option DROP TABLE t1, t2; +DROP TABLE IF EXISTS t1,t2; +SET SQL_MODE='NO_AUTO_VALUE_ON_ZERO'; +CREATE TABLE `t1` ( +`id` int(11) PRIMARY KEY auto_increment, +`f1` varchar(10) NOT NULL UNIQUE +); +INSERT DELAYED INTO t1 VALUES(0,"test1"); +SELECT * FROM t1; +id f1 +0 test1 +SET SQL_MODE='PIPES_AS_CONCAT'; +INSERT DELAYED INTO t1 VALUES(0,'a' || 'b'); +SELECT * FROM t1; +id f1 +0 test1 +1 ab +SET SQL_MODE='ERROR_FOR_DIVISION_BY_ZERO,STRICT_ALL_TABLES'; +INSERT DELAYED INTO t1 VALUES(mod(1,0),"test3"); +ERROR 22012: Division by 0 +CREATE TABLE t2 ( +`id` int(11) PRIMARY KEY auto_increment, +`f1` date +); +SET SQL_MODE='NO_ZERO_DATE,STRICT_ALL_TABLES,NO_ZERO_IN_DATE'; +INSERT DELAYED INTO t2 VALUES (0,'0000-00-00'); +ERROR 22007: Incorrect date value: '0000-00-00' for column 'f1' at row 1 +INSERT DELAYED INTO t2 VALUES (0,'2007-00-00'); +ERROR 22007: Incorrect date value: '2007-00-00' for column 'f1' at row 1 +DROP TABLE t1,t2; |