Skip to content

Commit be22d1f

Browse files
committed
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)
1 parent 11f13bf commit be22d1f

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

mysql-test/r/type_datetime.result

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1146,5 +1146,15 @@ a
11461146
00:01:00
11471147
DROP TABLE t1;
11481148
#
1149+
# MDEV-17857 Assertion `tmp != ((long long) 0x8000000000000000LL)' failed in TIME_from_longlong_datetime_packed upon SELECT with GROUP BY
1150+
#
1151+
CREATE TABLE t1 (i INT, d DATETIME);
1152+
INSERT INTO t1 VALUES (3,NULL),(3,'1976-12-14 13:21:07'),(NULL,'1981-09-24 01:04:47');
1153+
SELECT ExtractValue('foo','bar'), i, MIN(d) FROM t1 GROUP BY i;
1154+
ExtractValue('foo','bar') i MIN(d)
1155+
NULL 1981-09-24 01:04:47
1156+
3 1976-12-14 13:21:07
1157+
DROP TABLE t1;
1158+
#
11491159
# End of 10.1 tests
11501160
#

mysql-test/t/type_datetime.test

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -700,6 +700,16 @@ SELECT 1 FROM t1 WHERE 20160101 > SOME (SELECT CAST(a AS DATETIME) FROM t1);
700700
SELECT * FROM t1 WHERE 20160101 > CAST(a AS DATETIME);
701701
DROP TABLE t1;
702702

703+
704+
--echo #
705+
--echo # MDEV-17857 Assertion `tmp != ((long long) 0x8000000000000000LL)' failed in TIME_from_longlong_datetime_packed upon SELECT with GROUP BY
706+
--echo #
707+
708+
CREATE TABLE t1 (i INT, d DATETIME);
709+
INSERT INTO t1 VALUES (3,NULL),(3,'1976-12-14 13:21:07'),(NULL,'1981-09-24 01:04:47');
710+
SELECT ExtractValue('foo','bar'), i, MIN(d) FROM t1 GROUP BY i;
711+
DROP TABLE t1;
712+
703713
--echo #
704714
--echo # End of 10.1 tests
705715
--echo #

0 commit comments

Comments
 (0)