diff options
author | Igor Babaev <igor@askmonty.org> | 2013-11-22 18:38:13 -0800 |
---|---|---|
committer | Igor Babaev <igor@askmonty.org> | 2013-11-22 18:38:13 -0800 |
commit | 11eb7333f397c4edd0103db6871b784dc11eae1f (patch) | |
tree | 9fea762d0a5db04dc38586bd652409de7c0055b7 /sql/item_cmpfunc.cc | |
parent | eea310e498f3b7ac95a4492d48f04e08d3009412 (diff) | |
parent | 59f099dda1d8dfae2a2f49c189d7e23ac73de016 (diff) | |
download | mariadb-git-11eb7333f397c4edd0103db6871b784dc11eae1f.tar.gz |
Merge
Diffstat (limited to 'sql/item_cmpfunc.cc')
-rw-r--r-- | sql/item_cmpfunc.cc | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/sql/item_cmpfunc.cc b/sql/item_cmpfunc.cc index 06dc8ea436c..fa67b3e6afd 100644 --- a/sql/item_cmpfunc.cc +++ b/sql/item_cmpfunc.cc @@ -5692,7 +5692,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; } @@ -5946,9 +5948,6 @@ void Item_equal::update_const() { it.remove(); add_const(item); - if (equal_items.elements == 1) - cond_true= TRUE; - update_used_tables(); } } } |