summaryrefslogtreecommitdiff
path: root/sql/item_cmpfunc.h
diff options
context:
space:
mode:
authorAlexander Barkov <bar@mariadb.org>2015-06-26 20:00:24 +0400
committerAlexander Barkov <bar@mariadb.org>2015-06-26 20:00:24 +0400
commitcb5f32ebe3b0c693c99d0e7c1b6bc5d6b0677f48 (patch)
tree3a40e2fc84f84ef8885ffce96a1f766e90d57b04 /sql/item_cmpfunc.h
parent40e5aceaff6bbf71ea212ff514dabb41a929d496 (diff)
downloadmariadb-git-cb5f32ebe3b0c693c99d0e7c1b6bc5d6b0677f48.tar.gz
Moving Item_func_xor out of Item_bool_func2, as it does not need
any of the optimizer related functionality.
Diffstat (limited to 'sql/item_cmpfunc.h')
-rw-r--r--sql/item_cmpfunc.h12
1 files changed, 9 insertions, 3 deletions
diff --git a/sql/item_cmpfunc.h b/sql/item_cmpfunc.h
index 21bc9796921..c19341c3ee1 100644
--- a/sql/item_cmpfunc.h
+++ b/sql/item_cmpfunc.h
@@ -284,6 +284,10 @@ public:
void reset_cache() { cache= NULL; }
};
+
+/*
+ Functions and operators with two arguments that can use range optimizer.
+*/
class Item_bool_func2 :public Item_bool_func
{ /* Bool with 2 string args */
public:
@@ -351,16 +355,18 @@ public:
};
/**
- XOR inherits from Item_bool_func2 because it is not optimized yet.
+ XOR inherits from Item_bool_func because it is not optimized yet.
Later, when XOR is optimized, it needs to inherit from
Item_cond instead. See WL#5800.
*/
-class Item_func_xor :public Item_bool_func2
+class Item_func_xor :public Item_bool_func
{
public:
- Item_func_xor(Item *i1, Item *i2) :Item_bool_func2(i1, i2) {}
+ Item_func_xor(Item *i1, Item *i2) :Item_bool_func(i1, i2) {}
enum Functype functype() const { return XOR_FUNC; }
const char *func_name() const { return "xor"; }
+ void print(String *str, enum_query_type query_type)
+ { Item_func::print_op(str, query_type); }
longlong val_int();
Item *neg_transformer(THD *thd);
bool subst_argument_checker(uchar **arg)