summaryrefslogtreecommitdiff
path: root/mysql-test/r/subselect_sj.result
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/r/subselect_sj.result')
-rw-r--r--mysql-test/r/subselect_sj.result16
1 files changed, 16 insertions, 0 deletions
diff --git a/mysql-test/r/subselect_sj.result b/mysql-test/r/subselect_sj.result
index b5263163cb1..c76d40d1a5f 100644
--- a/mysql-test/r/subselect_sj.result
+++ b/mysql-test/r/subselect_sj.result
@@ -2793,6 +2793,22 @@ mysql
information_schema
DROP TABLE t1;
#
+# MDEV-5581: Server crashes in in JOIN::prepare on 2nd execution of PS with materialization+semijoin
+#
+CREATE TABLE t1 (a INT);
+INSERT INTO t1 VALUES (2),(3);
+CREATE TABLE t2 (b INT);
+INSERT INTO t2 VALUES (8),(9);
+CREATE TABLE t3 (c INT, INDEX(c));
+INSERT INTO t2 VALUES (5),(6);
+PREPARE stmt FROM
+"SELECT * FROM t1 WHERE ( 9, 5 ) IN ( SELECT b, COUNT(*) FROM t2 WHERE 1 IN ( SELECT MIN(c) FROM t3 ) )";
+EXECUTE stmt;
+a
+EXECUTE stmt;
+a
+DROP TABLE t1,t2,t3;
+#
# MySQL Bug#13340270: assertion table->sort.record_pointers == __null
#
CREATE TABLE t1 (