summaryrefslogtreecommitdiff
path: root/mysql-test/r/null.result
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/r/null.result')
-rw-r--r--mysql-test/r/null.result19
1 files changed, 18 insertions, 1 deletions
diff --git a/mysql-test/r/null.result b/mysql-test/r/null.result
index d98b7f5e091..222ccc809b1 100644
--- a/mysql-test/r/null.result
+++ b/mysql-test/r/null.result
@@ -1559,7 +1559,7 @@ set names utf8;
create table t1 (f1 varchar(10));
insert into t1 values ('2015-12-31');
select power( timestamp( nullif( '2002-09-08', f1 ) ), 24 ) from t1;
-ERROR 22003: DOUBLE value is out of range in 'pow(cast((case when '2002-09-08' = '2015-12-31' then NULL else '2002-09-08' end) as datetime(6)),24)'
+ERROR 22003: DOUBLE value is out of range in 'pow(cast((case when '2002-09-08' = `test`.`t1`.`f1` then NULL else '2002-09-08' end) as datetime(6)),24)'
drop table t1;
CREATE TABLE t1 (f1 INT);
INSERT INTO t1 VALUES (1),(2);
@@ -1575,5 +1575,22 @@ SELECT * FROM t1 WHERE NULLIF(NULLIF(NULLIF(NULLIF(NULLIF(NULLIF(NULLIF(NULLIF(N
i
DROP TABLE t1;
#
+# MDEV-10236 Where expression with NOT function gives incorrect result
+#
+CREATE TABLE t1 (c1 INT);
+INSERT INTO t1 VALUES (1),(2),(3);
+EXPLAIN EXTENDED
+SELECT * FROM t1 WHERE ((c1 IS NOT NULL) >= (NOT TRUE)) IS NOT NULL;
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 3 100.00 Using where
+Warnings:
+Note 1003 select `test`.`t1`.`c1` AS `c1` from `test`.`t1` where (((`test`.`t1`.`c1` is not null) >= <cache>((not(1)))) is not null)
+SELECT * FROM t1 WHERE ((c1 IS NOT NULL) >= (NOT TRUE)) IS NOT NULL;
+c1
+1
+2
+3
+DROP TABLE t1;
+#
# End of 10.1 tests
#