summaryrefslogtreecommitdiff
path: root/mysql-test/main/type_timestamp.test
diff options
context:
space:
mode:
authorAlexander Barkov <bar@mariadb.com>2019-04-02 09:56:31 +0400
committerAlexander Barkov <bar@mariadb.com>2019-04-02 09:56:31 +0400
commit5201a1d080fe33e22ff467c107428c8a89c19e77 (patch)
tree338cfeca512d866fb2f30e742e15843c1111e36d /mysql-test/main/type_timestamp.test
parent1b4bb3b5bb2df01bd7ce1c8499d9cb79a62201c9 (diff)
downloadmariadb-git-5201a1d080fe33e22ff467c107428c8a89c19e77.tar.gz
MDEV-18240 Assertion `0' failed in Item_cache_timestamp::val_datetime_packed
Diffstat (limited to 'mysql-test/main/type_timestamp.test')
-rw-r--r--mysql-test/main/type_timestamp.test14
1 files changed, 14 insertions, 0 deletions
diff --git a/mysql-test/main/type_timestamp.test b/mysql-test/main/type_timestamp.test
index 2af7f8994ab..6360f0928f4 100644
--- a/mysql-test/main/type_timestamp.test
+++ b/mysql-test/main/type_timestamp.test
@@ -800,6 +800,20 @@ SELECT LEAD(d1,1) OVER(ORDER BY d1) FROM t1;
SELECT LAG(d1,1) OVER(ORDER BY d1) FROM t1;
DROP TABLE t1;
+--echo #
+--echo # MDEV-18240 Assertion `0' failed in Item_cache_timestamp::val_datetime_packed
+--echo #
+
+CREATE TABLE t1 (c1 timestamp);
+SELECT MIN(t1.c1) AS k1 FROM t1 HAVING (k1 >= ALL(SELECT 'a' UNION SELECT 'r'));
+SELECT * FROM t1 HAVING MIN(t1.c1) >= ALL(SELECT 'a' UNION SELECT 'r');
+DROP TABLE t1;
+
+CREATE TABLE t1 (c1 timestamp);
+INSERT INTO t1 VALUES ('2010-01-01 00:00:00');
+SELECT * FROM t1 HAVING MIN(t1.c1) >= ALL(SELECT '2010-01-01 10:00:00' UNION SELECT '2001-01-01 10:00:01');
+SELECT * FROM t1 HAVING MIN(t1.c1) >= ALL(SELECT '2000-01-01 10:00:00' UNION SELECT '2000-01-01 10:00:01');
+DROP TABLE t1;
--echo #
--echo # End of 10.4 tests