diff options
author | Alexander Barkov <bar@mariadb.org> | 2014-11-20 12:56:47 +0400 |
---|---|---|
committer | Alexander Barkov <bar@mariadb.org> | 2014-11-20 12:56:47 +0400 |
commit | 52b3d95f2a6408466ba89dbdbb45cea59027af49 (patch) | |
tree | 32fb343a8ca9f56f6c2eb3e5f5e1b72384e9de2b /sql | |
parent | 969f4918451324bf833836570c7b617456065840 (diff) | |
download | mariadb-git-52b3d95f2a6408466ba89dbdbb45cea59027af49.tar.gz |
Deriving Item_bool_func from Item_bool_func2.
Diffstat (limited to 'sql')
-rw-r--r-- | sql/item_cmpfunc.h | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/sql/item_cmpfunc.h b/sql/item_cmpfunc.h index 63fc739f328..87b19f489fd 100644 --- a/sql/item_cmpfunc.h +++ b/sql/item_cmpfunc.h @@ -364,7 +364,7 @@ public: virtual bool l_op() const { return 1; } }; -class Item_bool_func2 :public Item_int_func +class Item_bool_func2 :public Item_bool_func { /* Bool with 2 string args */ protected: Arg_comparator cmp; @@ -372,7 +372,7 @@ protected: public: Item_bool_func2(Item *a,Item *b) - :Item_int_func(a,b), cmp(tmp_arg, tmp_arg+1), + :Item_bool_func(a,b), cmp(tmp_arg, tmp_arg+1), abort_on_null(FALSE) { sargable= TRUE; } void fix_length_and_dec(); int set_cmp_func() @@ -389,14 +389,12 @@ public: } bool is_null() { return MY_TEST(args[0]->is_null() || args[1]->is_null()); } - bool is_bool_func() { return 1; } CHARSET_INFO *compare_collation() { return cmp.cmp_collation.collation; } - uint decimal_precision() const { return 1; } void top_level_item() { abort_on_null= TRUE; } Arg_comparator *get_comparator() { return &cmp; } void cleanup() { - Item_int_func::cleanup(); + Item_bool_func::cleanup(); cmp.cleanup(); } |