diff options
Diffstat (limited to 'sql/item_cmpfunc.h')
-rw-r--r-- | sql/item_cmpfunc.h | 184 |
1 files changed, 92 insertions, 92 deletions
diff --git a/sql/item_cmpfunc.h b/sql/item_cmpfunc.h index 7bab02db263..0a3339e7ffe 100644 --- a/sql/item_cmpfunc.h +++ b/sql/item_cmpfunc.h @@ -268,8 +268,8 @@ public: Item_func_istrue(THD *thd, Item *a): Item_func_truth(thd, a, true, true) {} ~Item_func_istrue() {} virtual const char* func_name() const { return "istrue"; } - Item *get_copy(THD *thd, MEM_ROOT *mem_root) - { return get_item_copy<Item_func_istrue>(thd, mem_root, this); } + Item *get_copy(THD *thd) + { return get_item_copy<Item_func_istrue>(thd, this); } }; @@ -284,8 +284,8 @@ public: Item_func_truth(thd, a, true, false) {} ~Item_func_isnottrue() {} virtual const char* func_name() const { return "isnottrue"; } - Item *get_copy(THD *thd, MEM_ROOT *mem_root) - { return get_item_copy<Item_func_isnottrue>(thd, mem_root, this); } + Item *get_copy(THD *thd) + { return get_item_copy<Item_func_isnottrue>(thd, this); } }; @@ -299,8 +299,8 @@ public: Item_func_isfalse(THD *thd, Item *a): Item_func_truth(thd, a, false, true) {} ~Item_func_isfalse() {} virtual const char* func_name() const { return "isfalse"; } - Item *get_copy(THD *thd, MEM_ROOT *mem_root) - { return get_item_copy<Item_func_isfalse>(thd, mem_root, this); } + Item *get_copy(THD *thd) + { return get_item_copy<Item_func_isfalse>(thd, this); } }; @@ -315,8 +315,8 @@ public: Item_func_truth(thd, a, false, false) {} ~Item_func_isnotfalse() {} virtual const char* func_name() const { return "isnotfalse"; } - Item *get_copy(THD *thd, MEM_ROOT *mem_root) - { return get_item_copy<Item_func_isnotfalse>(thd, mem_root, this); } + Item *get_copy(THD *thd) + { return get_item_copy<Item_func_isnotfalse>(thd, this); } }; @@ -378,8 +378,8 @@ public: void fix_after_pullout(st_select_lex *new_parent, Item **ref, bool merge); bool invisible_mode(); void reset_cache() { cache= NULL; } - Item *get_copy(THD *thd, MEM_ROOT *mem_root) - { return get_item_copy<Item_in_optimizer>(thd, mem_root, this); } + Item *get_copy(THD *thd) + { return get_item_copy<Item_in_optimizer>(thd, this); } }; @@ -539,10 +539,10 @@ public: return add_key_fields_optimize_op(join, key_fields, and_level, usable_tables, sargables, false); } - Item *build_clone(THD *thd, MEM_ROOT *mem_root) + Item *build_clone(THD *thd) { Item_bool_rowready_func2 *clone= - (Item_bool_rowready_func2 *) Item_func::build_clone(thd, mem_root); + (Item_bool_rowready_func2 *) Item_func::build_clone(thd); if (clone) { clone->cmp.comparators= 0; @@ -573,8 +573,8 @@ public: Item_args::propagate_equal_fields(thd, Context_boolean(), cond); return this; } - Item *get_copy(THD *thd, MEM_ROOT *mem_root) - { return get_item_copy<Item_func_xor>(thd, mem_root, this); } + Item *get_copy(THD *thd) + { return get_item_copy<Item_func_xor>(thd, this); } }; class Item_func_not :public Item_bool_func @@ -592,8 +592,8 @@ public: Item *neg_transformer(THD *thd); bool fix_fields(THD *, Item **); virtual void print(String *str, enum_query_type query_type); - Item *get_copy(THD *thd, MEM_ROOT *mem_root) - { return get_item_copy<Item_func_not>(thd, mem_root, this); } + Item *get_copy(THD *thd) + { return get_item_copy<Item_func_not>(thd, this); } }; class Item_maxmin_subselect; @@ -641,8 +641,8 @@ public: void add_key_fields(JOIN *join, KEY_FIELD **key_fields, uint *and_level, table_map usable_tables, SARGABLE_PARAM **sargables); - Item *get_copy(THD *thd, MEM_ROOT *mem_root) - { return get_item_copy<Item_func_trig_cond>(thd, mem_root, this); } + Item *get_copy(THD *thd) + { return get_item_copy<Item_func_trig_cond>(thd, this); } }; class Item_func_not_all :public Item_func_not @@ -679,8 +679,8 @@ public: longlong val_int(); const char *func_name() const { return "<nop>"; } Item *neg_transformer(THD *thd); - Item *get_copy(THD *thd, MEM_ROOT *mem_root) - { return get_item_copy<Item_func_nop_all>(thd, mem_root, this); } + Item *get_copy(THD *thd) + { return get_item_copy<Item_func_nop_all>(thd, this); } }; @@ -720,8 +720,8 @@ public: uint in_equality_no; virtual uint exists2in_reserved_items() { return 1; }; friend class Arg_comparator; - Item *get_copy(THD *thd, MEM_ROOT *mem_root) - { return get_item_copy<Item_func_eq>(thd, mem_root, this); } + Item *get_copy(THD *thd) + { return get_item_copy<Item_func_eq>(thd, this); } }; class Item_func_equal :public Item_bool_rowready_func2 @@ -744,8 +744,8 @@ public: return add_key_fields_optimize_op(join, key_fields, and_level, usable_tables, sargables, true); } - Item *get_copy(THD *thd, MEM_ROOT *mem_root) - { return get_item_copy<Item_func_equal>(thd, mem_root, this); } + Item *get_copy(THD *thd) + { return get_item_copy<Item_func_equal>(thd, this); } }; @@ -760,8 +760,8 @@ public: cond_result eq_cmp_result() const { return COND_TRUE; } const char *func_name() const { return ">="; } Item *negated_item(THD *thd); - Item *get_copy(THD *thd, MEM_ROOT *mem_root) - { return get_item_copy<Item_func_ge>(thd, mem_root, this); } + Item *get_copy(THD *thd) + { return get_item_copy<Item_func_ge>(thd, this); } }; @@ -776,8 +776,8 @@ public: cond_result eq_cmp_result() const { return COND_FALSE; } const char *func_name() const { return ">"; } Item *negated_item(THD *thd); - Item *get_copy(THD *thd, MEM_ROOT *mem_root) - { return get_item_copy<Item_func_gt>(thd, mem_root, this); } + Item *get_copy(THD *thd) + { return get_item_copy<Item_func_gt>(thd, this); } }; @@ -792,8 +792,8 @@ public: cond_result eq_cmp_result() const { return COND_TRUE; } const char *func_name() const { return "<="; } Item *negated_item(THD *thd); - Item *get_copy(THD *thd, MEM_ROOT *mem_root) - { return get_item_copy<Item_func_le>(thd, mem_root, this); } + Item *get_copy(THD *thd) + { return get_item_copy<Item_func_le>(thd, this); } }; @@ -808,8 +808,8 @@ public: cond_result eq_cmp_result() const { return COND_FALSE; } const char *func_name() const { return "<"; } Item *negated_item(THD *thd); - Item *get_copy(THD *thd, MEM_ROOT *mem_root) - { return get_item_copy<Item_func_lt>(thd, mem_root, this); } + Item *get_copy(THD *thd) + { return get_item_copy<Item_func_lt>(thd, this); } }; @@ -833,8 +833,8 @@ public: Item *negated_item(THD *thd); void add_key_fields(JOIN *join, KEY_FIELD **key_fields, uint *and_level, table_map usable_tables, SARGABLE_PARAM **sargables); - Item *get_copy(THD *thd, MEM_ROOT *mem_root) - { return get_item_copy<Item_func_ne>(thd, mem_root, this); } + Item *get_copy(THD *thd) + { return get_item_copy<Item_func_ne>(thd, this); } }; @@ -923,8 +923,8 @@ public: cond); return this; } - Item *get_copy(THD *thd, MEM_ROOT *mem_root) - { return get_item_copy<Item_func_between>(thd, mem_root, this); } + Item *get_copy(THD *thd) + { return get_item_copy<Item_func_between>(thd, this); } longlong val_int_cmp_string(); longlong val_int_cmp_temporal(); @@ -951,8 +951,8 @@ public: agg_arg_charsets_for_comparison(cmp_collation, args, 2); fix_char_length(2); // returns "1" or "0" or "-1" } - Item *get_copy(THD *thd, MEM_ROOT *mem_root) - { return get_item_copy<Item_func_strcmp>(thd, mem_root, this); } + Item *get_copy(THD *thd) + { return get_item_copy<Item_func_strcmp>(thd, this); } }; @@ -985,8 +985,8 @@ public: str->append(func_name()); print_args(str, 0, query_type); } - Item *get_copy(THD *thd, MEM_ROOT *mem_root) - { return get_item_copy<Item_func_interval>(thd, mem_root, this); } + Item *get_copy(THD *thd) + { return get_item_copy<Item_func_interval>(thd, this); } }; @@ -1009,8 +1009,8 @@ public: } const char *func_name() const { return "coalesce"; } table_map not_null_tables() const { return 0; } - Item *get_copy(THD *thd, MEM_ROOT *mem_root) - { return get_item_copy<Item_func_coalesce>(thd, mem_root, this); } + Item *get_copy(THD *thd) + { return get_item_copy<Item_func_coalesce>(thd, this); } }; @@ -1082,8 +1082,8 @@ public: const char *func_name() const { return "ifnull"; } table_map not_null_tables() const { return 0; } - Item *get_copy(THD *thd, MEM_ROOT *mem_root) - { return get_item_copy<Item_func_ifnull>(thd, mem_root, this); } + Item *get_copy(THD *thd) + { return get_item_copy<Item_func_ifnull>(thd, this); } }; @@ -1145,8 +1145,8 @@ public: const char *func_name() const { return "if"; } bool eval_not_null_tables(void *opt_arg); void fix_after_pullout(st_select_lex *new_parent, Item **ref, bool merge); - Item *get_copy(THD *thd, MEM_ROOT *mem_root) - { return get_item_copy<Item_func_if>(thd, mem_root, this); } + Item *get_copy(THD *thd) + { return get_item_copy<Item_func_if>(thd, this); } private: void cache_type_info(Item *source); }; @@ -1166,8 +1166,8 @@ public: { fix_length_and_dec2_eliminate_null(args + 1); } - Item *get_copy(THD *thd, MEM_ROOT *mem_root) - { return get_item_copy<Item_func_nvl2>(thd, mem_root, this); } + Item *get_copy(THD *thd) + { return get_item_copy<Item_func_nvl2>(thd, this); } }; @@ -1253,8 +1253,8 @@ public: cond, &args[2]); return this; } - Item *get_copy(THD *thd, MEM_ROOT *mem_root) - { return get_item_copy<Item_func_nullif>(thd, mem_root, this); } + Item *get_copy(THD *thd) + { return get_item_copy<Item_func_nullif>(thd, this); } Item *derived_field_transformer_for_having(THD *thd, uchar *arg) { reset_first_arg_if_needed(); return this; } Item *derived_field_transformer_for_where(THD *thd, uchar *arg) @@ -2114,9 +2114,9 @@ public: enum precedence precedence() const { return BETWEEN_PRECEDENCE; } CHARSET_INFO *compare_collation() const { return cmp_collation.collation; } bool need_parentheses_in_default() { return true; } - Item *build_clone(THD *thd, MEM_ROOT *mem_root) + Item *build_clone(THD *thd) { - Item_func_case *clone= (Item_func_case *) Item_func::build_clone(thd, mem_root); + Item_func_case *clone= (Item_func_case *) Item_func::build_clone(thd); if (clone) clone->arg_buffer= 0; return clone; @@ -2151,8 +2151,8 @@ public: return this; } Item *find_item(); - Item *get_copy(THD *thd, MEM_ROOT *mem_root) - { return get_item_copy<Item_func_case_searched>(thd, mem_root, this); } + Item *get_copy(THD *thd) + { return get_item_copy<Item_func_case_searched>(thd, this); } }; @@ -2197,17 +2197,17 @@ public: void fix_length_and_dec(); Item *propagate_equal_fields(THD *thd, const Context &ctx, COND_EQUAL *cond); Item *find_item(); - Item *build_clone(THD *thd, MEM_ROOT *mem_root) + Item *build_clone(THD *thd) { Item_func_case_simple *clone= (Item_func_case_simple *) - Item_func_case::build_clone(thd, mem_root); + Item_func_case::build_clone(thd); uint ncases= when_count(); if (clone && clone->Predicant_to_list_comparator::init_clone(thd, ncases)) return NULL; return clone; } - Item *get_copy(THD *thd, MEM_ROOT *mem_root) - { return get_item_copy<Item_func_case_simple>(thd, mem_root, this); } + Item *get_copy(THD *thd) + { return get_item_copy<Item_func_case_simple>(thd, this); } }; @@ -2222,8 +2222,8 @@ public: { Item_func::print(str, query_type); } void fix_length_and_dec(); Item *find_item(); - Item *get_copy(THD *thd, MEM_ROOT *mem_root) - { return get_item_copy<Item_func_decode_oracle>(thd, mem_root, this); } + Item *get_copy(THD *thd) + { return get_item_copy<Item_func_decode_oracle>(thd, this); } }; @@ -2384,11 +2384,11 @@ public: bool eval_not_null_tables(void *opt_arg); void fix_after_pullout(st_select_lex *new_parent, Item **ref, bool merge); bool count_sargable_conds(void *arg); - Item *get_copy(THD *thd, MEM_ROOT *mem_root) - { return get_item_copy<Item_func_in>(thd, mem_root, this); } - Item *build_clone(THD *thd, MEM_ROOT *mem_root) + Item *get_copy(THD *thd) + { return get_item_copy<Item_func_in>(thd, this); } + Item *build_clone(THD *thd) { - Item_func_in *clone= (Item_func_in *) Item_func::build_clone(thd, mem_root); + Item_func_in *clone= (Item_func_in *) Item_func::build_clone(thd); if (clone) { clone->array= 0; @@ -2516,8 +2516,8 @@ public: bool top_level); table_map not_null_tables() const { return 0; } Item *neg_transformer(THD *thd); - Item *get_copy(THD *thd, MEM_ROOT *mem_root) - { return get_item_copy<Item_func_isnull>(thd, mem_root, this); } + Item *get_copy(THD *thd) + { return get_item_copy<Item_func_isnull>(thd, this); } }; /* Functions used by HAVING for rewriting IN subquery */ @@ -2564,8 +2564,8 @@ public: Item *neg_transformer(THD *thd); void print(String *str, enum_query_type query_type); void top_level_item() { abort_on_null=1; } - Item *get_copy(THD *thd, MEM_ROOT *mem_root) - { return get_item_copy<Item_func_isnotnull>(thd, mem_root, this); } + Item *get_copy(THD *thd) + { return get_item_copy<Item_func_isnotnull>(thd, this); } }; @@ -2706,8 +2706,8 @@ public: bool find_selective_predicates_list_processor(void *arg); - Item *get_copy(THD *thd, MEM_ROOT *mem_root) - { return get_item_copy<Item_func_like>(thd, mem_root, this); } + Item *get_copy(THD *thd) + { return get_item_copy<Item_func_like>(thd, this); } }; @@ -2818,11 +2818,11 @@ public: void fix_length_and_dec(); const char *func_name() const { return "regexp"; } enum precedence precedence() const { return CMP_PRECEDENCE; } - Item *get_copy(THD *thd, MEM_ROOT *mem_root) - { return get_item_copy<Item_func_regex>(thd, mem_root, this); } - Item *build_clone(THD *thd, MEM_ROOT *mem_root) + Item *get_copy(THD *thd) + { return get_item_copy<Item_func_regex>(thd, this); } + Item *build_clone(THD *thd) { - Item_func_regex *clone= (Item_func_regex*) Item_bool_func::build_clone(thd, mem_root); + Item_func_regex *clone= (Item_func_regex*) Item_bool_func::build_clone(thd); if (clone) clone->re.reset(); return clone; @@ -2867,8 +2867,8 @@ public: bool fix_fields(THD *thd, Item **ref); void fix_length_and_dec(); const char *func_name() const { return "regexp_instr"; } - Item *get_copy(THD *thd, MEM_ROOT *mem_root) - { return get_item_copy<Item_func_regexp_instr>(thd, mem_root, this); } + Item *get_copy(THD *thd) + { return get_item_copy<Item_func_regexp_instr>(thd, this); } }; @@ -2945,7 +2945,7 @@ public: Item *compile(THD *thd, Item_analyzer analyzer, uchar **arg_p, Item_transformer transformer, uchar *arg_t); bool eval_not_null_tables(void *opt_arg); - Item *build_clone(THD *thd, MEM_ROOT *mem_root); + Item *build_clone(THD *thd); }; template <template<class> class LI, class T> class Item_equal_iterator; @@ -3119,7 +3119,7 @@ public: void set_context_field(Item_field *ctx_field) { context_field= ctx_field; } void set_link_equal_fields(bool flag) { link_equal_fields= flag; } - Item* get_copy(THD *thd, MEM_ROOT *mem_root) { return 0; } + Item* get_copy(THD *thd) { return 0; } /* This does not comply with the specification of the virtual method, but Item_equal items are processed distinguishly anyway @@ -3273,8 +3273,8 @@ public: void add_key_fields(JOIN *join, KEY_FIELD **key_fields, uint *and_level, table_map usable_tables, SARGABLE_PARAM **sargables); SEL_TREE *get_mm_tree(RANGE_OPT_PARAM *param, Item **cond_ptr); - Item *get_copy(THD *thd, MEM_ROOT *mem_root) - { return get_item_copy<Item_cond_and>(thd, mem_root, this); } + Item *get_copy(THD *thd) + { return get_item_copy<Item_cond_and>(thd, this); } }; inline bool is_cond_and(Item *item) @@ -3300,8 +3300,8 @@ public: table_map not_null_tables() const { return and_tables_cache; } Item *copy_andor_structure(THD *thd); Item *neg_transformer(THD *thd); - Item *get_copy(THD *thd, MEM_ROOT *mem_root) - { return get_item_copy<Item_cond_or>(thd, mem_root, this); } + Item *get_copy(THD *thd) + { return get_item_copy<Item_cond_or>(thd, this); } }; class Item_func_dyncol_check :public Item_bool_func @@ -3311,8 +3311,8 @@ public: longlong val_int(); const char *func_name() const { return "column_check"; } bool need_parentheses_in_default() { return false; } - Item *get_copy(THD *thd, MEM_ROOT *mem_root) - { return get_item_copy<Item_func_dyncol_check>(thd, mem_root, this); } + Item *get_copy(THD *thd) + { return get_item_copy<Item_func_dyncol_check>(thd, this); } }; class Item_func_dyncol_exists :public Item_bool_func @@ -3323,8 +3323,8 @@ public: longlong val_int(); const char *func_name() const { return "column_exists"; } bool need_parentheses_in_default() { return false; } - Item *get_copy(THD *thd, MEM_ROOT *mem_root) - { return get_item_copy<Item_func_dyncol_exists>(thd, mem_root, this); } + Item *get_copy(THD *thd) + { return get_item_copy<Item_func_dyncol_exists>(thd, this); } }; @@ -3352,8 +3352,8 @@ public: :Item_func_cursor_bool_attr(thd, name, offset) { } const char *func_name() const { return "%ISOPEN"; } longlong val_int(); - Item *get_copy(THD *thd, MEM_ROOT *mem_root) - { return get_item_copy<Item_func_cursor_isopen>(thd, mem_root, this); } + Item *get_copy(THD *thd) + { return get_item_copy<Item_func_cursor_isopen>(thd, this); } }; @@ -3364,8 +3364,8 @@ public: :Item_func_cursor_bool_attr(thd, name, offset) { maybe_null= true; } const char *func_name() const { return "%FOUND"; } longlong val_int(); - Item *get_copy(THD *thd, MEM_ROOT *mem_root) - { return get_item_copy<Item_func_cursor_found>(thd, mem_root, this); } + Item *get_copy(THD *thd) + { return get_item_copy<Item_func_cursor_found>(thd, this); } }; @@ -3376,8 +3376,8 @@ public: :Item_func_cursor_bool_attr(thd, name, offset) { maybe_null= true; } const char *func_name() const { return "%NOTFOUND"; } longlong val_int(); - Item *get_copy(THD *thd, MEM_ROOT *mem_root) - { return get_item_copy<Item_func_cursor_notfound>(thd, mem_root, this); } + Item *get_copy(THD *thd) + { return get_item_copy<Item_func_cursor_notfound>(thd, this); } }; |