summaryrefslogtreecommitdiff
path: root/mysql-test/include
diff options
context:
space:
mode:
authorunknown <timour@askmonty.org>2010-10-23 21:28:58 +0300
committerunknown <timour@askmonty.org>2010-10-23 21:28:58 +0300
commitf670b6d22f55401d4329f9ac9827a5145d1dd667 (patch)
treef5a53db81b6e920d903adb31eef8495ac9cdb554 /mysql-test/include
parente85a4cb6b58b92f324f661d7bb78e6a5f90da883 (diff)
downloadmariadb-git-f670b6d22f55401d4329f9ac9827a5145d1dd667.tar.gz
MWL#89: Cost-based choice between Materialization and IN->EXISTS transformation
Added missing logic to handle the case when subquery tables are optimized away early during optimization.
Diffstat (limited to 'mysql-test/include')
-rw-r--r--mysql-test/include/subselect_mat_cost.inc12
1 files changed, 6 insertions, 6 deletions
diff --git a/mysql-test/include/subselect_mat_cost.inc b/mysql-test/include/subselect_mat_cost.inc
index 4ccbd08693a..04b116e9527 100644
--- a/mysql-test/include/subselect_mat_cost.inc
+++ b/mysql-test/include/subselect_mat_cost.inc
@@ -123,13 +123,13 @@ select a1 from t1 where a1 in (select b1 from t2 where b1 = b2 and b2 = '1 - 03'
-- echo /* E.5 opt_sum_query detects no matching min/max row or substitutes MIN/MAX with a const. */
-- echo TODO this test produces wrong result due to missing logic to handle the case
-- echo when JOIN::optimize detects an empty subquery result.
-#explain
-#select a1 from t1 where a1 in (select max(b1) from t2);
-#select a1 from t1 where a1 in (select max(b1) from t2);
+explain
+select a1 from t1 where a1 in (select max(b1) from t2);
+select a1 from t1 where a1 in (select max(b1) from t2);
-- echo
-#explain
-#select a1 from t1 where a1 in (select max(b1) from t2 where b1 = '7 - 02');
-#select a1 from t1 where a1 in (select max(b1) from t2 where b1 = '7 - 02');
+explain
+select a1 from t1 where a1 in (select max(b1) from t2 where b1 = '7 - 02');
+select a1 from t1 where a1 in (select max(b1) from t2 where b1 = '7 - 02');
-- echo /* E.6 make_join_select detects impossible WHERE. *