Browse Source

MDEV-8456 Dead code in Item_cond::fix_fields() and Item_func_between::fix_fields()

pull/88/merge
Alexander Barkov 10 years ago
parent
commit
657f8a8d60
  1. 12
      sql/item_cmpfunc.cc
  2. 1
      sql/item_cmpfunc.h
  3. 2
      sql/sql_lex.h

12
sql/item_cmpfunc.cc

@ -2151,17 +2151,6 @@ longlong Item_func_interval::val_int()
1 got error
*/
bool Item_func_between::fix_fields(THD *thd, Item **ref)
{
if (Item_func_opt_neg::fix_fields(thd, ref))
return 1;
thd->lex->current_select->between_count++;
return 0;
}
bool Item_func_between::eval_not_null_tables(uchar *opt_arg)
{
@ -4344,7 +4333,6 @@ Item_cond::fix_fields(THD *thd, Item **ref)
if (item->maybe_null)
maybe_null=1;
}
thd->lex->current_select->cond_count+= list.elements;
fix_length_and_dec();
fixed= 1;
return FALSE;

1
sql/item_cmpfunc.h

@ -645,7 +645,6 @@ public:
longlong val_int();
enum Functype functype() const { return BETWEEN; }
const char *func_name() const { return "between"; }
bool fix_fields(THD *, Item **);
void fix_length_and_dec();
virtual void print(String *str, enum_query_type query_type);
CHARSET_INFO *compare_collation() const { return cmp_collation.collation; }

2
sql/sql_lex.h

@ -801,7 +801,7 @@ public:
list during split_sum_func
*/
uint select_n_having_items;
uint cond_count; /* number of arguments of and/or/xor in where/having/on */
uint cond_count; /* number of sargable Items in where/having/on */
uint between_count; /* number of between predicates in where/having/on */
uint max_equal_elems; /* maximal number of elements in multiple equalities */
/*

Loading…
Cancel
Save