diff options
author | Sergey Petrunya <psergey@askmonty.org> | 2014-04-07 13:49:48 +0400 |
---|---|---|
committer | Sergey Petrunya <psergey@askmonty.org> | 2014-04-07 13:49:48 +0400 |
commit | 2bbca99018422b80306443a93f524a2d58373ecd (patch) | |
tree | 79ab0b41df5b90d8d6521686a1490c6548f3441d /mysql-test/r/subselect_no_scache.result | |
parent | a7962ea53e74cf2bca5efbd8f9e9b77526644261 (diff) | |
download | mariadb-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_scache.result')
-rw-r--r-- | mysql-test/r/subselect_no_scache.result | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mysql-test/r/subselect_no_scache.result b/mysql-test/r/subselect_no_scache.result index 6b7dbb7baf1..ea11c39ab65 100644 --- a/mysql-test/r/subselect_no_scache.result +++ b/mysql-test/r/subselect_no_scache.result @@ -4974,7 +4974,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 |