Commit d8e936a2 authored by Alexander Barkov's avatar Alexander Barkov

Tests for MDEV-18595 Assertion `0' failed in...

Tests for MDEV-18595 Assertion `0' failed in Item_cache_timestamp::val_datetime_packed / Predicant_to_list_comparator::cmp_arg

The patch for MDEV-18240 fixed this problem earlier. Adding tests only.
parent 5201a1d0
......@@ -1239,5 +1239,17 @@ c1
2010-01-01 00:00:00
DROP TABLE t1;
#
# MDEV-18595 Assertion `0' failed in Item_cache_timestamp::val_datetime_packed / Predicant_to_list_comparator::cmp_arg
#
CREATE TABLE t1 (t TIMESTAMP DEFAULT '1971-01-01 00:00:00', f INT);
INSERT INTO t1 VALUES ('1978-05-25 22:25:03',1),('2000-01-01 00:00:00',2);
SELECT * FROM t1 WHERE f IN (DEFAULT(t),1);
t f
1978-05-25 22:25:03 1
Warnings:
Warning 1292 Incorrect datetime value: '1' for column `test`.`t1`.`f` at row 1
Warning 1292 Incorrect datetime value: '2' for column `test`.`t1`.`f` at row 2
DROP TABLE t1;
#
# End of 10.4 tests
#
......@@ -815,6 +815,16 @@ SELECT * FROM t1 HAVING MIN(t1.c1) >= ALL(SELECT '2010-01-01 10:00:00' UNION SEL
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 # MDEV-18595 Assertion `0' failed in Item_cache_timestamp::val_datetime_packed / Predicant_to_list_comparator::cmp_arg
--echo #
CREATE TABLE t1 (t TIMESTAMP DEFAULT '1971-01-01 00:00:00', f INT);
INSERT INTO t1 VALUES ('1978-05-25 22:25:03',1),('2000-01-01 00:00:00',2);
SELECT * FROM t1 WHERE f IN (DEFAULT(t),1);
DROP TABLE t1;
--echo #
--echo # End of 10.4 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