@@ -122,6 +122,8 @@ class Item_bool_func :public Item_int_func
122
122
Item_bool_func () :Item_int_func() {}
123
123
Item_bool_func (Item *a) :Item_int_func(a) {}
124
124
Item_bool_func (Item *a,Item *b) :Item_int_func(a,b) {}
125
+ Item_bool_func (Item *a, Item *b, Item *c) :Item_int_func(a, b, c) {}
126
+ Item_bool_func (List<Item> &list) :Item_int_func(list) { }
125
127
Item_bool_func (THD *thd, Item_bool_func *item) :Item_int_func(thd, item) {}
126
128
bool is_bool_func () { return 1 ; }
127
129
void fix_length_and_dec () { decimals=0 ; max_length=1 ; }
@@ -644,16 +646,16 @@ class Item_func_ne :public Item_bool_rowready_func2
644
646
645
647
*/
646
648
647
- class Item_func_opt_neg :public Item_int_func
649
+ class Item_func_opt_neg :public Item_bool_func
648
650
{
649
651
public:
650
652
bool negated; /* <=> the item represents NOT <func> */
651
653
bool pred_level; /* <=> [NOT] <func> is used on a predicate level */
652
654
public:
653
655
Item_func_opt_neg (Item *a, Item *b, Item *c)
654
- :Item_int_func (a, b, c), negated(0 ), pred_level(0 ) {}
656
+ :Item_bool_func (a, b, c), negated(0 ), pred_level(0 ) {}
655
657
Item_func_opt_neg (List<Item> &list)
656
- :Item_int_func (list), negated(0 ), pred_level(0 ) {}
658
+ :Item_bool_func (list), negated(0 ), pred_level(0 ) {}
657
659
public:
658
660
inline void negate () { negated= !negated; }
659
661
inline void top_level_item () { pred_level= 1 ; }
@@ -684,9 +686,7 @@ class Item_func_between :public Item_func_opt_neg
684
686
bool fix_fields (THD *, Item **);
685
687
void fix_length_and_dec ();
686
688
virtual void print (String *str, enum_query_type query_type);
687
- bool is_bool_func () { return 1 ; }
688
689
CHARSET_INFO *compare_collation () { return cmp_collation.collation ; }
689
- uint decimal_precision () const { return 1 ; }
690
690
bool eval_not_null_tables (uchar *opt_arg);
691
691
void fix_after_pullout (st_select_lex *new_parent, Item **ref);
692
692
bool count_sargable_conds (uchar *arg);
@@ -1352,7 +1352,6 @@ class Item_func_in :public Item_func_opt_neg
1352
1352
longlong val_int ();
1353
1353
bool fix_fields (THD *, Item **);
1354
1354
void fix_length_and_dec ();
1355
- uint decimal_precision () const { return 1 ; }
1356
1355
void cleanup ()
1357
1356
{
1358
1357
uint i;
@@ -1373,7 +1372,6 @@ class Item_func_in :public Item_func_opt_neg
1373
1372
enum Functype functype () const { return IN_FUNC; }
1374
1373
const char *func_name () const { return " IN " ; }
1375
1374
bool nulls_in_row ();
1376
- bool is_bool_func () { return 1 ; }
1377
1375
CHARSET_INFO *compare_collation () { return cmp_collation.collation ; }
1378
1376
bool eval_not_null_tables (uchar *opt_arg);
1379
1377
void fix_after_pullout (st_select_lex *new_parent, Item **ref);
0 commit comments