1
0
mirror of https://github.com/MariaDB/server.git synced 2026-01-06 05:22:24 +03:00

MDEV-6239: Partition pruning is not working as expected in an inner query

- Make partition pruning work for tables inside semi-join nests
  (the new condition is the same that range optimizer uses so 
   it should be ok)
This commit is contained in:
Sergey Petrunya
2014-05-29 02:25:37 +04:00
parent 8bdda78c82
commit d533a64bf3
3 changed files with 111 additions and 1 deletions

View File

@@ -1140,7 +1140,8 @@ JOIN::optimize()
part of the nested outer join, and we can't do partition pruning
(TODO: check if this limitation can be lifted)
*/
if (!tbl->embedding)
if (!tbl->embedding ||
(tbl->embedding && tbl->embedding->sj_on_expr))
{
Item *prune_cond= tbl->on_expr? tbl->on_expr : conds;
tbl->table->no_partitions_used= prune_partitions(thd, tbl->table,