From 09fb51255aea93025d782641906a552040d008c9 Mon Sep 17 00:00:00 2001 From: Alexander Barkov Date: Sat, 29 Aug 2015 18:45:04 +0400 Subject: [PATCH] Clean-up: removing duplicate code: removing Item_func_in::compare_collation() and Item_func_between::compare_collation(), and adding Item_func_opt_neg::compare_collation() instead. --- sql/item_cmpfunc.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sql/item_cmpfunc.h b/sql/item_cmpfunc.h index 58956ac8506..e6e8fdd0bb9 100644 --- a/sql/item_cmpfunc.h +++ b/sql/item_cmpfunc.h @@ -707,6 +707,7 @@ public: return this; } bool eq(const Item *item, bool binary_cmp) const; + CHARSET_INFO *compare_collation() const { return cmp_collation.collation; } Item* propagate_equal_fields(THD *thd, const Context &ctx, COND_EQUAL *cond) { Item_args::propagate_equal_fields(thd, @@ -733,7 +734,6 @@ public: const char *func_name() const { return "between"; } void fix_length_and_dec(); virtual void print(String *str, enum_query_type query_type); - CHARSET_INFO *compare_collation() const { return cmp_collation.collation; } bool eval_not_null_tables(uchar *opt_arg); void fix_after_pullout(st_select_lex *new_parent, Item **ref); bool count_sargable_conds(uchar *arg); @@ -1396,7 +1396,6 @@ public: enum Functype functype() const { return IN_FUNC; } const char *func_name() const { return " IN "; } bool nulls_in_row(); - CHARSET_INFO *compare_collation() const { return cmp_collation.collation; } bool eval_not_null_tables(uchar *opt_arg); void fix_after_pullout(st_select_lex *new_parent, Item **ref); bool count_sargable_conds(uchar *arg);