summaryrefslogtreecommitdiff
path: root/mysql-test/t/subselect_sj.test
diff options
context:
space:
mode:
authorSergey Petrunya <psergey@askmonty.org>2011-07-05 21:22:13 +0400
committerSergey Petrunya <psergey@askmonty.org>2011-07-05 21:22:13 +0400
commit05d54b121ca06e54050f4ca818aca56ca5e80890 (patch)
tree39ee3d47df7d0d88c0709344e980129e0087c45e /mysql-test/t/subselect_sj.test
parent85fb8bb4666f2db662fa580b6bd959508010fa42 (diff)
downloadmariadb-git-05d54b121ca06e54050f4ca818aca56ca5e80890.tar.gz
BUG#803365: Crash in pull_out_semijoin_tables with outer join + semijoin + derived tables in maria-5.3 with WL#106
- Don't perform table pullout out of semi-join nests that have nested outer joins.
Diffstat (limited to 'mysql-test/t/subselect_sj.test')
-rw-r--r--mysql-test/t/subselect_sj.test26
1 files changed, 26 insertions, 0 deletions
diff --git a/mysql-test/t/subselect_sj.test b/mysql-test/t/subselect_sj.test
index 0c12cfd4be0..270f52d44b6 100644
--- a/mysql-test/t/subselect_sj.test
+++ b/mysql-test/t/subselect_sj.test
@@ -1395,5 +1395,31 @@ AND t1.f1 = t2.f1 ;
DROP TABLE t1, t2;
set optimizer_switch=@save_802965;
+--echo #
+--echo # BUG#803365: Crash in pull_out_semijoin_tables with outer join + semijoin + derived tables in maria-5.3 with WL#106
+--echo #
+CREATE TABLE t1 ( f1 int) ;
+INSERT INTO t1 VALUES (1),(1);
+
+CREATE TABLE t2 ( f2 int) ;
+INSERT INTO t2 VALUES (1),(1);
+
+CREATE TABLE t3 ( f3 int) ;
+INSERT INTO t3 VALUES (1),(1);
+
+SELECT *
+FROM t1
+WHERE t1.f1 IN (
+ SELECT t2.f2
+ FROM t2
+ LEFT JOIN (
+ SELECT *
+ FROM t3
+ ) AS alias1
+ ON alias1.f3 = t2.f2
+);
+
+DROP TABLE t1,t2,t3;
+
# The following command must be the last one the file
set @@optimizer_switch=@save_optimizer_switch;