mirror of
https://github.com/MariaDB/server.git
synced 2025-12-24 11:21:21 +03:00
Don't recalculate conditions that have already been checked.
This fixes the wrong result in tests like compress, join, join_cache, greedy_optimizer and select_pkeycache
This commit is contained in:
@@ -15045,6 +15045,8 @@ make_cond_for_table_from_pred(Item *root_cond, Item *cond,
|
||||
bool retain_ref_cond)
|
||||
|
||||
{
|
||||
if (used_table && !(cond->used_tables() & used_table))
|
||||
return (COND*) 0; // Already checked
|
||||
if (cond->type() == Item::COND_ITEM)
|
||||
{
|
||||
if (((Item_cond*) cond)->functype() == Item_func::COND_AND_FUNC)
|
||||
|
||||
Reference in New Issue
Block a user