Commit 1aecd6e7 authored by Igor Babaev's avatar Igor Babaev

Merge

parents 46ea51ff 11eb7333
...@@ -5803,7 +5803,9 @@ void Item_equal::add_const(Item *c, Item *f) ...@@ -5803,7 +5803,9 @@ void Item_equal::add_const(Item *c, Item *f)
func->quick_fix_field(); func->quick_fix_field();
cond_false= !func->val_int(); cond_false= !func->val_int();
} }
if (cond_false) if (with_const && equal_items.elements == 1)
cond_true= TRUE;
if (cond_false || cond_true)
const_item_cache= 1; const_item_cache= 1;
} }
...@@ -6057,9 +6059,6 @@ void Item_equal::update_const() ...@@ -6057,9 +6059,6 @@ void Item_equal::update_const()
{ {
it.remove(); it.remove();
add_const(item); add_const(item);
if (equal_items.elements == 1)
cond_true= TRUE;
update_used_tables();
} }
} }
} }
......
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