MDEV-9413 "datetime >= coalesce(c1(NULL))" doesn't return expected NULL

The patch for MDEV-9521 earlier fixed the problem reported in MDEV-9413.
Only adding tests.
This commit is contained in:
Alexander Barkov 2016-04-20 11:11:13 +04:00
parent 2564650fb9
commit e90f8b7a68
2 changed files with 17 additions and 0 deletions

View File

@ -644,4 +644,13 @@ SELECT MAX(dt) = '2011-01-06 12:34:30' FROM t1;
MAX(dt) = '2011-01-06 12:34:30'
1
DROP TABLE t1;
#
# MDEV-9413 "datetime >= coalesce(c1(NULL))" doesn't return expected NULL
#
CREATE TABLE t1(c1 TIMESTAMP(6) NULL DEFAULT NULL);
INSERT INTO t1 VALUES(NULL);
SELECT c1, '2016-06-13 20:00:00.000003' >= COALESCE( c1 ) FROM t1;
c1 '2016-06-13 20:00:00.000003' >= COALESCE( c1 )
NULL NULL
DROP TABLE t1;
End of 5.5 tests

View File

@ -446,4 +446,12 @@ SELECT MAX(ts) = '2011-01-06 12:34:30' FROM t1;
SELECT MAX(dt) = '2011-01-06 12:34:30' FROM t1;
DROP TABLE t1;
--echo #
--echo # MDEV-9413 "datetime >= coalesce(c1(NULL))" doesn't return expected NULL
--echo #
CREATE TABLE t1(c1 TIMESTAMP(6) NULL DEFAULT NULL);
INSERT INTO t1 VALUES(NULL);
SELECT c1, '2016-06-13 20:00:00.000003' >= COALESCE( c1 ) FROM t1;
DROP TABLE t1;
--echo End of 5.5 tests