summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorAlexey Botchkov <holyfoot@askmonty.org>2016-10-25 10:09:33 +0400
committerAlexey Botchkov <holyfoot@askmonty.org>2016-10-25 10:09:33 +0400
commit201c1e0f299f115cda2361ae0535507393872318 (patch)
tree1378647f92b8b803c931dbe6c1da0e398de52563 /sql
parentb09b3161799e1e22b6cf3a434bc85e929939bc6c (diff)
downloadmariadb-git-201c1e0f299f115cda2361ae0535507393872318.tar.gz
MDEV-9143 JSON_xxx functions.
Item_bool fixed to behave smarter with NOT operation.
Diffstat (limited to 'sql')
-rw-r--r--sql/item.cc8
-rw-r--r--sql/item.h1
2 files changed, 9 insertions, 0 deletions
diff --git a/sql/item.cc b/sql/item.cc
index 448e34b89e3..2388679e424 100644
--- a/sql/item.cc
+++ b/sql/item.cc
@@ -2900,6 +2900,14 @@ void Item_int::print(String *str, enum_query_type query_type)
}
+Item *Item_bool::neg_transformer(THD *thd)
+{
+ value= !value;
+ name= 0;
+ return this;
+}
+
+
Item_uint::Item_uint(THD *thd, const char *str_arg, uint length):
Item_int(thd, str_arg, length)
{
diff --git a/sql/item.h b/sql/item.h
index 76442351d0d..ab70fdb7dc1 100644
--- a/sql/item.h
+++ b/sql/item.h
@@ -3008,6 +3008,7 @@ public:
Item_bool(THD *thd, const char *str_arg, longlong i):
Item_int(thd, str_arg, i, 1) {}
bool is_bool_type() { return true; }
+ Item *neg_transformer(THD *thd);
};