Commit c4e2ef73 authored by Michael Widenius's avatar Michael Widenius

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
parent af77c92d
......@@ -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)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment