Commit ba9f8776 authored by Alexander Barkov's avatar Alexander Barkov

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.
parent 5fb6444a
......@@ -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
#
......@@ -1903,6 +1903,16 @@ SELECT REPLACE(SUBSTR(CURDATE(),2,3), SUBSTR(CURDATE(),2,3), REPEAT('a',32)) AS
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 #
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