summaryrefslogtreecommitdiff
path: root/mysql-test/r/subselect_no_opts.result
diff options
context:
space:
mode:
authorSergey Petrunya <psergey@askmonty.org>2014-04-07 13:49:48 +0400
committerSergey Petrunya <psergey@askmonty.org>2014-04-07 13:49:48 +0400
commit2bbca99018422b80306443a93f524a2d58373ecd (patch)
tree79ab0b41df5b90d8d6521686a1490c6548f3441d /mysql-test/r/subselect_no_opts.result
parenta7962ea53e74cf2bca5efbd8f9e9b77526644261 (diff)
downloadmariadb-git-2bbca99018422b80306443a93f524a2d58373ecd.tar.gz
MDEV-6041: ORDER BY+subqueries: subquery_table.key=outer_table.col is not recongized as binding
- Make JOIN::const_key_parts include keyparts for which the WHERE clause has an equality in form "t.key_part=reference_outside_this_select" - This allows to avoid filesort'ing in some cases (and also avoid a difficult choice between using filesort or using an index)
Diffstat (limited to 'mysql-test/r/subselect_no_opts.result')
-rw-r--r--mysql-test/r/subselect_no_opts.result2
1 files changed, 1 insertions, 1 deletions
diff --git a/mysql-test/r/subselect_no_opts.result b/mysql-test/r/subselect_no_opts.result
index 5083e23d461..28a72a52daa 100644
--- a/mysql-test/r/subselect_no_opts.result
+++ b/mysql-test/r/subselect_no_opts.result
@@ -4966,7 +4966,7 @@ SELECT t1.a, (SELECT 1 FROM t2 WHERE t2.b=t3.c AND t2.c=t1.a ORDER BY t2.d LIMIT
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1 index PRIMARY PRIMARY 4 NULL 2 Using index
1 PRIMARY t3 ref b,b_2 b 5 test.t1.a 1 Using index
-2 DEPENDENT SUBQUERY t2 ref b,b_2,c b 10 test.t3.c,test.t1.a 1 Using where; Using index; Using filesort
+2 DEPENDENT SUBQUERY t2 ref b,b_2,c b 10 test.t3.c,test.t1.a 1 Using where; Using index
SELECT t1.a, (SELECT 1 FROM t2 WHERE t2.b=t3.c AND t2.c=t1.a ORDER BY t2.d LIMIT 1) AS incorrect FROM t1, t3 WHERE t3.b=t1.a;
a incorrect
1 1