summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Barkov <bar@mariadb.com>2019-08-05 15:25:31 +0400
committerAlexander Barkov <bar@mariadb.com>2019-08-05 15:25:31 +0400
commit6b48bdf269cb86e95e1655d28d2f32443918b4fa (patch)
tree186109f50c4e68f832d36d2783715ba2e90fb6c6
parente1e142e7fca77f24a26a789fd6116896391e852a (diff)
downloadmariadb-git-6b48bdf269cb86e95e1655d28d2f32443918b4fa.tar.gz
MDEV-18456 Assertion `item->maybe_null' failed in Type_handler_temporal_result::make_sort_key
Adding tests only. This problem was earlier fixed in 10.4 by MDEV-17325 and backported to 10.3 with this commit: f4019f5b3544a18f3ddf32df2c5214c3f8dabdce
-rw-r--r--mysql-test/main/func_hybrid_type.result15
-rw-r--r--mysql-test/main/func_hybrid_type.test10
2 files changed, 25 insertions, 0 deletions
diff --git a/mysql-test/main/func_hybrid_type.result b/mysql-test/main/func_hybrid_type.result
index c7ec29f1a49..c6b94ab61b0 100644
--- a/mysql-test/main/func_hybrid_type.result
+++ b/mysql-test/main/func_hybrid_type.result
@@ -3915,5 +3915,20 @@ t1 CREATE TABLE `t1` (
DROP TABLE t1;
SET sql_mode=DEFAULT;
#
+# MDEV-18456 Assertion `item->maybe_null' failed in Type_handler_temporal_result::make_sort_key
+#
+CREATE TABLE t1 (t TIME NOT NULL);
+INSERT INTO t1 VALUES ('00:20:11'),('14:52:05');
+SELECT GREATEST('9999', t) FROM t1 ORDER BY 1;
+GREATEST('9999', t)
+NULL
+NULL
+Warnings:
+Warning 1292 Truncated incorrect time value: '9999'
+Warning 1292 Truncated incorrect time value: '9999'
+Warning 1292 Truncated incorrect time value: '9999'
+Warning 1292 Truncated incorrect time value: '9999'
+DROP TABLE t1;
+#
# End of 10.3 tests
#
diff --git a/mysql-test/main/func_hybrid_type.test b/mysql-test/main/func_hybrid_type.test
index 9736485bb9f..7d986130d7f 100644
--- a/mysql-test/main/func_hybrid_type.test
+++ b/mysql-test/main/func_hybrid_type.test
@@ -711,5 +711,15 @@ DROP TABLE t1;
SET sql_mode=DEFAULT;
--echo #
+--echo # MDEV-18456 Assertion `item->maybe_null' failed in Type_handler_temporal_result::make_sort_key
+--echo #
+
+CREATE TABLE t1 (t TIME NOT NULL);
+INSERT INTO t1 VALUES ('00:20:11'),('14:52:05');
+SELECT GREATEST('9999', t) FROM t1 ORDER BY 1;
+DROP TABLE t1;
+
+
+--echo #
--echo # End of 10.3 tests
--echo #