summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
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);
};