Commit 6b48bdf2 authored by Alexander Barkov's avatar Alexander Barkov

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:

  f4019f5b
parent e1e142e7
......@@ -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
#
......@@ -710,6 +710,16 @@ SHOW CREATE TABLE t1;
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 #
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment