Skip to content

Commit 4d4f2ed

Browse files
author
Alexander Barkov
committed
Moving Item_bool_func::add_key_fields_optimize_op() to Item_bool_func2.
It's now needed outside of Item_bool_func2 any more.
1 parent e04f6e7 commit 4d4f2ed

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

sql/item_cmpfunc.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -122,10 +122,6 @@ class Arg_comparator: public Sql_alloc
122122

123123
class Item_bool_func :public Item_int_func
124124
{
125-
protected:
126-
void add_key_fields_optimize_op(JOIN *join, KEY_FIELD **key_fields,
127-
uint *and_level, table_map usable_tables,
128-
SARGABLE_PARAM **sargables, bool equal_func);
129125
public:
130126
Item_bool_func() :Item_int_func() {}
131127
Item_bool_func(Item *a) :Item_int_func(a) {}
@@ -291,6 +287,10 @@ class Item_in_optimizer: public Item_bool_func
291287
class Item_bool_func2 :public Item_bool_func
292288
{ /* Bool with 2 string args */
293289
bool have_rev_func() const { return rev_functype() != UNKNOWN_FUNC; }
290+
protected:
291+
void add_key_fields_optimize_op(JOIN *join, KEY_FIELD **key_fields,
292+
uint *and_level, table_map usable_tables,
293+
SARGABLE_PARAM **sargables, bool equal_func);
294294
public:
295295
Item_bool_func2(Item *a,Item *b)
296296
:Item_bool_func(a,b) { }

sql/sql_select.cc

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4773,11 +4773,11 @@ Item_func_like::add_key_fields(JOIN *join, KEY_FIELD **key_fields,
47734773

47744774

47754775
void
4776-
Item_bool_func::add_key_fields_optimize_op(JOIN *join, KEY_FIELD **key_fields,
4777-
uint *and_level,
4778-
table_map usable_tables,
4779-
SARGABLE_PARAM **sargables,
4780-
bool equal_func)
4776+
Item_bool_func2::add_key_fields_optimize_op(JOIN *join, KEY_FIELD **key_fields,
4777+
uint *and_level,
4778+
table_map usable_tables,
4779+
SARGABLE_PARAM **sargables,
4780+
bool equal_func)
47814781
{
47824782
/* If item is of type 'field op field/constant' add it to key_fields */
47834783
if (is_local_field(args[0]))

0 commit comments

Comments
 (0)