summaryrefslogtreecommitdiff
path: root/mysql-test/r/subselect_sj_mat.result
diff options
context:
space:
mode:
authorSergey Petrunya <psergey@askmonty.org>2012-05-18 16:24:12 +0400
committerSergey Petrunya <psergey@askmonty.org>2012-05-18 16:24:12 +0400
commit02c4c5f735e65338f30f8fd08090a66a256b8220 (patch)
tree8dad89a832546e9af093f8fb86ba832bf056cbad /mysql-test/r/subselect_sj_mat.result
parent6d41fa0d54b7173cd5d700819e022f9c2690f5ec (diff)
downloadmariadb-git-02c4c5f735e65338f30f8fd08090a66a256b8220.tar.gz
BUG#1000269: Wrong result (extra rows) with semijoin+materialization, IN subqueries, join_cache_level>0
- make make_cond_after_sjm() correctly handle OR clauses where one branch refers to the semi-join table while the other branch refers to the non-semijoin table.
Diffstat (limited to 'mysql-test/r/subselect_sj_mat.result')
-rw-r--r--mysql-test/r/subselect_sj_mat.result13
1 files changed, 13 insertions, 0 deletions
diff --git a/mysql-test/r/subselect_sj_mat.result b/mysql-test/r/subselect_sj_mat.result
index 1f96932309d..45a3e951523 100644
--- a/mysql-test/r/subselect_sj_mat.result
+++ b/mysql-test/r/subselect_sj_mat.result
@@ -2026,6 +2026,19 @@ y
z
DROP VIEW v2;
DROP TABLE t1, t2;
+#
+# BUG#1000269: Wrong result (extra rows) with semijoin+materialization, IN subqueries, join_cache_level>0
+#
+CREATE TABLE t1 (a1 VARCHAR(1), a2 VARCHAR(1)) ENGINE=MyISAM;
+INSERT INTO t1 VALUES ('b','b'),('e','e');
+CREATE TABLE t2 (b1 VARCHAR(1), b2 VARCHAR(1), KEY(b1)) ENGINE=MyISAM;
+INSERT INTO t2 VALUES ('v','v'),('s','s'),('l','l'), ('y','y'),('c','c'),('i','i');
+SELECT * FROM t1, t2 WHERE b1 IN ( SELECT b2 FROM t2 WHERE b1 > 'o' ) AND ( b1 < 'l' OR a1 IN ('b','c') );
+a1 a2 b1 b2
+b b v v
+b b s s
+b b y y
+DROP TABLE t1,t2;
# This must be at the end:
set optimizer_switch=@subselect_sj_mat_tmp;
set join_cache_level=@save_join_cache_level;