summaryrefslogtreecommitdiff
path: root/mysql-test/r/subselect_no_scache.result
diff options
context:
space:
mode:
authorunknown <timour@askmonty.org>2012-06-05 17:25:10 +0300
committerunknown <timour@askmonty.org>2012-06-05 17:25:10 +0300
commitf1ab00891ad050711557c6cdc62b17fff896aed9 (patch)
tree31e8c967b17eece8c13679d9828ce7a822c7c616 /mysql-test/r/subselect_no_scache.result
parent265d5aaa2e240288fff98e7c129cf441728152f8 (diff)
downloadmariadb-git-f1ab00891ad050711557c6cdc62b17fff896aed9.tar.gz
Fixed bug lp:1000649
Analysis: When the method JOIN::choose_subquery_plan() decided to apply the IN-TO-EXISTS strategy, it set the unit and select_lex uncacheable flag to UNCACHEABLE_DEPENDENT_INJECTED unconditionally. As result, even if IN-TO-EXISTS injected non-correlated predicates, the subquery was still treated as correlated. Solution: Set the subquery as correlated only if the injected predicate(s) depend on the outer query.
Diffstat (limited to 'mysql-test/r/subselect_no_scache.result')
-rw-r--r--mysql-test/r/subselect_no_scache.result6
1 files changed, 3 insertions, 3 deletions
diff --git a/mysql-test/r/subselect_no_scache.result b/mysql-test/r/subselect_no_scache.result
index 6bbd8085731..253be05cc5b 100644
--- a/mysql-test/r/subselect_no_scache.result
+++ b/mysql-test/r/subselect_no_scache.result
@@ -1326,7 +1326,7 @@ SELECT 0 IN (SELECT 1 FROM t1 a);
EXPLAIN EXTENDED SELECT 0 IN (SELECT 1 FROM t1 a);
id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL No tables used
-2 DEPENDENT SUBQUERY NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
+2 SUBQUERY NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
Warnings:
Note 1003 select <in_optimizer>(0,<exists>(select 1 from `test`.`t1` `a` where (0 = 1))) AS `0 IN (SELECT 1 FROM t1 a)`
INSERT INTO t1 (pseudo) VALUES ('test1');
@@ -1336,7 +1336,7 @@ SELECT 0 IN (SELECT 1 FROM t1 a);
EXPLAIN EXTENDED SELECT 0 IN (SELECT 1 FROM t1 a);
id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL No tables used
-2 DEPENDENT SUBQUERY NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
+2 SUBQUERY NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
Warnings:
Note 1003 select <in_optimizer>(0,<exists>(select 1 from `test`.`t1` `a` where (0 = 1))) AS `0 IN (SELECT 1 FROM t1 a)`
drop table t1;
@@ -5323,7 +5323,7 @@ WHERE ('0') IN ( SELECT a FROM t1 GROUP BY a )
GROUP BY b;
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1 ALL NULL NULL NULL NULL 2 Using temporary; Using filesort
-2 DEPENDENT SUBQUERY t1 ALL NULL NULL NULL NULL 2 Using where
+2 SUBQUERY t1 ALL NULL NULL NULL NULL 2 Using where
SELECT b FROM t1
WHERE ('0') IN ( SELECT a FROM t1 GROUP BY a )
GROUP BY b;