Commit e90f8b7a authored by Alexander Barkov's avatar Alexander Barkov

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.
parent 2564650f
......@@ -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
......@@ -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
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment