Skip to content

Commit

Permalink
Clean-up: removing duplicate code: removing
Browse files Browse the repository at this point in the history
Item_func_in::compare_collation() and Item_func_between::compare_collation(),
and adding Item_func_opt_neg::compare_collation() instead.
  • Loading branch information
Alexander Barkov committed Aug 29, 2015
1 parent b4e56a5 commit 09fb512
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions sql/item_cmpfunc.h
Original file line number Diff line number Diff line change
Expand Up @@ -707,6 +707,7 @@ class Item_func_opt_neg :public Item_bool_func
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,
Expand All @@ -733,7 +734,6 @@ class Item_func_between :public Item_func_opt_neg
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);
Expand Down Expand Up @@ -1396,7 +1396,6 @@ class Item_func_in :public Item_func_opt_neg
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);
Expand Down

0 comments on commit 09fb512

Please sign in to comment.