summaryrefslogtreecommitdiff
path: root/mysql-test/t/subselect_sj.test
diff options
context:
space:
mode:
authorSergey Petrunya <psergey@askmonty.org>2011-07-05 21:48:50 +0400
committerSergey Petrunya <psergey@askmonty.org>2011-07-05 21:48:50 +0400
commit9e95a54793920ade348399a74a1e39ea3a27b635 (patch)
tree1abd88d199fd104a4b0501d7cf9af911232aea3b /mysql-test/t/subselect_sj.test
parentd93b4c539449e951e25f6c0b1e606040a02c58ad (diff)
parent05d54b121ca06e54050f4ca818aca56ca5e80890 (diff)
downloadmariadb-git-9e95a54793920ade348399a74a1e39ea3a27b635.tar.gz
Merge fix for BUG#803365
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 46c8306e144..c389a4dda97 100644
--- a/mysql-test/t/subselect_sj.test
+++ b/mysql-test/t/subselect_sj.test
@@ -1398,5 +1398,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=@subselect_sj_tmp;