diff options
author | Igor Babaev <igor@askmonty.org> | 2013-11-21 15:19:25 -0800 |
---|---|---|
committer | Igor Babaev <igor@askmonty.org> | 2013-11-21 15:19:25 -0800 |
commit | c0f31dc9f3e0a42911beb6655a40601d2fddfe8e (patch) | |
tree | eceda1a471f3179d772999bf15a77d282e226c45 /sql/item_cmpfunc.h | |
parent | f8a6ee59acb082678cf601a10cbe9c1152748242 (diff) | |
download | mariadb-git-c0f31dc9f3e0a42911beb6655a40601d2fddfe8e.tar.gz |
Another attempt to fix bug mdev-5103.
The earlier pushed fix for the bug was incomplete. It did not remove
the main cause of the problem: the function remove_eq_conds()
removed always true multiple equalities from any conjunct, but did not
adjust the list of them stored in Item_cond_and::cond_equal.current_level.
Simplified the test case for the bug and moved it to another test file.
The fix triggered changes in EXPLAIN EXTENDED for some queries.
Diffstat (limited to 'sql/item_cmpfunc.h')
-rw-r--r-- | sql/item_cmpfunc.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sql/item_cmpfunc.h b/sql/item_cmpfunc.h index d00f177fc8e..a5d6ec02ace 100644 --- a/sql/item_cmpfunc.h +++ b/sql/item_cmpfunc.h @@ -1695,6 +1695,12 @@ class Item_equal: public Item_bool_func the equal_items should be ignored. */ bool cond_false; + /* + This initially is set to FALSE. It becomes TRUE when this item is evaluated + as being always true. If the flag is TRUE the contents of the list + the equal_items should be ignored. + */ + bool cond_true; /* compare_as_dates=TRUE <-> constants equal to fields from equal_items must be compared as datetimes and not as strings. @@ -1725,7 +1731,6 @@ public: Item_equal(Item_equal *item_equal); /* Currently the const item is always the first in the list of equal items */ inline Item* get_const() { return with_const ? equal_items.head() : NULL; } - inline bool is_cond_true() { return equal_items.elements == 1; } void add_const(Item *c, Item *f = NULL); /** Add a non-constant item to the multiple equality */ void add(Item *f) { equal_items.push_back(f); } |