summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mysql-test/r/func_time.result8
-rw-r--r--mysql-test/t/func_time.test5
2 files changed, 13 insertions, 0 deletions
diff --git a/mysql-test/r/func_time.result b/mysql-test/r/func_time.result
index 1c3d69c6a6b..19877b17901 100644
--- a/mysql-test/r/func_time.result
+++ b/mysql-test/r/func_time.result
@@ -3436,5 +3436,13 @@ f
4
DROP TABLE t1;
#
+# MDEV-18667 ASAN heap-use-after-free in make_date_time / Arg_comparator::compare_string / Item_func_nullif::compare
+#
+SELECT NULLIF('foo', FROM_UNIXTIME('2012-12-12 12:12:12', TRIM(0)));
+NULLIF('foo', FROM_UNIXTIME('2012-12-12 12:12:12', TRIM(0)))
+foo
+Warnings:
+Warning 1292 Truncated incorrect DECIMAL value: '2012-12-12 12:12:12'
+#
# End of 10.1 tests
#
diff --git a/mysql-test/t/func_time.test b/mysql-test/t/func_time.test
index 12356ff3646..05c19a9730a 100644
--- a/mysql-test/t/func_time.test
+++ b/mysql-test/t/func_time.test
@@ -1923,6 +1923,11 @@ INSERT INTO t1 VALUES ('1900-01-01');
SELECT LENGTH( DATE_FORMAT( d, BINARY DATABASE() ) ) AS f FROM t1 GROUP BY d;
DROP TABLE t1;
+--echo #
+--echo # MDEV-18667 ASAN heap-use-after-free in make_date_time / Arg_comparator::compare_string / Item_func_nullif::compare
+--echo #
+
+SELECT NULLIF('foo', FROM_UNIXTIME('2012-12-12 12:12:12', TRIM(0)));
--echo #
--echo # End of 10.1 tests