Adding tests for MDEV-17857 Assertion `tmp != ((long long) 0x8000000000000000LL)' failed in TIME_from_longlong_datetime_packed upon SELECT with GROUP BY

(they were forgotten in the previous commit)
This commit is contained in:
Alexander Barkov 2019-07-05 12:06:34 +04:00
parent 11f13bff21
commit be22d1ff39
2 changed files with 20 additions and 0 deletions

View file

@ -1146,5 +1146,15 @@ a
00:01:00
DROP TABLE t1;
#
# MDEV-17857 Assertion `tmp != ((long long) 0x8000000000000000LL)' failed in TIME_from_longlong_datetime_packed upon SELECT with GROUP BY
#
CREATE TABLE t1 (i INT, d DATETIME);
INSERT INTO t1 VALUES (3,NULL),(3,'1976-12-14 13:21:07'),(NULL,'1981-09-24 01:04:47');
SELECT ExtractValue('foo','bar'), i, MIN(d) FROM t1 GROUP BY i;
ExtractValue('foo','bar') i MIN(d)
NULL 1981-09-24 01:04:47
3 1976-12-14 13:21:07
DROP TABLE t1;
#
# End of 10.1 tests
#

View file

@ -700,6 +700,16 @@ SELECT 1 FROM t1 WHERE 20160101 > SOME (SELECT CAST(a AS DATETIME) FROM t1);
SELECT * FROM t1 WHERE 20160101 > CAST(a AS DATETIME);
DROP TABLE t1;
--echo #
--echo # MDEV-17857 Assertion `tmp != ((long long) 0x8000000000000000LL)' failed in TIME_from_longlong_datetime_packed upon SELECT with GROUP BY
--echo #
CREATE TABLE t1 (i INT, d DATETIME);
INSERT INTO t1 VALUES (3,NULL),(3,'1976-12-14 13:21:07'),(NULL,'1981-09-24 01:04:47');
SELECT ExtractValue('foo','bar'), i, MIN(d) FROM t1 GROUP BY i;
DROP TABLE t1;
--echo #
--echo # End of 10.1 tests
--echo #