Skip to content
Permalink
Browse files
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.
  • Loading branch information
abarkov committed Apr 30, 2019
1 parent 5fb6444 commit ba9f877
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
@@ -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 #

0 comments on commit ba9f877

Please sign in to comment.