Skip to content

Commit 6b48bdf

Browse files
committed
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: f4019f5
1 parent e1e142e commit 6b48bdf

File tree

2 files changed

+25
-0
lines changed

2 files changed

+25
-0
lines changed

mysql-test/main/func_hybrid_type.result

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3915,5 +3915,20 @@ t1 CREATE TABLE `t1` (
39153915
DROP TABLE t1;
39163916
SET sql_mode=DEFAULT;
39173917
#
3918+
# MDEV-18456 Assertion `item->maybe_null' failed in Type_handler_temporal_result::make_sort_key
3919+
#
3920+
CREATE TABLE t1 (t TIME NOT NULL);
3921+
INSERT INTO t1 VALUES ('00:20:11'),('14:52:05');
3922+
SELECT GREATEST('9999', t) FROM t1 ORDER BY 1;
3923+
GREATEST('9999', t)
3924+
NULL
3925+
NULL
3926+
Warnings:
3927+
Warning 1292 Truncated incorrect time value: '9999'
3928+
Warning 1292 Truncated incorrect time value: '9999'
3929+
Warning 1292 Truncated incorrect time value: '9999'
3930+
Warning 1292 Truncated incorrect time value: '9999'
3931+
DROP TABLE t1;
3932+
#
39183933
# End of 10.3 tests
39193934
#

mysql-test/main/func_hybrid_type.test

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -710,6 +710,16 @@ SHOW CREATE TABLE t1;
710710
DROP TABLE t1;
711711
SET sql_mode=DEFAULT;
712712

713+
--echo #
714+
--echo # MDEV-18456 Assertion `item->maybe_null' failed in Type_handler_temporal_result::make_sort_key
715+
--echo #
716+
717+
CREATE TABLE t1 (t TIME NOT NULL);
718+
INSERT INTO t1 VALUES ('00:20:11'),('14:52:05');
719+
SELECT GREATEST('9999', t) FROM t1 ORDER BY 1;
720+
DROP TABLE t1;
721+
722+
713723
--echo #
714724
--echo # End of 10.3 tests
715725
--echo #

0 commit comments

Comments
 (0)