From a721dcab8ec0ec5e89664416f8f220244867036c Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Sun, 27 Nov 2016 19:30:20 +0100 Subject: [PATCH] cleanup: Item_func_opt_neg::negate() remove redundant method --- sql/item_cmpfunc.h | 1 - sql/sql_yacc.yy | 6 ++---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/sql/item_cmpfunc.h b/sql/item_cmpfunc.h index c5c34fa9da7..8a0799b0f16 100644 --- a/sql/item_cmpfunc.h +++ b/sql/item_cmpfunc.h @@ -839,7 +839,6 @@ public: Item_func_opt_neg(THD *thd, List &list): Item_bool_func(thd, list), negated(0), pred_level(0) {} public: - inline void negate() { negated= !negated; } inline void top_level_item() { pred_level= 1; } bool is_top_level_item() const { return pred_level; } Item *neg_transformer(THD *thd) diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy index d6376777c62..77cd06a465a 100644 --- a/sql/sql_yacc.yy +++ b/sql/sql_yacc.yy @@ -9016,8 +9016,7 @@ predicate: Item_func_in *item= new (thd->mem_root) Item_func_in(thd, *$7); if (item == NULL) MYSQL_YYABORT; - item->negate(); - $$= item; + $$= item->neg_transformer(thd); } | bit_expr BETWEEN_SYM bit_expr AND_SYM predicate { @@ -9031,8 +9030,7 @@ predicate: item= new (thd->mem_root) Item_func_between(thd, $1, $4, $6); if (item == NULL) MYSQL_YYABORT; - item->negate(); - $$= item; + $$= item->neg_transformer(thd); } | bit_expr SOUNDS_SYM LIKE bit_expr {