Commit 0a50e43e authored by Alexander Barkov's avatar Alexander Barkov

MDEV-9374 having '2015-01-01 01:00:00.000001' > coalesce(NULL) returns true

The problem was earlier fixed by the patch for MDEV-9521.
Adding tests only.
parent b21e7af2
......@@ -834,5 +834,13 @@ a b a b
DEALLOCATE PREPARE stmt1;
DROP TABLE t1,t2;
#
# MDEV-9374 having '2015-01-01 01:00:00.000001' > coalesce(NULL) returns true
#
CREATE TABLE t1 (c1 DATETIME(0));
INSERT INTO t1 VALUES (NULL);
SELECT * FROM t1 HAVING '2015-01-01 01:00:00.000001' > COALESCE(c1);
c1
DROP TABLE t1;
#
# End of 5.5 tests
#
......@@ -610,6 +610,14 @@ EXECUTE stmt1;
DEALLOCATE PREPARE stmt1;
DROP TABLE t1,t2;
--echo #
--echo # MDEV-9374 having '2015-01-01 01:00:00.000001' > coalesce(NULL) returns true
--echo #
CREATE TABLE t1 (c1 DATETIME(0));
INSERT INTO t1 VALUES (NULL);
SELECT * FROM t1 HAVING '2015-01-01 01:00:00.000001' > COALESCE(c1);
DROP TABLE t1;
--echo #
--echo # End of 5.5 tests
--echo #
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