Skip to content

Commit

Permalink
MDEV-9374 having '2015-01-01 01:00:00.000001' > coalesce(NULL) return…
Browse files Browse the repository at this point in the history
…s true

The problem was earlier fixed by the patch for MDEV-9521.
Adding tests only.
  • Loading branch information
Alexander Barkov committed Jun 16, 2016
1 parent b21e7af commit 0a50e43
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
8 changes: 8 additions & 0 deletions mysql-test/r/type_datetime.result
Original file line number Diff line number Diff line change
Expand Up @@ -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
#
8 changes: 8 additions & 0 deletions mysql-test/t/type_datetime.test
Original file line number Diff line number Diff line change
Expand Up @@ -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 #

0 comments on commit 0a50e43

Please sign in to comment.