Skip to content

Commit 0a50e43

Browse files
author
Alexander Barkov
committed
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.
1 parent b21e7af commit 0a50e43

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

mysql-test/r/type_datetime.result

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -834,5 +834,13 @@ a b a b
834834
DEALLOCATE PREPARE stmt1;
835835
DROP TABLE t1,t2;
836836
#
837+
# MDEV-9374 having '2015-01-01 01:00:00.000001' > coalesce(NULL) returns true
838+
#
839+
CREATE TABLE t1 (c1 DATETIME(0));
840+
INSERT INTO t1 VALUES (NULL);
841+
SELECT * FROM t1 HAVING '2015-01-01 01:00:00.000001' > COALESCE(c1);
842+
c1
843+
DROP TABLE t1;
844+
#
837845
# End of 5.5 tests
838846
#

mysql-test/t/type_datetime.test

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -610,6 +610,14 @@ EXECUTE stmt1;
610610
DEALLOCATE PREPARE stmt1;
611611
DROP TABLE t1,t2;
612612

613+
--echo #
614+
--echo # MDEV-9374 having '2015-01-01 01:00:00.000001' > coalesce(NULL) returns true
615+
--echo #
616+
CREATE TABLE t1 (c1 DATETIME(0));
617+
INSERT INTO t1 VALUES (NULL);
618+
SELECT * FROM t1 HAVING '2015-01-01 01:00:00.000001' > COALESCE(c1);
619+
DROP TABLE t1;
620+
613621
--echo #
614622
--echo # End of 5.5 tests
615623
--echo #

0 commit comments

Comments
 (0)