summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Barkov <bar@mariadb.com>2019-04-30 11:10:03 +0400
committerAlexander Barkov <bar@mariadb.com>2019-04-30 11:10:53 +0400
commitba9f8776c2803ac6273499e5a0e069998a23c88b (patch)
treee9301abc1f0e5ce78c9dbe68300fe129f8318f1a
parent5fb6444a371a5d85c832e63c02e6e8eaec2769f7 (diff)
downloadmariadb-git-ba9f8776c2803ac6273499e5a0e069998a23c88b.tar.gz
Tests for MDEV-19359 ASAN heap-use-after-free in copy_if_not_alloced / make_sortkey
The patch for MDEV-18738 fixed this problem. Adding tests only.
-rw-r--r--mysql-test/r/func_str.result11
-rw-r--r--mysql-test/t/func_str.test10
2 files changed, 21 insertions, 0 deletions
diff --git a/mysql-test/r/func_str.result b/mysql-test/r/func_str.result
index 5f4f1378657..fe74336f9a7 100644
--- a/mysql-test/r/func_str.result
+++ b/mysql-test/r/func_str.result
@@ -4784,5 +4784,16 @@ f
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
DROP TABLE t1;
#
+# MDEV-19359 ASAN heap-use-after-free in copy_if_not_alloced / make_sortkey
+#
+CREATE TABLE t1 (a INT, b TIME, c TIME);
+INSERT INTO t1 VALUES (NULL,'22:56:45','22:56:45'),(4,'12:51:42','12:51:42');
+SELECT REPLACE( BINARY c, a, b ) f FROM t1 GROUP BY f WITH ROLLUP;
+f
+NULL
+12:51:12:51:422
+NULL
+DROP TABLE t1;
+#
# End of 10.1 tests
#
diff --git a/mysql-test/t/func_str.test b/mysql-test/t/func_str.test
index a6be48ad0fa..9e2694607ca 100644
--- a/mysql-test/t/func_str.test
+++ b/mysql-test/t/func_str.test
@@ -1904,5 +1904,15 @@ DROP TABLE t1;
--echo #
+--echo # MDEV-19359 ASAN heap-use-after-free in copy_if_not_alloced / make_sortkey
+--echo #
+
+CREATE TABLE t1 (a INT, b TIME, c TIME);
+INSERT INTO t1 VALUES (NULL,'22:56:45','22:56:45'),(4,'12:51:42','12:51:42');
+SELECT REPLACE( BINARY c, a, b ) f FROM t1 GROUP BY f WITH ROLLUP;
+DROP TABLE t1;
+
+
+--echo #
--echo # End of 10.1 tests
--echo #