summaryrefslogtreecommitdiff
path: root/mysql-test/r/subselect.result
diff options
context:
space:
mode:
authorIgor Babaev <igor@mysql.com>2008-07-26 13:44:07 -0700
committerIgor Babaev <igor@mysql.com>2008-07-26 13:44:07 -0700
commitb6e3a9e28c731429f4cdebc78cef580a8cf3a1f4 (patch)
tree5624517597214719e176ce95913c06ed2d598b07 /mysql-test/r/subselect.result
parentf5bbcba96f763d58dfd2d3e03d5c4dfd0b5f0eec (diff)
downloadmariadb-git-b6e3a9e28c731429f4cdebc78cef580a8cf3a1f4.tar.gz
Fixed bug #38191.
Calling List<Cached_item>::delete_elements for the same list twice caused a crash of the server in the function JOIN::cleaunup. Ensured that delete_elements() in JOIN::cleanup would be called only once. mysql-test/r/subselect.result: Added a test case for bug #38191. mysql-test/t/subselect.test: Added a test case for bug #38191. sql/sql_select.cc: Fixed bug #38191. Ensured that delete_elements() in JOIN::cleanup would be called only once.
Diffstat (limited to 'mysql-test/r/subselect.result')
-rw-r--r--mysql-test/r/subselect.result11
1 files changed, 11 insertions, 0 deletions
diff --git a/mysql-test/r/subselect.result b/mysql-test/r/subselect.result
index 12e3aac486e..c5bae840214 100644
--- a/mysql-test/r/subselect.result
+++ b/mysql-test/r/subselect.result
@@ -4396,4 +4396,15 @@ id select_type table type possible_keys key key_len ref rows Extra
Warnings:
Note 1003 select 1 AS `1` from `test`.`t1` where <in_optimizer>(1,<exists>(select 1 AS `1` from `test`.`t1` where (`test`.`t1`.`a` > 3) group by `test`.`t1`.`a` having (<cache>(1) = <ref_null_helper>(1))))
DROP TABLE t1;
+CREATE TABLE t1(pk int PRIMARY KEY, a int, INDEX idx(a));
+INSERT INTO t1 VALUES (1, 10), (3, 30), (2, 20);
+CREATE TABLE t2(pk int PRIMARY KEY, a int, b int, INDEX idxa(a));
+INSERT INTO t2 VALUES (2, 20, 700), (1, 10, 200), (4, 10, 100);
+SELECT * FROM t1
+WHERE EXISTS (SELECT DISTINCT a FROM t2 WHERE t1.a < t2.a ORDER BY b);
+pk a
+1 10
+3 30
+2 20
+DROP TABLE t1,t2;
End of 5.0 tests.