Skip to content
Permalink
Browse files
Tests for MDEV-18595 Assertion `0' failed in Item_cache_timestamp::va…
…l_datetime_packed / Predicant_to_list_comparator::cmp_arg

The patch for MDEV-18240 fixed this problem earlier. Adding tests only.
  • Loading branch information
abarkov committed Apr 2, 2019
1 parent 5201a1d commit d8e936a
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
@@ -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 #

0 comments on commit d8e936a

Please sign in to comment.