Skip to content

Commit 49c49e6

Browse files
committed
Tests for MDEV-18667 ASAN heap-use-after-free in make_date_time / Arg_comparator::compare_string / Item_func_nullif::compare
The patch for MDEV-14926 fixed MDEV-18667 as well. Adding tests only.
1 parent cb66cdc commit 49c49e6

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

mysql-test/r/func_time.result

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3436,5 +3436,13 @@ f
34363436
4
34373437
DROP TABLE t1;
34383438
#
3439+
# MDEV-18667 ASAN heap-use-after-free in make_date_time / Arg_comparator::compare_string / Item_func_nullif::compare
3440+
#
3441+
SELECT NULLIF('foo', FROM_UNIXTIME('2012-12-12 12:12:12', TRIM(0)));
3442+
NULLIF('foo', FROM_UNIXTIME('2012-12-12 12:12:12', TRIM(0)))
3443+
foo
3444+
Warnings:
3445+
Warning 1292 Truncated incorrect DECIMAL value: '2012-12-12 12:12:12'
3446+
#
34393447
# End of 10.1 tests
34403448
#

mysql-test/t/func_time.test

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1923,6 +1923,11 @@ INSERT INTO t1 VALUES ('1900-01-01');
19231923
SELECT LENGTH( DATE_FORMAT( d, BINARY DATABASE() ) ) AS f FROM t1 GROUP BY d;
19241924
DROP TABLE t1;
19251925

1926+
--echo #
1927+
--echo # MDEV-18667 ASAN heap-use-after-free in make_date_time / Arg_comparator::compare_string / Item_func_nullif::compare
1928+
--echo #
1929+
1930+
SELECT NULLIF('foo', FROM_UNIXTIME('2012-12-12 12:12:12', TRIM(0)));
19261931

19271932
--echo #
19281933
--echo # End of 10.1 tests

0 commit comments

Comments
 (0)