From 59f099dda1d8dfae2a2f49c189d7e23ac73de016 Mon Sep 17 00:00:00 2001 From: Igor Babaev Date: Fri, 22 Nov 2013 13:13:03 -0800 Subject: Post-review changes of the patch for bug mdev-5103. --- sql/item_cmpfunc.cc | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'sql/item_cmpfunc.cc') diff --git a/sql/item_cmpfunc.cc b/sql/item_cmpfunc.cc index 27ce480a1dd..b0d9e6cfa3d 100644 --- a/sql/item_cmpfunc.cc +++ b/sql/item_cmpfunc.cc @@ -5574,7 +5574,9 @@ void Item_equal::add_const(Item *c, Item *f) func->quick_fix_field(); 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; } @@ -5814,9 +5816,6 @@ void Item_equal::update_const() { it.remove(); add_const(item); - if (equal_items.elements == 1) - cond_true= TRUE; - update_used_tables(); } } } -- cgit v1.2.1