summaryrefslogtreecommitdiff
path: root/sql/item_cmpfunc.h
diff options
context:
space:
mode:
authorunknown <sanja@askmonty.org>2013-11-11 16:40:46 +0200
committerunknown <sanja@askmonty.org>2013-11-11 16:40:46 +0200
commitc85db2c4943b644c34cc4c67a95cfb5e5f0a09a4 (patch)
tree31a00735fded4bba3b8a833c4a7925a607f48559 /sql/item_cmpfunc.h
parent542ce5a068f2139c5b57ace8ba15b425fb570703 (diff)
downloadmariadb-git-c85db2c4943b644c34cc4c67a95cfb5e5f0a09a4.tar.gz
MDEV-5103: server crashed on singular Item_equal
Singular Item_equal support added. The problem was that during constant table substitution Item_equal become containing only one constant which was not supported internally.
Diffstat (limited to 'sql/item_cmpfunc.h')
-rw-r--r--sql/item_cmpfunc.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/sql/item_cmpfunc.h b/sql/item_cmpfunc.h
index c1ef680f3ee..cdb4963e857 100644
--- a/sql/item_cmpfunc.h
+++ b/sql/item_cmpfunc.h
@@ -1725,6 +1725,7 @@ 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); }