diff options
author | Alexander Barkov <bar@mariadb.com> | 2019-07-05 12:06:34 +0400 |
---|---|---|
committer | Alexander Barkov <bar@mariadb.com> | 2019-07-05 12:06:34 +0400 |
commit | be22d1ff39e79a9dbd5360f2f11b57de291d5366 (patch) | |
tree | d0c8998f776f352207cc4dad6c510c91965e64f1 | |
parent | 11f13bff21f8f1a0285f4d3f0db4b4252a9c7c7b (diff) | |
download | mariadb-git-be22d1ff39e79a9dbd5360f2f11b57de291d5366.tar.gz |
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)
-rw-r--r-- | mysql-test/r/type_datetime.result | 10 | ||||
-rw-r--r-- | mysql-test/t/type_datetime.test | 10 |
2 files changed, 20 insertions, 0 deletions
diff --git a/mysql-test/r/type_datetime.result b/mysql-test/r/type_datetime.result index bf09ec8d0eb..292c92422de 100644 --- a/mysql-test/r/type_datetime.result +++ b/mysql-test/r/type_datetime.result @@ -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 # diff --git a/mysql-test/t/type_datetime.test b/mysql-test/t/type_datetime.test index f16613d18a1..726510b74e8 100644 --- a/mysql-test/t/type_datetime.test +++ b/mysql-test/t/type_datetime.test @@ -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 # |