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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user