diff options
author | Nirbhay Choubey <nirbhay@mariadb.com> | 2017-01-18 11:44:47 -0500 |
---|---|---|
committer | Nirbhay Choubey <nirbhay@mariadb.com> | 2017-01-18 11:44:47 -0500 |
commit | a3a91332d006fd39a32e1f6d4663e11515ea944b (patch) | |
tree | 560c152c9f8146a4c1bcd52ad2a2fa454be48aec /mysql-test/t/null.test | |
parent | 2805baf06c31dac21604148ec089300461790e3d (diff) | |
download | mariadb-git-bb-10.2-mdev7635.saved.tar.gz |
MDEV-7635: Update tests to adapt to the new default sql_modebb-10.2-mdev7635.savedbb-10.2-mdev7635.final
Diffstat (limited to 'mysql-test/t/null.test')
-rw-r--r-- | mysql-test/t/null.test | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/mysql-test/t/null.test b/mysql-test/t/null.test index 072038fae50..7aa5e909bff 100644 --- a/mysql-test/t/null.test +++ b/mysql-test/t/null.test @@ -60,6 +60,7 @@ drop table t1; # # Test inserting and updating with NULL # +set sql_mode='NO_ENGINE_SUBSTITUTION'; CREATE TABLE t1 (a varchar(16) NOT NULL default '', b smallint(6) NOT NULL default 0, c datetime NOT NULL default '0000-00-00 00:00:00', d smallint(6) NOT NULL default 0); INSERT INTO t1 SET a = "", d= "2003-01-14 03:54:55"; UPDATE t1 SET d=1/NULL; @@ -86,6 +87,7 @@ INSERT INTO t1 (d) values (1/null); INSERT INTO t1 (d) values (null),(null); select * from t1; drop table t1; +set sql_mode=default; # # Test to check elimination of IS NULL predicate for a non-nullable attribute @@ -118,7 +120,9 @@ insert into t1 select i*2 from t1; insert into t1 values(null); explain select * from t1 where i=2 or i is null; select count(*) from t1 where i=2 or i is null; +set sql_mode='NO_ENGINE_SUBSTITUTION'; alter table t1 change i i int not null; +set sql_mode=default; explain select * from t1 where i=2 or i is null; select count(*) from t1 where i=2 or i is null; drop table t1; @@ -335,6 +339,7 @@ DROP TABLE t1,t2; --error ER_CANT_AGGREGATE_2COLLATIONS SELECT NULLIF(_latin1'a' COLLATE latin1_general_ci, _latin1'a' COLLATE latin1_bin); +set sql_mode='NO_ENGINE_SUBSTITUTION'; CREATE TABLE t1 AS SELECT NULLIF(1,1), NULLIF(1,1.0), @@ -398,6 +403,8 @@ CREATE TABLE t1 AS SELECT SHOW CREATE TABLE t1; DROP TABLE t1; +set sql_mode=default; + CREATE TABLE t1 ( c_tinyint TINYINT, @@ -862,12 +869,14 @@ EXPLAIN EXTENDED SELECT * FROM t1 WHERE a=2010 AND CASE WHEN 10.1=a THEN NULL EL DROP TABLE t1; --echo # Two warnings expected +set sql_mode='NO_ENGINE_SUBSTITUTION'; CREATE TABLE t1 AS SELECT NULLIF(TIMESTAMP'2001-01-01 00:00:00',1) AS a, CASE WHEN TIMESTAMP'2001-01-01 00:00:00'=1 THEN NULL ELSE TIMESTAMP'2001-01-01 00:00:00' END AS b; DROP TABLE t1; +set sql_mode=default; --echo # --echo # MDEV-8785 Wrong results for EXPLAIN EXTENDED...WHERE NULLIF(latin1_col, _utf8'a' COLLATE utf8_bin) IS NOT NULL |