mirror of
https://github.com/MariaDB/server.git
synced 2026-01-06 05:22:24 +03:00
Remove not used mem_root argument from build_clone(), get_copy() and get_item_copy()
TODO:
- Make get_thd_memroot() inline
- To do this, we need to reduce dependence of include files, especially
so that sql_class.h is not depending in item.h
This commit is contained in:
38
sql/item.cc
38
sql/item.cc
@@ -78,6 +78,12 @@ inline void set_max_sum_func_level(THD *thd, SELECT_LEX *select)
|
||||
select->nest_level - 1);
|
||||
}
|
||||
|
||||
|
||||
MEM_ROOT *get_thd_memroot(THD *thd)
|
||||
{
|
||||
return thd->mem_root;
|
||||
}
|
||||
|
||||
/*****************************************************************************
|
||||
** Item functions
|
||||
*****************************************************************************/
|
||||
@@ -2700,15 +2706,15 @@ bool Type_std_attributes::agg_item_set_converter(const DTCollation &coll,
|
||||
0 if an error occured
|
||||
*/
|
||||
|
||||
Item* Item_func_or_sum::build_clone(THD *thd, MEM_ROOT *mem_root)
|
||||
Item* Item_func_or_sum::build_clone(THD *thd)
|
||||
{
|
||||
Item_func_or_sum *copy= (Item_func_or_sum *) get_copy(thd, mem_root);
|
||||
Item_func_or_sum *copy= (Item_func_or_sum *) get_copy(thd);
|
||||
if (!copy)
|
||||
return 0;
|
||||
if (arg_count > 2)
|
||||
{
|
||||
copy->args=
|
||||
(Item**) alloc_root(mem_root, sizeof(Item*) * arg_count);
|
||||
(Item**) alloc_root(thd->mem_root, sizeof(Item*) * arg_count);
|
||||
if (!copy->args)
|
||||
return 0;
|
||||
}
|
||||
@@ -2718,7 +2724,7 @@ Item* Item_func_or_sum::build_clone(THD *thd, MEM_ROOT *mem_root)
|
||||
|
||||
for (uint i= 0; i < arg_count; i++)
|
||||
{
|
||||
Item *arg_clone= args[i]->build_clone(thd, mem_root);
|
||||
Item *arg_clone= args[i]->build_clone(thd);
|
||||
if (!arg_clone)
|
||||
return 0;
|
||||
copy->args[i]= arg_clone;
|
||||
@@ -2743,19 +2749,13 @@ Item* Item_func_or_sum::build_clone(THD *thd, MEM_ROOT *mem_root)
|
||||
0 if an error occured
|
||||
*/
|
||||
|
||||
Item* Item_ref::build_clone(THD *thd, MEM_ROOT *mem_root)
|
||||
Item* Item_ref::build_clone(THD *thd)
|
||||
{
|
||||
Item_ref *copy= (Item_ref *) get_copy(thd, mem_root);
|
||||
if (!copy)
|
||||
Item_ref *copy= (Item_ref *) get_copy(thd);
|
||||
if (!copy ||
|
||||
!(copy->ref= (Item**) alloc_root(thd->mem_root, sizeof(Item*))) ||
|
||||
!(*copy->ref= (* ref)->build_clone(thd)))
|
||||
return 0;
|
||||
copy->ref=
|
||||
(Item**) alloc_root(mem_root, sizeof(Item*));
|
||||
if (!copy->ref)
|
||||
return 0;
|
||||
Item *item_clone= (* ref)->build_clone(thd, mem_root);
|
||||
if (!item_clone)
|
||||
return 0;
|
||||
*copy->ref= item_clone;
|
||||
return copy;
|
||||
}
|
||||
|
||||
@@ -7342,7 +7342,7 @@ Item *Item_field::derived_field_transformer_for_where(THD *thd, uchar *arg)
|
||||
st_select_lex *sel= (st_select_lex *)arg;
|
||||
Item *producing_item= find_producing_item(this, sel);
|
||||
if (producing_item)
|
||||
return producing_item->build_clone(thd, thd->mem_root);
|
||||
return producing_item->build_clone(thd);
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -7354,7 +7354,7 @@ Item *Item_direct_view_ref::derived_field_transformer_for_where(THD *thd,
|
||||
st_select_lex *sel= (st_select_lex *)arg;
|
||||
Item *producing_item= find_producing_item(this, sel);
|
||||
DBUG_ASSERT (producing_item != NULL);
|
||||
return producing_item->build_clone(thd, thd->mem_root);
|
||||
return producing_item->build_clone(thd);
|
||||
}
|
||||
return this;
|
||||
}
|
||||
@@ -7400,7 +7400,7 @@ Item *Item_field::derived_grouping_field_transformer_for_where(THD *thd,
|
||||
st_select_lex *sel= (st_select_lex *)arg;
|
||||
Grouping_tmp_field *gr_field= find_matching_grouping_field(this, sel);
|
||||
if (gr_field)
|
||||
return gr_field->producing_item->build_clone(thd, thd->mem_root);
|
||||
return gr_field->producing_item->build_clone(thd);
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -7413,7 +7413,7 @@ Item_direct_view_ref::derived_grouping_field_transformer_for_where(THD *thd,
|
||||
return this;
|
||||
st_select_lex *sel= (st_select_lex *)arg;
|
||||
Grouping_tmp_field *gr_field= find_matching_grouping_field(this, sel);
|
||||
return gr_field->producing_item->build_clone(thd, thd->mem_root);
|
||||
return gr_field->producing_item->build_clone(thd);
|
||||
}
|
||||
|
||||
void Item_field::print(String *str, enum_query_type query_type)
|
||||
|
||||
162
sql/item.h
162
sql/item.h
@@ -1197,7 +1197,7 @@ public:
|
||||
virtual bool basic_const_item() const { return 0; }
|
||||
/* cloning of constant items (0 if it is not const) */
|
||||
virtual Item *clone_item(THD *thd) { return 0; }
|
||||
virtual Item* build_clone(THD *thd, MEM_ROOT *mem_root) { return get_copy(thd, mem_root); }
|
||||
virtual Item* build_clone(THD *thd) { return get_copy(thd); }
|
||||
virtual cond_result eq_cmp_result() const { return COND_OK; }
|
||||
inline uint float_length(uint decimals_par) const
|
||||
{ return decimals < FLOATING_POINT_DECIMALS ? (DBL_DIG+2+decimals_par) : DBL_DIG+8;}
|
||||
@@ -1667,7 +1667,7 @@ public:
|
||||
virtual bool set_fields_as_dependent_processor(void *arg) { return 0; }
|
||||
/*============== End of Item processor list ======================*/
|
||||
|
||||
virtual Item *get_copy(THD *thd, MEM_ROOT *mem_root)=0;
|
||||
virtual Item *get_copy(THD *thd)=0;
|
||||
|
||||
bool cache_const_expr_analyzer(uchar **arg);
|
||||
Item* cache_const_expr_transformer(THD *thd, uchar *arg);
|
||||
@@ -1939,12 +1939,14 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
MEM_ROOT *get_thd_memroot(THD *thd);
|
||||
|
||||
template <class T>
|
||||
inline Item* get_item_copy (THD *thd, MEM_ROOT *mem_root, T* item)
|
||||
inline Item* get_item_copy (THD *thd, T* item)
|
||||
{
|
||||
Item *copy= new (mem_root) T(*item);
|
||||
copy->register_in(thd);
|
||||
Item *copy= new (get_thd_memroot(thd)) T(*item);
|
||||
if (copy)
|
||||
copy->register_in(thd);
|
||||
return copy;
|
||||
}
|
||||
|
||||
@@ -2375,7 +2377,7 @@ public:
|
||||
|
||||
bool append_for_log(THD *thd, String *str);
|
||||
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root) { return 0; }
|
||||
Item *get_copy(THD *thd) { return 0; }
|
||||
|
||||
/*
|
||||
Override the inherited create_field_for_create_select(),
|
||||
@@ -2503,7 +2505,7 @@ public:
|
||||
purposes.
|
||||
*/
|
||||
virtual void print(String *str, enum_query_type query_type);
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root) { return 0; }
|
||||
Item *get_copy(THD *thd) { return 0; }
|
||||
|
||||
private:
|
||||
uint m_case_expr_id;
|
||||
@@ -2573,8 +2575,8 @@ public:
|
||||
{
|
||||
return mark_unsupported_function("name_const()", arg, VCOL_IMPOSSIBLE);
|
||||
}
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_name_const>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_name_const>(thd, this); }
|
||||
};
|
||||
|
||||
class Item_num: public Item_basic_constant
|
||||
@@ -2710,8 +2712,8 @@ public:
|
||||
const Type_handler *handler= field->type_handler();
|
||||
return handler->type_handler_for_item_field();
|
||||
}
|
||||
Item* get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_ident_for_show>(thd, mem_root, this); }
|
||||
Item* get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_ident_for_show>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -2895,8 +2897,8 @@ public:
|
||||
bool cleanup_excluding_const_fields_processor(void *arg)
|
||||
{ return field && const_item() ? 0 : cleanup_processor(arg); }
|
||||
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_field>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_field>(thd, this); }
|
||||
bool is_outer_field() const
|
||||
{
|
||||
DBUG_ASSERT(fixed);
|
||||
@@ -2924,8 +2926,8 @@ public:
|
||||
:Item_field(thd, field),
|
||||
Item_args()
|
||||
{ }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_field_row>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_field_row>(thd, this); }
|
||||
|
||||
const Type_handler *type_handler() const { return &type_handler_row; }
|
||||
uint cols() const { return arg_count; }
|
||||
@@ -3020,8 +3022,8 @@ public:
|
||||
|
||||
Item *safe_charset_converter(THD *thd, CHARSET_INFO *tocs);
|
||||
bool check_partition_func_processor(void *int_arg) {return FALSE;}
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_null>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_null>(thd, this); }
|
||||
};
|
||||
|
||||
class Item_null_result :public Item_null
|
||||
@@ -3295,7 +3297,7 @@ public:
|
||||
|
||||
bool append_for_log(THD *thd, String *str);
|
||||
bool check_vcol_func_processor(void *int_arg) {return FALSE;}
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root) { return 0; }
|
||||
Item *get_copy(THD *thd) { return 0; }
|
||||
|
||||
private:
|
||||
void invalid_default_param() const;
|
||||
@@ -3357,8 +3359,8 @@ public:
|
||||
{ return (uint) (max_length - MY_TEST(value < 0)); }
|
||||
bool eq(const Item *item, bool binary_cmp) const
|
||||
{ return int_eq(value, item); }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_int>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_int>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -3390,8 +3392,8 @@ public:
|
||||
virtual void print(String *str, enum_query_type query_type);
|
||||
Item *neg(THD *thd);
|
||||
uint decimal_precision() const { return max_length; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_uint>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_uint>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -3437,8 +3439,8 @@ public:
|
||||
uint decimal_precision() const { return decimal_value.precision(); }
|
||||
bool eq(const Item *, bool binary_cmp) const;
|
||||
void set_decimal_value(my_decimal *value_par);
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_decimal>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_decimal>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -3488,8 +3490,8 @@ public:
|
||||
virtual void print(String *str, enum_query_type query_type);
|
||||
bool eq(const Item *item, bool binary_cmp) const
|
||||
{ return real_eq(value, item); }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_float>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_float>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -3679,8 +3681,8 @@ public:
|
||||
return MYSQL_TYPE_STRING; // Not a temporal literal
|
||||
}
|
||||
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_string>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_string>(thd, this); }
|
||||
|
||||
};
|
||||
|
||||
@@ -3934,8 +3936,8 @@ public:
|
||||
return &type_handler_longlong;
|
||||
}
|
||||
void print(String *str, enum_query_type query_type);
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_hex_hybrid>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_hex_hybrid>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -3975,8 +3977,8 @@ public:
|
||||
collation.collation);
|
||||
}
|
||||
void print(String *str, enum_query_type query_type);
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_hex_string>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_hex_string>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -4056,8 +4058,8 @@ public:
|
||||
void print(String *str, enum_query_type query_type);
|
||||
Item *clone_item(THD *thd);
|
||||
bool get_date(MYSQL_TIME *res, ulonglong fuzzy_date);
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_date_literal>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_date_literal>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -4077,8 +4079,8 @@ public:
|
||||
void print(String *str, enum_query_type query_type);
|
||||
Item *clone_item(THD *thd);
|
||||
bool get_date(MYSQL_TIME *res, ulonglong fuzzy_date);
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_time_literal>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_time_literal>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -4100,8 +4102,8 @@ public:
|
||||
void print(String *str, enum_query_type query_type);
|
||||
Item *clone_item(THD *thd);
|
||||
bool get_date(MYSQL_TIME *res, ulonglong fuzzy_date);
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_datetime_literal>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_datetime_literal>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -4338,7 +4340,7 @@ public:
|
||||
virtual void fix_length_and_dec()= 0;
|
||||
bool const_item() const { return const_item_cache; }
|
||||
table_map used_tables() const { return used_tables_cache; }
|
||||
Item* build_clone(THD *thd, MEM_ROOT *mem_root);
|
||||
Item* build_clone(THD *thd);
|
||||
};
|
||||
|
||||
|
||||
@@ -4521,7 +4523,7 @@ public:
|
||||
return (*ref)->is_outer_field();
|
||||
}
|
||||
|
||||
Item* build_clone(THD *thd, MEM_ROOT *mem_root);
|
||||
Item* build_clone(THD *thd);
|
||||
|
||||
/**
|
||||
Checks if the item tree that ref points to contains a subquery.
|
||||
@@ -4530,8 +4532,8 @@ public:
|
||||
{
|
||||
return (*ref)->has_subquery();
|
||||
}
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_ref>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_ref>(thd, this); }
|
||||
bool excl_dep_on_table(table_map tab_map)
|
||||
{
|
||||
table_map used= used_tables();
|
||||
@@ -4599,8 +4601,8 @@ public:
|
||||
bool is_null();
|
||||
bool get_date(MYSQL_TIME *ltime, ulonglong fuzzydate);
|
||||
virtual Ref_Type ref_type() { return DIRECT_REF; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_direct_ref>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_direct_ref>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -4763,9 +4765,9 @@ public:
|
||||
{
|
||||
return mark_unsupported_function("cache", arg, VCOL_IMPOSSIBLE);
|
||||
}
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_cache_wrapper>(thd, mem_root, this); }
|
||||
Item *build_clone(THD *thd, MEM_ROOT *mem_root) { return 0; }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_cache_wrapper>(thd, this); }
|
||||
Item *build_clone(THD *thd) { return 0; }
|
||||
};
|
||||
|
||||
|
||||
@@ -4933,8 +4935,8 @@ public:
|
||||
item_equal= NULL;
|
||||
Item_direct_ref::cleanup();
|
||||
}
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_direct_view_ref>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_direct_view_ref>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -5027,8 +5029,8 @@ public:
|
||||
bool get_date(MYSQL_TIME *ltime, ulonglong fuzzydate);
|
||||
virtual void print(String *str, enum_query_type query_type);
|
||||
table_map used_tables() const;
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_ref_null_helper>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_ref_null_helper>(thd, this); }
|
||||
};
|
||||
|
||||
/*
|
||||
@@ -5190,8 +5192,8 @@ public:
|
||||
longlong val_int();
|
||||
void copy();
|
||||
int save_in_field(Field *field, bool no_conversions);
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_copy_string>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_copy_string>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -5214,8 +5216,8 @@ public:
|
||||
return null_value ? 0 : cached_value;
|
||||
}
|
||||
virtual void copy();
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_copy_int>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_copy_int>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -5232,8 +5234,8 @@ public:
|
||||
{
|
||||
return null_value ? 0.0 : (double) (ulonglong) cached_value;
|
||||
}
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_copy_uint>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_copy_uint>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -5260,8 +5262,8 @@ public:
|
||||
cached_value= item->val_real();
|
||||
null_value= item->null_value;
|
||||
}
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_copy_float>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_copy_float>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -5281,8 +5283,8 @@ public:
|
||||
double val_real();
|
||||
longlong val_int();
|
||||
void copy();
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_copy_decimal>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_copy_decimal>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -5776,8 +5778,8 @@ public:
|
||||
bool cache_value();
|
||||
int save_in_field(Field *field, bool no_conversions);
|
||||
Item *convert_to_basic_const_item(THD *thd);
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_cache_int>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_cache_int>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -5812,8 +5814,8 @@ public:
|
||||
Item_cache_time(THD *thd)
|
||||
:Item_cache_temporal(thd, &type_handler_time2) { }
|
||||
bool cache_value();
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_cache_time>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_cache_time>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -5822,8 +5824,8 @@ class Item_cache_datetime: public Item_cache_temporal
|
||||
public:
|
||||
Item_cache_datetime(THD *thd)
|
||||
:Item_cache_temporal(thd, &type_handler_datetime2) { }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_cache_datetime>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_cache_datetime>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -5832,8 +5834,8 @@ class Item_cache_date: public Item_cache_temporal
|
||||
public:
|
||||
Item_cache_date(THD *thd)
|
||||
:Item_cache_temporal(thd, &type_handler_newdate) { }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_cache_date>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_cache_date>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -5850,8 +5852,8 @@ public:
|
||||
my_decimal *val_decimal(my_decimal *);
|
||||
bool cache_value();
|
||||
Item *convert_to_basic_const_item(THD *thd);
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_cache_real>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_cache_real>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -5868,8 +5870,8 @@ public:
|
||||
my_decimal *val_decimal(my_decimal *);
|
||||
bool cache_value();
|
||||
Item *convert_to_basic_const_item(THD *thd);
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_cache_decimal>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_cache_decimal>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -5896,8 +5898,8 @@ public:
|
||||
int save_in_field(Field *field, bool no_conversions);
|
||||
bool cache_value();
|
||||
Item *convert_to_basic_const_item(THD *thd);
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_cache_str>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_cache_str>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -5921,8 +5923,8 @@ public:
|
||||
*/
|
||||
return Item::safe_charset_converter(thd, tocs);
|
||||
}
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_cache_str_for_nullif>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_cache_str_for_nullif>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -5992,8 +5994,8 @@ public:
|
||||
}
|
||||
bool cache_value();
|
||||
virtual void set_null();
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_cache_row>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_cache_row>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -6064,7 +6066,7 @@ public:
|
||||
{
|
||||
Type_geometry_attributes::set_geometry_type(type);
|
||||
}
|
||||
Item* get_copy(THD *thd, MEM_ROOT *mem_root) { return 0; }
|
||||
Item* get_copy(THD *thd) { return 0; }
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -4937,20 +4937,20 @@ void Item_cond::neg_arguments(THD *thd)
|
||||
0 if an error occured
|
||||
*/
|
||||
|
||||
Item *Item_cond::build_clone(THD *thd, MEM_ROOT *mem_root)
|
||||
Item *Item_cond::build_clone(THD *thd)
|
||||
{
|
||||
List_iterator_fast<Item> li(list);
|
||||
Item *item;
|
||||
Item_cond *copy= (Item_cond *) get_copy(thd, mem_root);
|
||||
Item_cond *copy= (Item_cond *) get_copy(thd);
|
||||
if (!copy)
|
||||
return 0;
|
||||
copy->list.empty();
|
||||
while ((item= li++))
|
||||
{
|
||||
Item *arg_clone= item->build_clone(thd, mem_root);
|
||||
Item *arg_clone= item->build_clone(thd);
|
||||
if (!arg_clone)
|
||||
return 0;
|
||||
if (copy->list.push_back(arg_clone, mem_root))
|
||||
if (copy->list.push_back(arg_clone, thd->mem_root))
|
||||
return 0;
|
||||
}
|
||||
return copy;
|
||||
|
||||
@@ -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); }
|
||||
};
|
||||
|
||||
|
||||
|
||||
330
sql/item_func.h
330
sql/item_func.h
@@ -819,8 +819,8 @@ public:
|
||||
{
|
||||
return Cursor_ref::print_func(str, func_name());
|
||||
}
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_cursor_rowcount>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_cursor_rowcount>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -839,8 +839,8 @@ public:
|
||||
{
|
||||
return mark_unsupported_function(func_name(), "()", arg, VCOL_SESSION_FUNC);
|
||||
}
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_connection_id>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_connection_id>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -896,8 +896,8 @@ public:
|
||||
virtual void print(String *str, enum_query_type query_type);
|
||||
uint decimal_precision() const { return args[0]->decimal_precision(); }
|
||||
bool need_parentheses_in_default() { return true; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_signed>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_signed>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -927,8 +927,8 @@ public:
|
||||
}
|
||||
uint decimal_precision() const { return max_length; }
|
||||
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_unsigned>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_unsigned>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -957,8 +957,8 @@ public:
|
||||
const char *func_name() const { return "decimal_typecast"; }
|
||||
virtual void print(String *str, enum_query_type query_type);
|
||||
bool need_parentheses_in_default() { return true; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_decimal_typecast>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_decimal_typecast>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -980,8 +980,8 @@ public:
|
||||
const char *func_name() const { return "double_typecast"; }
|
||||
virtual void print(String *str, enum_query_type query_type);
|
||||
bool need_parentheses_in_default() { return true; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_double_typecast>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_double_typecast>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -1007,8 +1007,8 @@ public:
|
||||
longlong int_op();
|
||||
double real_op();
|
||||
my_decimal *decimal_op(my_decimal *);
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_plus>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_plus>(thd, this); }
|
||||
};
|
||||
|
||||
class Item_func_minus :public Item_func_additive_op
|
||||
@@ -1038,8 +1038,8 @@ public:
|
||||
Item_func_additive_op::fix_length_and_dec_int();
|
||||
fix_unsigned_flag();
|
||||
}
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_minus>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_minus>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -1057,8 +1057,8 @@ public:
|
||||
void fix_length_and_dec();
|
||||
bool check_partition_func_processor(void *int_arg) {return FALSE;}
|
||||
bool check_vcol_func_processor(void *arg) { return FALSE;}
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_mul>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_mul>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -1076,8 +1076,8 @@ public:
|
||||
void fix_length_and_dec_double();
|
||||
void fix_length_and_dec_int();
|
||||
void result_precision();
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_div>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_div>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -1100,8 +1100,8 @@ public:
|
||||
bool check_partition_func_processor(void *int_arg) {return FALSE;}
|
||||
bool check_vcol_func_processor(void *arg) { return FALSE;}
|
||||
bool need_parentheses_in_default() { return true; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_int_div>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_int_div>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -1135,8 +1135,8 @@ public:
|
||||
}
|
||||
bool check_partition_func_processor(void *int_arg) {return FALSE;}
|
||||
bool check_vcol_func_processor(void *arg) { return FALSE;}
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_mod>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_mod>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -1161,8 +1161,8 @@ public:
|
||||
void fix_length_and_dec();
|
||||
uint decimal_precision() const { return args[0]->decimal_precision(); }
|
||||
bool need_parentheses_in_default() { return true; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_neg>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_neg>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -1178,8 +1178,8 @@ public:
|
||||
void fix_length_and_dec_double();
|
||||
void fix_length_and_dec_decimal();
|
||||
void fix_length_and_dec();
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_abs>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_abs>(thd, this); }
|
||||
};
|
||||
|
||||
// A class to handle logarithmic and trigonometric functions
|
||||
@@ -1204,8 +1204,8 @@ public:
|
||||
Item_func_exp(THD *thd, Item *a): Item_dec_func(thd, a) {}
|
||||
double val_real();
|
||||
const char *func_name() const { return "exp"; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_exp>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_exp>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -1215,8 +1215,8 @@ public:
|
||||
Item_func_ln(THD *thd, Item *a): Item_dec_func(thd, a) {}
|
||||
double val_real();
|
||||
const char *func_name() const { return "ln"; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_ln>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_ln>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -1227,8 +1227,8 @@ public:
|
||||
Item_func_log(THD *thd, Item *a, Item *b): Item_dec_func(thd, a, b) {}
|
||||
double val_real();
|
||||
const char *func_name() const { return "log"; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_log>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_log>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -1238,8 +1238,8 @@ public:
|
||||
Item_func_log2(THD *thd, Item *a): Item_dec_func(thd, a) {}
|
||||
double val_real();
|
||||
const char *func_name() const { return "log2"; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_log2>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_log2>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -1249,8 +1249,8 @@ public:
|
||||
Item_func_log10(THD *thd, Item *a): Item_dec_func(thd, a) {}
|
||||
double val_real();
|
||||
const char *func_name() const { return "log10"; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_log10>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_log10>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -1260,8 +1260,8 @@ public:
|
||||
Item_func_sqrt(THD *thd, Item *a): Item_dec_func(thd, a) {}
|
||||
double val_real();
|
||||
const char *func_name() const { return "sqrt"; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_sqrt>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_sqrt>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -1271,8 +1271,8 @@ public:
|
||||
Item_func_pow(THD *thd, Item *a, Item *b): Item_dec_func(thd, a, b) {}
|
||||
double val_real();
|
||||
const char *func_name() const { return "pow"; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_pow>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_pow>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -1282,8 +1282,8 @@ public:
|
||||
Item_func_acos(THD *thd, Item *a): Item_dec_func(thd, a) {}
|
||||
double val_real();
|
||||
const char *func_name() const { return "acos"; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_acos>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_acos>(thd, this); }
|
||||
};
|
||||
|
||||
class Item_func_asin :public Item_dec_func
|
||||
@@ -1292,8 +1292,8 @@ public:
|
||||
Item_func_asin(THD *thd, Item *a): Item_dec_func(thd, a) {}
|
||||
double val_real();
|
||||
const char *func_name() const { return "asin"; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_asin>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_asin>(thd, this); }
|
||||
};
|
||||
|
||||
class Item_func_atan :public Item_dec_func
|
||||
@@ -1303,8 +1303,8 @@ public:
|
||||
Item_func_atan(THD *thd, Item *a, Item *b): Item_dec_func(thd, a, b) {}
|
||||
double val_real();
|
||||
const char *func_name() const { return "atan"; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_atan>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_atan>(thd, this); }
|
||||
};
|
||||
|
||||
class Item_func_cos :public Item_dec_func
|
||||
@@ -1313,8 +1313,8 @@ public:
|
||||
Item_func_cos(THD *thd, Item *a): Item_dec_func(thd, a) {}
|
||||
double val_real();
|
||||
const char *func_name() const { return "cos"; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_cos>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_cos>(thd, this); }
|
||||
};
|
||||
|
||||
class Item_func_sin :public Item_dec_func
|
||||
@@ -1323,8 +1323,8 @@ public:
|
||||
Item_func_sin(THD *thd, Item *a): Item_dec_func(thd, a) {}
|
||||
double val_real();
|
||||
const char *func_name() const { return "sin"; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_sin>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_sin>(thd, this); }
|
||||
};
|
||||
|
||||
class Item_func_tan :public Item_dec_func
|
||||
@@ -1333,8 +1333,8 @@ public:
|
||||
Item_func_tan(THD *thd, Item *a): Item_dec_func(thd, a) {}
|
||||
double val_real();
|
||||
const char *func_name() const { return "tan"; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_tan>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_tan>(thd, this); }
|
||||
};
|
||||
|
||||
class Item_func_cot :public Item_dec_func
|
||||
@@ -1343,8 +1343,8 @@ public:
|
||||
Item_func_cot(THD *thd, Item *a): Item_dec_func(thd, a) {}
|
||||
double val_real();
|
||||
const char *func_name() const { return "cot"; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_cot>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_cot>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -1366,8 +1366,8 @@ public:
|
||||
longlong int_op();
|
||||
double real_op();
|
||||
my_decimal *decimal_op(my_decimal *);
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_ceiling>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_ceiling>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -1379,8 +1379,8 @@ public:
|
||||
longlong int_op();
|
||||
double real_op();
|
||||
my_decimal *decimal_op(my_decimal *);
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_floor>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_floor>(thd, this); }
|
||||
};
|
||||
|
||||
/* This handles round and truncate */
|
||||
@@ -1404,8 +1404,8 @@ public:
|
||||
{
|
||||
args[0]->type_handler()->Item_func_round_fix_length_and_dec(this);
|
||||
}
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_round>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_round>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -1429,8 +1429,8 @@ public:
|
||||
{
|
||||
return mark_unsupported_function(func_name(), "()", arg, VCOL_NON_DETERMINISTIC);
|
||||
}
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_rand>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_rand>(thd, this); }
|
||||
private:
|
||||
void seed_random (Item * val);
|
||||
};
|
||||
@@ -1446,8 +1446,8 @@ public:
|
||||
uint decimal_precision() const { return 1; }
|
||||
void fix_length_and_dec() { fix_char_length(2); }
|
||||
longlong val_int();
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_sign>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_sign>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -1465,8 +1465,8 @@ public:
|
||||
const char *func_name() const { return name; }
|
||||
void fix_length_and_dec()
|
||||
{ decimals= NOT_FIXED_DEC; max_length= float_length(decimals); }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_units>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_units>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -1560,8 +1560,8 @@ class Item_func_min :public Item_func_min_max
|
||||
public:
|
||||
Item_func_min(THD *thd, List<Item> &list): Item_func_min_max(thd, list, 1) {}
|
||||
const char *func_name() const { return "least"; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_min>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_min>(thd, this); }
|
||||
};
|
||||
|
||||
class Item_func_max :public Item_func_min_max
|
||||
@@ -1569,8 +1569,8 @@ class Item_func_max :public Item_func_min_max
|
||||
public:
|
||||
Item_func_max(THD *thd, List<Item> &list): Item_func_min_max(thd, list, -1) {}
|
||||
const char *func_name() const { return "greatest"; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_max>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_max>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -1601,8 +1601,8 @@ public:
|
||||
/* The item could be a NULL constant. */
|
||||
null_value= args[0]->is_null();
|
||||
}
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_rollup_const>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_rollup_const>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -1623,8 +1623,8 @@ public:
|
||||
Item_func_octet_length(THD *thd, Item *a): Item_long_func_length(thd, a) {}
|
||||
longlong val_int();
|
||||
const char *func_name() const { return "octet_length"; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_octet_length>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_octet_length>(thd, this); }
|
||||
};
|
||||
|
||||
class Item_func_bit_length :public Item_longlong_func
|
||||
@@ -1638,8 +1638,8 @@ public:
|
||||
}
|
||||
longlong val_int();
|
||||
const char *func_name() const { return "bit_length"; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_bit_length>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_bit_length>(thd, this); }
|
||||
};
|
||||
|
||||
class Item_func_char_length :public Item_long_func_length
|
||||
@@ -1649,8 +1649,8 @@ public:
|
||||
Item_func_char_length(THD *thd, Item *a): Item_long_func_length(thd, a) {}
|
||||
longlong val_int();
|
||||
const char *func_name() const { return "char_length"; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_char_length>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_char_length>(thd, this); }
|
||||
};
|
||||
|
||||
class Item_func_coercibility :public Item_long_func
|
||||
@@ -1670,8 +1670,8 @@ public:
|
||||
Item* propagate_equal_fields(THD *thd, const Context &ctx, COND_EQUAL *cond)
|
||||
{ return this; }
|
||||
bool const_item() const { return true; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_coercibility>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_coercibility>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -1703,8 +1703,8 @@ public:
|
||||
agg_arg_charsets_for_comparison(cmp_collation, args, 2);
|
||||
}
|
||||
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_locate>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_locate>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -1718,8 +1718,8 @@ public:
|
||||
longlong val_int();
|
||||
const char *func_name() const { return "field"; }
|
||||
void fix_length_and_dec();
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_field>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_field>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -1733,8 +1733,8 @@ public:
|
||||
longlong val_int();
|
||||
const char *func_name() const { return "ascii"; }
|
||||
void fix_length_and_dec() { max_length=3; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_ascii>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_ascii>(thd, this); }
|
||||
};
|
||||
|
||||
class Item_func_ord :public Item_long_func
|
||||
@@ -1747,8 +1747,8 @@ public:
|
||||
void fix_length_and_dec() { fix_char_length(7); }
|
||||
longlong val_int();
|
||||
const char *func_name() const { return "ord"; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_ord>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_ord>(thd, this); }
|
||||
};
|
||||
|
||||
class Item_func_find_in_set :public Item_long_func
|
||||
@@ -1765,8 +1765,8 @@ public:
|
||||
longlong val_int();
|
||||
const char *func_name() const { return "find_in_set"; }
|
||||
void fix_length_and_dec();
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_find_in_set>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_find_in_set>(thd, this); }
|
||||
};
|
||||
|
||||
/* Base class for all bit functions: '~', '|', '^', '&', '>>', '<<' */
|
||||
@@ -1794,8 +1794,8 @@ public:
|
||||
longlong val_int();
|
||||
const char *func_name() const { return "|"; }
|
||||
enum precedence precedence() const { return BITOR_PRECEDENCE; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_bit_or>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_bit_or>(thd, this); }
|
||||
};
|
||||
|
||||
class Item_func_bit_and :public Item_func_bit
|
||||
@@ -1805,8 +1805,8 @@ public:
|
||||
longlong val_int();
|
||||
const char *func_name() const { return "&"; }
|
||||
enum precedence precedence() const { return BITAND_PRECEDENCE; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_bit_and>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_bit_and>(thd, this); }
|
||||
};
|
||||
|
||||
class Item_func_bit_count :public Item_long_func
|
||||
@@ -1818,8 +1818,8 @@ public:
|
||||
longlong val_int();
|
||||
const char *func_name() const { return "bit_count"; }
|
||||
void fix_length_and_dec() { max_length=2; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_bit_count>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_bit_count>(thd, this); }
|
||||
};
|
||||
|
||||
class Item_func_shift_left :public Item_func_bit
|
||||
@@ -1829,8 +1829,8 @@ public:
|
||||
longlong val_int();
|
||||
const char *func_name() const { return "<<"; }
|
||||
enum precedence precedence() const { return SHIFT_PRECEDENCE; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_shift_left>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_shift_left>(thd, this); }
|
||||
};
|
||||
|
||||
class Item_func_shift_right :public Item_func_bit
|
||||
@@ -1840,8 +1840,8 @@ public:
|
||||
longlong val_int();
|
||||
const char *func_name() const { return ">>"; }
|
||||
enum precedence precedence() const { return SHIFT_PRECEDENCE; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_shift_right>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_shift_right>(thd, this); }
|
||||
};
|
||||
|
||||
class Item_func_bit_neg :public Item_func_bit
|
||||
@@ -1856,8 +1856,8 @@ public:
|
||||
str->append(func_name());
|
||||
args[0]->print_parenthesised(str, query_type, precedence());
|
||||
}
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_bit_neg>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_bit_neg>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -1881,8 +1881,8 @@ public:
|
||||
{
|
||||
return mark_unsupported_function(func_name(), "()", arg, VCOL_IMPOSSIBLE);
|
||||
}
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_last_insert_id>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_last_insert_id>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -1905,8 +1905,8 @@ public:
|
||||
{
|
||||
return mark_unsupported_function(func_name(), "()", arg, VCOL_IMPOSSIBLE);
|
||||
}
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_benchmark>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_benchmark>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -1932,8 +1932,8 @@ public:
|
||||
{
|
||||
return mark_unsupported_function(func_name(), "()", arg, VCOL_IMPOSSIBLE);
|
||||
}
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_sleep>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_sleep>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -2060,8 +2060,8 @@ class Item_func_udf_float :public Item_udf_func
|
||||
String *val_str(String *str);
|
||||
const Type_handler *type_handler() const { return &type_handler_double; }
|
||||
void fix_length_and_dec() { fix_num_length_and_dec(); }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_udf_float>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_udf_float>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -2078,8 +2078,8 @@ public:
|
||||
String *val_str(String *str);
|
||||
const Type_handler *type_handler() const { return &type_handler_longlong; }
|
||||
void fix_length_and_dec() { decimals= 0; max_length= 21; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_udf_int>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_udf_int>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -2096,8 +2096,8 @@ public:
|
||||
String *val_str(String *str);
|
||||
const Type_handler *type_handler() const { return &type_handler_newdecimal; }
|
||||
void fix_length_and_dec() { fix_num_length_and_dec(); }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_udf_decimal>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_udf_decimal>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -2135,8 +2135,8 @@ public:
|
||||
}
|
||||
const Type_handler *type_handler() const { return string_type_handler(); }
|
||||
void fix_length_and_dec();
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_udf_str>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_udf_str>(thd, this); }
|
||||
};
|
||||
|
||||
#else /* Dummy functions to get sql_yacc.cc compiled */
|
||||
@@ -2218,8 +2218,8 @@ class Item_func_get_lock :public Item_long_func
|
||||
{
|
||||
return mark_unsupported_function(func_name(), "()", arg, VCOL_IMPOSSIBLE);
|
||||
}
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_get_lock>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_get_lock>(thd, this); }
|
||||
};
|
||||
|
||||
class Item_func_release_lock :public Item_long_func
|
||||
@@ -2242,8 +2242,8 @@ public:
|
||||
{
|
||||
return mark_unsupported_function(func_name(), "()", arg, VCOL_IMPOSSIBLE);
|
||||
}
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_release_lock>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_release_lock>(thd, this); }
|
||||
};
|
||||
|
||||
/* replication functions */
|
||||
@@ -2273,8 +2273,8 @@ public:
|
||||
{
|
||||
return mark_unsupported_function(func_name(), "()", arg, VCOL_IMPOSSIBLE);
|
||||
}
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_master_pos_wait>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_master_pos_wait>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -2298,8 +2298,8 @@ public:
|
||||
{
|
||||
return mark_unsupported_function(func_name(), "()", arg, VCOL_IMPOSSIBLE);
|
||||
}
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_master_gtid_wait>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_master_gtid_wait>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -2406,8 +2406,8 @@ public:
|
||||
bool register_field_in_bitmap(void *arg);
|
||||
bool set_entry(THD *thd, bool create_if_not_exists);
|
||||
void cleanup();
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_set_user_var>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_set_user_var>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -2434,8 +2434,8 @@ public:
|
||||
table_map used_tables() const
|
||||
{ return const_item() ? 0 : RAND_TABLE_BIT; }
|
||||
bool eq(const Item *item, bool binary_cmp) const;
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_get_user_var>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_get_user_var>(thd, this); }
|
||||
private:
|
||||
bool set_value(THD *thd, sp_rcontext *ctx, Item **it);
|
||||
|
||||
@@ -2479,8 +2479,8 @@ public:
|
||||
void set_null_value(CHARSET_INFO* cs);
|
||||
void set_value(const char *str, uint length, CHARSET_INFO* cs);
|
||||
const Type_handler *type_handler() const { return &type_handler_double; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_user_var_as_out_param>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_user_var_as_out_param>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -2534,8 +2534,8 @@ public:
|
||||
|
||||
void cleanup();
|
||||
bool check_vcol_func_processor(void *arg);
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_get_system_var>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_get_system_var>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -2589,9 +2589,9 @@ public:
|
||||
{
|
||||
return mark_unsupported_function("match ... against()", arg, VCOL_IMPOSSIBLE);
|
||||
}
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_match>(thd, mem_root, this); }
|
||||
Item *build_clone(THD *thd, MEM_ROOT *mem_root) { return 0; }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_match>(thd, this); }
|
||||
Item *build_clone(THD *thd) { return 0; }
|
||||
private:
|
||||
/**
|
||||
Check whether storage engine for given table,
|
||||
@@ -2636,8 +2636,8 @@ public:
|
||||
longlong val_int();
|
||||
const char *func_name() const { return "^"; }
|
||||
enum precedence precedence() const { return BITXOR_PRECEDENCE; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_bit_xor>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_bit_xor>(thd, this); }
|
||||
};
|
||||
|
||||
class Item_func_is_free_lock :public Item_long_func
|
||||
@@ -2654,8 +2654,8 @@ public:
|
||||
{
|
||||
return mark_unsupported_function(func_name(), "()", arg, VCOL_IMPOSSIBLE);
|
||||
}
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_is_free_lock>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_is_free_lock>(thd, this); }
|
||||
};
|
||||
|
||||
class Item_func_is_used_lock :public Item_long_func
|
||||
@@ -2672,8 +2672,8 @@ public:
|
||||
{
|
||||
return mark_unsupported_function(func_name(), "()", arg, VCOL_IMPOSSIBLE);
|
||||
}
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_is_used_lock>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_is_used_lock>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -2721,8 +2721,8 @@ public:
|
||||
{
|
||||
return mark_unsupported_function(func_name(), "()", arg, VCOL_IMPOSSIBLE);
|
||||
}
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_row_count>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_row_count>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -2864,11 +2864,11 @@ public:
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_sp>(thd, mem_root, this); }
|
||||
Item *build_clone(THD *thd, MEM_ROOT *mem_root)
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_sp>(thd, this); }
|
||||
Item *build_clone(THD *thd)
|
||||
{
|
||||
Item_func_sp *clone= (Item_func_sp *) Item_func::build_clone(thd, mem_root);
|
||||
Item_func_sp *clone= (Item_func_sp *) Item_func::build_clone(thd);
|
||||
if (clone)
|
||||
clone->sp_result_field= NULL;
|
||||
return clone;
|
||||
@@ -2892,8 +2892,8 @@ public:
|
||||
{
|
||||
return mark_unsupported_function(func_name(), "()", arg, VCOL_IMPOSSIBLE);
|
||||
}
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_found_rows>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_found_rows>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -2911,8 +2911,8 @@ public:
|
||||
{
|
||||
return mark_unsupported_function(func_name(), "()", arg, VCOL_IMPOSSIBLE);
|
||||
}
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_oracle_sql_rowcount>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_oracle_sql_rowcount>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -2935,8 +2935,8 @@ public:
|
||||
maybe_null= null_value= false;
|
||||
max_length= 11;
|
||||
}
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_sqlcode>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_sqlcode>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -2955,8 +2955,8 @@ public:
|
||||
{
|
||||
return mark_unsupported_function(func_name(), "()", arg, VCOL_NON_DETERMINISTIC);
|
||||
}
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_uuid_short>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_uuid_short>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -2985,8 +2985,8 @@ public:
|
||||
Item_func::update_used_tables();
|
||||
maybe_null= last_value->maybe_null;
|
||||
}
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_last_value>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_last_value>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -3008,8 +3008,8 @@ public:
|
||||
maybe_null= 1; /* In case of errors */
|
||||
}
|
||||
bool const_item() const { return 0; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_nextval>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_nextval>(thd, this); }
|
||||
void print(String *str, enum_query_type query_type);
|
||||
bool check_vcol_func_processor(void *arg)
|
||||
{
|
||||
@@ -3028,8 +3028,8 @@ public:
|
||||
Item_func_nextval(thd, table) {}
|
||||
longlong val_int();
|
||||
const char *func_name() const { return "lastval"; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_lastval>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_lastval>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -3049,8 +3049,8 @@ public:
|
||||
longlong val_int();
|
||||
const char *func_name() const { return "setval"; }
|
||||
void print(String *str, enum_query_type query_type);
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_setval>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_setval>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -202,8 +202,8 @@ public:
|
||||
Item_geometry_func(thd, a, srid) {}
|
||||
const char *func_name() const { return "st_geometryfromtext"; }
|
||||
String *val_str(String *);
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_geometry_from_text>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_geometry_from_text>(thd, this); }
|
||||
};
|
||||
|
||||
class Item_func_geometry_from_wkb: public Item_geometry_func
|
||||
@@ -219,8 +219,8 @@ public:
|
||||
Item_geometry_func(thd, a, srid) {}
|
||||
const char *func_name() const { return "st_geometryfromwkb"; }
|
||||
String *val_str(String *);
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_geometry_from_wkb>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_geometry_from_wkb>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -241,8 +241,8 @@ public:
|
||||
Item_geometry_func(thd, js, opt, srid) {}
|
||||
const char *func_name() const { return "st_geomfromgeojson"; }
|
||||
String *val_str(String *);
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_geometry_from_json>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_geometry_from_json>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -254,8 +254,8 @@ public:
|
||||
const char *func_name() const { return "st_astext"; }
|
||||
String *val_str_ascii(String *);
|
||||
void fix_length_and_dec();
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_as_wkt>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_as_wkt>(thd, this); }
|
||||
};
|
||||
|
||||
class Item_func_as_wkb: public Item_binary_func_args_geometry
|
||||
@@ -273,8 +273,8 @@ public:
|
||||
max_length= (uint32) UINT_MAX32;
|
||||
maybe_null= 1;
|
||||
}
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_as_wkb>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_as_wkb>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -296,8 +296,8 @@ public:
|
||||
const char *func_name() const { return "st_asgeojson"; }
|
||||
void fix_length_and_dec();
|
||||
String *val_str_ascii(String *);
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_as_geojson>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_as_geojson>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -314,8 +314,8 @@ public:
|
||||
fix_length_and_charset(20, default_charset());
|
||||
maybe_null= 1;
|
||||
};
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_geometry_type>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_geometry_type>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -349,8 +349,8 @@ public:
|
||||
{}
|
||||
const char *func_name() const { return "st_convexhull"; }
|
||||
String *val_str(String *);
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_convexhull>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_convexhull>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -362,8 +362,8 @@ public:
|
||||
const char *func_name() const { return "st_centroid"; }
|
||||
String *val_str(String *);
|
||||
Field::geometry_type get_geometry_type() const;
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_centroid>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_centroid>(thd, this); }
|
||||
};
|
||||
|
||||
class Item_func_envelope: public Item_geometry_func_args_geometry
|
||||
@@ -374,8 +374,8 @@ public:
|
||||
const char *func_name() const { return "st_envelope"; }
|
||||
String *val_str(String *);
|
||||
Field::geometry_type get_geometry_type() const;
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_envelope>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_envelope>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -408,8 +408,8 @@ public:
|
||||
:Item_geometry_func_args_geometry(thd, a) {}
|
||||
const char *func_name() const { return "st_boundary"; }
|
||||
String *val_str(String *);
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_boundary>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_boundary>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -424,8 +424,8 @@ public:
|
||||
const char *func_name() const { return "point"; }
|
||||
String *val_str(String *);
|
||||
Field::geometry_type get_geometry_type() const;
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_point>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_point>(thd, this); }
|
||||
};
|
||||
|
||||
class Item_func_spatial_decomp: public Item_geometry_func_args_geometry
|
||||
@@ -450,8 +450,8 @@ public:
|
||||
}
|
||||
}
|
||||
String *val_str(String *);
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_spatial_decomp>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_spatial_decomp>(thd, this); }
|
||||
};
|
||||
|
||||
class Item_func_spatial_decomp_n: public Item_geometry_func_args_geometry
|
||||
@@ -483,8 +483,8 @@ public:
|
||||
}
|
||||
}
|
||||
String *val_str(String *);
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_spatial_decomp_n>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_spatial_decomp_n>(thd, this); }
|
||||
};
|
||||
|
||||
class Item_func_spatial_collection: public Item_geometry_func
|
||||
@@ -521,8 +521,8 @@ public:
|
||||
}
|
||||
|
||||
const char *func_name() const { return "geometrycollection"; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_spatial_collection>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_spatial_collection>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -571,7 +571,7 @@ public:
|
||||
usable_tables, sargables, false);
|
||||
}
|
||||
bool need_parentheses_in_default() { return false; }
|
||||
Item *build_clone(THD *thd, MEM_ROOT *mem_root) { return 0; }
|
||||
Item *build_clone(THD *thd) { return 0; }
|
||||
};
|
||||
|
||||
|
||||
@@ -583,8 +583,8 @@ public:
|
||||
{ }
|
||||
longlong val_int();
|
||||
const char *func_name() const;
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_spatial_mbr_rel>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_spatial_mbr_rel>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -599,8 +599,8 @@ public:
|
||||
{ }
|
||||
longlong val_int();
|
||||
const char *func_name() const;
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_spatial_precise_rel>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_spatial_precise_rel>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -622,8 +622,8 @@ public:
|
||||
longlong val_int();
|
||||
const char *func_name() const { return "st_relate"; }
|
||||
bool need_parentheses_in_default() { return false; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_spatial_relate>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_spatial_relate>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -658,8 +658,8 @@ public:
|
||||
{
|
||||
Item_func::print(str, query_type);
|
||||
}
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_spatial_operation>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_spatial_operation>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -715,8 +715,8 @@ public:
|
||||
:Item_geometry_func_args_geometry(thd, obj, distance) {}
|
||||
const char *func_name() const { return "st_buffer"; }
|
||||
String *val_str(String *);
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_buffer>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_buffer>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -729,8 +729,8 @@ public:
|
||||
const char *func_name() const { return "st_isempty"; }
|
||||
void fix_length_and_dec() { maybe_null= 1; }
|
||||
bool need_parentheses_in_default() { return false; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_isempty>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_isempty>(thd, this); }
|
||||
};
|
||||
|
||||
class Item_func_issimple: public Item_long_func_args_geometry
|
||||
@@ -746,8 +746,8 @@ public:
|
||||
const char *func_name() const { return "st_issimple"; }
|
||||
void fix_length_and_dec() { decimals=0; max_length=2; }
|
||||
uint decimal_precision() const { return 1; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_issimple>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_issimple>(thd, this); }
|
||||
};
|
||||
|
||||
class Item_func_isclosed: public Item_long_func_args_geometry
|
||||
@@ -759,8 +759,8 @@ public:
|
||||
const char *func_name() const { return "st_isclosed"; }
|
||||
void fix_length_and_dec() { decimals=0; max_length=2; }
|
||||
uint decimal_precision() const { return 1; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_isclosed>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_isclosed>(thd, this); }
|
||||
};
|
||||
|
||||
class Item_func_isring: public Item_func_issimple
|
||||
@@ -769,8 +769,8 @@ public:
|
||||
Item_func_isring(THD *thd, Item *a): Item_func_issimple(thd, a) {}
|
||||
longlong val_int();
|
||||
const char *func_name() const { return "st_isring"; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_isring>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_isring>(thd, this); }
|
||||
};
|
||||
|
||||
class Item_func_dimension: public Item_long_func_args_geometry
|
||||
@@ -781,8 +781,8 @@ public:
|
||||
longlong val_int();
|
||||
const char *func_name() const { return "st_dimension"; }
|
||||
void fix_length_and_dec() { max_length= 10; maybe_null= 1; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_dimension>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_dimension>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -797,8 +797,8 @@ public:
|
||||
Item_real_func::fix_length_and_dec();
|
||||
maybe_null= 1;
|
||||
}
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_x>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_x>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -813,8 +813,8 @@ public:
|
||||
Item_real_func::fix_length_and_dec();
|
||||
maybe_null= 1;
|
||||
}
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_y>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_y>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -826,8 +826,8 @@ public:
|
||||
longlong val_int();
|
||||
const char *func_name() const { return "st_numgeometries"; }
|
||||
void fix_length_and_dec() { max_length= 10; maybe_null= 1; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_numgeometries>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_numgeometries>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -839,8 +839,8 @@ public:
|
||||
longlong val_int();
|
||||
const char *func_name() const { return "st_numinteriorrings"; }
|
||||
void fix_length_and_dec() { max_length= 10; maybe_null= 1; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_numinteriorring>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_numinteriorring>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -852,8 +852,8 @@ public:
|
||||
longlong val_int();
|
||||
const char *func_name() const { return "st_numpoints"; }
|
||||
void fix_length_and_dec() { max_length= 10; maybe_null= 1; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_numpoints>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_numpoints>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -868,8 +868,8 @@ public:
|
||||
Item_real_func::fix_length_and_dec();
|
||||
maybe_null= 1;
|
||||
}
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_area>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_area>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -886,8 +886,8 @@ public:
|
||||
Item_real_func::fix_length_and_dec();
|
||||
maybe_null= 1;
|
||||
}
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_glength>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_glength>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -899,8 +899,8 @@ public:
|
||||
longlong val_int();
|
||||
const char *func_name() const { return "srid"; }
|
||||
void fix_length_and_dec() { max_length= 10; maybe_null= 1; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_srid>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_srid>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -916,8 +916,8 @@ public:
|
||||
:Item_real_func_args_geometry_geometry(thd, a, b) {}
|
||||
double val_real();
|
||||
const char *func_name() const { return "st_distance"; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_distance>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_distance>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -933,8 +933,8 @@ public:
|
||||
const char *func_name() const { return "st_pointonsurface"; }
|
||||
String *val_str(String *);
|
||||
Field::geometry_type get_geometry_type() const;
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_pointonsurface>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_pointonsurface>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -951,8 +951,8 @@ class Item_func_gis_debug: public Item_long_func
|
||||
{
|
||||
return mark_unsupported_function(func_name(), "()", arg, VCOL_IMPOSSIBLE);
|
||||
}
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_gis_debug>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_gis_debug>(thd, this); }
|
||||
};
|
||||
#endif
|
||||
|
||||
|
||||
@@ -39,8 +39,8 @@ public:
|
||||
maybe_null= 1;
|
||||
unsigned_flag= 1;
|
||||
}
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_inet_aton>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_inet_aton>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -61,8 +61,8 @@ public:
|
||||
fix_length_and_charset(3 * 8 + 7, default_charset());
|
||||
maybe_null= 1;
|
||||
}
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_inet_ntoa>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_inet_ntoa>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -130,8 +130,8 @@ public:
|
||||
fix_length_and_charset(16, &my_charset_bin);
|
||||
maybe_null= 1;
|
||||
}
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_inet6_aton>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_inet6_aton>(thd, this); }
|
||||
|
||||
protected:
|
||||
virtual bool calc_value(const String *arg, String *buffer);
|
||||
@@ -164,8 +164,8 @@ public:
|
||||
|
||||
maybe_null= 1;
|
||||
}
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_inet6_ntoa>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_inet6_ntoa>(thd, this); }
|
||||
|
||||
protected:
|
||||
virtual bool calc_value(const String *arg, String *buffer);
|
||||
@@ -186,8 +186,8 @@ public:
|
||||
public:
|
||||
virtual const char *func_name() const
|
||||
{ return "is_ipv4"; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_is_ipv4>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_is_ipv4>(thd, this); }
|
||||
|
||||
protected:
|
||||
virtual bool calc_value(const String *arg);
|
||||
@@ -208,8 +208,8 @@ public:
|
||||
public:
|
||||
virtual const char *func_name() const
|
||||
{ return "is_ipv6"; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_is_ipv6>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_is_ipv6>(thd, this); }
|
||||
|
||||
protected:
|
||||
virtual bool calc_value(const String *arg);
|
||||
@@ -230,8 +230,8 @@ public:
|
||||
public:
|
||||
virtual const char *func_name() const
|
||||
{ return "is_ipv4_compat"; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_is_ipv4_compat>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_is_ipv4_compat>(thd, this); }
|
||||
|
||||
protected:
|
||||
virtual bool calc_value(const String *arg);
|
||||
@@ -252,8 +252,8 @@ public:
|
||||
public:
|
||||
virtual const char *func_name() const
|
||||
{ return "is_ipv4_mapped"; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_is_ipv4_mapped>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_is_ipv4_mapped>(thd, this); }
|
||||
|
||||
protected:
|
||||
virtual bool calc_value(const String *arg);
|
||||
|
||||
@@ -54,8 +54,8 @@ public:
|
||||
Item_bool_func::fix_length_and_dec();
|
||||
maybe_null= 1;
|
||||
}
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_json_valid>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_json_valid>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -70,8 +70,8 @@ public:
|
||||
Item_bool_func(thd, js, i_path) {}
|
||||
const char *func_name() const { return "json_exists"; }
|
||||
void fix_length_and_dec();
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_json_exists>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_json_exists>(thd, this); }
|
||||
longlong val_int();
|
||||
};
|
||||
|
||||
@@ -89,8 +89,8 @@ public:
|
||||
void fix_length_and_dec();
|
||||
String *val_str(String *);
|
||||
virtual bool check_and_get_value(json_engine_t *je, String *res, int *error);
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_json_value>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_json_value>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -102,8 +102,8 @@ public:
|
||||
bool is_json_type() { return true; }
|
||||
const char *func_name() const { return "json_query"; }
|
||||
bool check_and_get_value(json_engine_t *je, String *res, int *error);
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_json_query>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_json_query>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -117,8 +117,8 @@ public:
|
||||
const char *func_name() const { return "json_quote"; }
|
||||
void fix_length_and_dec();
|
||||
String *val_str(String *);
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_json_quote>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_json_quote>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -132,8 +132,8 @@ public:
|
||||
const char *func_name() const { return "json_unquote"; }
|
||||
void fix_length_and_dec();
|
||||
String *val_str(String *);
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_json_unquote>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_json_unquote>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -168,8 +168,8 @@ public:
|
||||
longlong val_int();
|
||||
double val_real();
|
||||
uint get_n_paths() const { return arg_count - 1; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_json_extract>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_json_extract>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -187,8 +187,8 @@ public:
|
||||
const char *func_name() const { return "json_contains"; }
|
||||
void fix_length_and_dec();
|
||||
longlong val_int();
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_json_contains>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_json_contains>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -210,8 +210,8 @@ public:
|
||||
void fix_length_and_dec();
|
||||
void cleanup();
|
||||
longlong val_int();
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_json_contains_path>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_json_contains_path>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -229,8 +229,8 @@ public:
|
||||
bool is_json_type() { return true; }
|
||||
void fix_length_and_dec();
|
||||
const char *func_name() const { return "json_array"; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_json_array>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_json_array>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -246,8 +246,8 @@ public:
|
||||
String *val_str(String *);
|
||||
uint get_n_paths() const { return arg_count/2; }
|
||||
const char *func_name() const { return "json_array_append"; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_json_array_append>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_json_array_append>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -258,8 +258,8 @@ public:
|
||||
Item_func_json_array_append(thd, list) {}
|
||||
String *val_str(String *);
|
||||
const char *func_name() const { return "json_array_insert"; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_json_array_insert>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_json_array_insert>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -273,8 +273,8 @@ public:
|
||||
String *val_str(String *);
|
||||
bool is_json_type() { return true; }
|
||||
const char *func_name() const { return "json_object"; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_json_object>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_json_object>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -288,8 +288,8 @@ public:
|
||||
String *val_str(String *);
|
||||
bool is_json_type() { return true; }
|
||||
const char *func_name() const { return "json_merge"; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_json_merge>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_json_merge>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -311,8 +311,8 @@ public:
|
||||
const char *func_name() const { return "json_length"; }
|
||||
void fix_length_and_dec();
|
||||
longlong val_int();
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_json_length>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_json_length>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -327,8 +327,8 @@ public:
|
||||
const char *func_name() const { return "json_depth"; }
|
||||
void fix_length_and_dec() { max_length= 10; }
|
||||
longlong val_int();
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_json_depth>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_json_depth>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -341,8 +341,8 @@ public:
|
||||
const char *func_name() const { return "json_type"; }
|
||||
void fix_length_and_dec();
|
||||
String *val_str(String *);
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_json_type>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_json_type>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -364,8 +364,8 @@ public:
|
||||
return mode_insert ?
|
||||
(mode_replace ? "json_set" : "json_insert") : "json_update";
|
||||
}
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_json_insert>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_json_insert>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -380,8 +380,8 @@ public:
|
||||
String *val_str(String *);
|
||||
uint get_n_paths() const { return arg_count - 1; }
|
||||
const char *func_name() const { return "json_remove"; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_json_remove>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_json_remove>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -397,8 +397,8 @@ public:
|
||||
const char *func_name() const { return "json_keys"; }
|
||||
void fix_length_and_dec();
|
||||
String *val_str(String *);
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_json_keys>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_json_keys>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -422,8 +422,8 @@ public:
|
||||
void fix_length_and_dec();
|
||||
String *val_str(String *);
|
||||
uint get_n_paths() const { return arg_count > 4 ? arg_count - 4 : 0; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_json_search>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_json_search>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -451,8 +451,8 @@ public:
|
||||
String *val_str(String *str);
|
||||
String *val_json(String *str);
|
||||
bool is_json_type() { return true; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_json_format>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_json_format>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -163,15 +163,15 @@ void Item_row::bring_value()
|
||||
}
|
||||
|
||||
|
||||
Item* Item_row::build_clone(THD *thd, MEM_ROOT *mem_root)
|
||||
Item* Item_row::build_clone(THD *thd)
|
||||
{
|
||||
Item_row *copy= (Item_row *) get_copy(thd, mem_root);
|
||||
Item_row *copy= (Item_row *) get_copy(thd);
|
||||
if (!copy)
|
||||
return 0;
|
||||
copy->args= (Item**) alloc_root(mem_root, sizeof(Item*) * arg_count);
|
||||
copy->args= (Item**) alloc_root(thd->mem_root, sizeof(Item*) * arg_count);
|
||||
for (uint i= 0; i < arg_count; i++)
|
||||
{
|
||||
Item *arg_clone= args[i]->build_clone(thd, mem_root);
|
||||
Item *arg_clone= args[i]->build_clone(thd);
|
||||
if (!arg_clone)
|
||||
return 0;
|
||||
copy->args[i]= arg_clone;
|
||||
|
||||
@@ -128,9 +128,9 @@ public:
|
||||
}
|
||||
|
||||
bool check_vcol_func_processor(void *arg) {return FALSE; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_row>(thd, mem_root, this); }
|
||||
Item *build_clone(THD *thd, MEM_ROOT *mem_root);
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_row>(thd, this); }
|
||||
Item *build_clone(THD *thd);
|
||||
};
|
||||
|
||||
#endif /* ITEM_ROW_INCLUDED */
|
||||
|
||||
@@ -147,8 +147,8 @@ public:
|
||||
fix_length_and_charset(32, default_charset());
|
||||
}
|
||||
const char *func_name() const { return "md5"; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_md5>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_md5>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -159,8 +159,8 @@ public:
|
||||
String *val_str_ascii(String *);
|
||||
void fix_length_and_dec();
|
||||
const char *func_name() const { return "sha"; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_sha>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_sha>(thd, this); }
|
||||
};
|
||||
|
||||
class Item_func_sha2 :public Item_str_ascii_checksum_func
|
||||
@@ -171,8 +171,8 @@ public:
|
||||
String *val_str_ascii(String *);
|
||||
void fix_length_and_dec();
|
||||
const char *func_name() const { return "sha2"; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_sha2>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_sha2>(thd, this); }
|
||||
};
|
||||
|
||||
class Item_func_to_base64 :public Item_str_ascii_checksum_func
|
||||
@@ -184,8 +184,8 @@ public:
|
||||
String *val_str_ascii(String *);
|
||||
void fix_length_and_dec();
|
||||
const char *func_name() const { return "to_base64"; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_to_base64>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_to_base64>(thd, this); }
|
||||
};
|
||||
|
||||
class Item_func_from_base64 :public Item_str_binary_checksum_func
|
||||
@@ -197,8 +197,8 @@ public:
|
||||
String *val_str(String *);
|
||||
void fix_length_and_dec();
|
||||
const char *func_name() const { return "from_base64"; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_from_base64>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_from_base64>(thd, this); }
|
||||
};
|
||||
|
||||
#include <my_crypt.h>
|
||||
@@ -223,8 +223,8 @@ public:
|
||||
Item_aes_crypt(thd, a, b) {}
|
||||
void fix_length_and_dec();
|
||||
const char *func_name() const { return "aes_encrypt"; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_aes_encrypt>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_aes_encrypt>(thd, this); }
|
||||
};
|
||||
|
||||
class Item_func_aes_decrypt :public Item_aes_crypt
|
||||
@@ -234,8 +234,8 @@ public:
|
||||
Item_aes_crypt(thd, a, b) {}
|
||||
void fix_length_and_dec();
|
||||
const char *func_name() const { return "aes_decrypt"; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_aes_decrypt>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_aes_decrypt>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -281,8 +281,8 @@ public:
|
||||
String *val_str(String *);
|
||||
void fix_length_and_dec();
|
||||
const char *func_name() const { return "concat"; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_concat>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_concat>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -301,9 +301,9 @@ public:
|
||||
{ }
|
||||
String *val_str(String *);
|
||||
const char *func_name() const { return "concat_operator_oracle"; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
Item *get_copy(THD *thd)
|
||||
{
|
||||
return get_item_copy<Item_func_concat_operator_oracle>(thd, mem_root, this);
|
||||
return get_item_copy<Item_func_concat_operator_oracle>(thd, this);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -321,8 +321,8 @@ public:
|
||||
maybe_null= 1;
|
||||
}
|
||||
const char *func_name() const { return "decode_histogram"; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_decode_histogram>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_decode_histogram>(thd, this); }
|
||||
};
|
||||
|
||||
class Item_func_concat_ws :public Item_str_func
|
||||
@@ -334,8 +334,8 @@ public:
|
||||
void fix_length_and_dec();
|
||||
const char *func_name() const { return "concat_ws"; }
|
||||
table_map not_null_tables() const { return 0; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_concat_ws>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_concat_ws>(thd, this); }
|
||||
};
|
||||
|
||||
class Item_func_reverse :public Item_str_func
|
||||
@@ -346,8 +346,8 @@ public:
|
||||
String *val_str(String *);
|
||||
void fix_length_and_dec();
|
||||
const char *func_name() const { return "reverse"; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_reverse>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_reverse>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -361,8 +361,8 @@ public:
|
||||
void fix_length_and_dec();
|
||||
String *val_str_internal(String *str, String *empty_string_for_null);
|
||||
const char *func_name() const { return "replace"; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_replace>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_replace>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -374,8 +374,8 @@ public:
|
||||
Item_func_replace(thd, org, find, replace) {}
|
||||
String *val_str(String *to) { return val_str_internal(to, &tmp_emtpystr); };
|
||||
const char *func_name() const { return "replace_oracle"; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_replace_oracle>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_replace_oracle>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -400,7 +400,7 @@ public:
|
||||
bool fix_fields(THD *thd, Item **ref);
|
||||
void fix_length_and_dec();
|
||||
const char *func_name() const { return "regexp_replace"; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root) { return 0;}
|
||||
Item *get_copy(THD *thd) { return 0;}
|
||||
};
|
||||
|
||||
|
||||
@@ -422,7 +422,7 @@ public:
|
||||
bool fix_fields(THD *thd, Item **ref);
|
||||
void fix_length_and_dec();
|
||||
const char *func_name() const { return "regexp_substr"; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root) { return 0; }
|
||||
Item *get_copy(THD *thd) { return 0; }
|
||||
};
|
||||
|
||||
|
||||
@@ -436,8 +436,8 @@ public:
|
||||
String *val_str(String *);
|
||||
void fix_length_and_dec();
|
||||
const char *func_name() const { return "insert"; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_insert>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_insert>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -459,8 +459,8 @@ public:
|
||||
Item_func_lcase(THD *thd, Item *item): Item_str_conv(thd, item) {}
|
||||
const char *func_name() const { return "lcase"; }
|
||||
void fix_length_and_dec();
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_lcase>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_lcase>(thd, this); }
|
||||
};
|
||||
|
||||
class Item_func_ucase :public Item_str_conv
|
||||
@@ -469,8 +469,8 @@ public:
|
||||
Item_func_ucase(THD *thd, Item *item): Item_str_conv(thd, item) {}
|
||||
const char *func_name() const { return "ucase"; }
|
||||
void fix_length_and_dec();
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_ucase>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_ucase>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -482,8 +482,8 @@ public:
|
||||
String *val_str(String *);
|
||||
void fix_length_and_dec();
|
||||
const char *func_name() const { return "left"; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_left>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_left>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -495,8 +495,8 @@ public:
|
||||
String *val_str(String *);
|
||||
void fix_length_and_dec();
|
||||
const char *func_name() const { return "right"; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_right>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_right>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -512,8 +512,8 @@ public:
|
||||
String *val_str(String *);
|
||||
void fix_length_and_dec();
|
||||
const char *func_name() const { return "substr"; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_substr>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_substr>(thd, this); }
|
||||
};
|
||||
|
||||
class Item_func_substr_oracle :public Item_func_substr
|
||||
@@ -527,8 +527,8 @@ public:
|
||||
Item_func_substr_oracle(THD *thd, Item *a, Item *b, Item *c):
|
||||
Item_func_substr(thd, a, b, c) {}
|
||||
const char *func_name() const { return "substr_oracle"; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_substr_oracle>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_substr_oracle>(thd, this); }
|
||||
};
|
||||
|
||||
class Item_func_substr_index :public Item_str_func
|
||||
@@ -540,8 +540,8 @@ public:
|
||||
String *val_str(String *);
|
||||
void fix_length_and_dec();
|
||||
const char *func_name() const { return "substring_index"; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_substr_index>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_substr_index>(thd, this); }
|
||||
|
||||
};
|
||||
|
||||
@@ -574,8 +574,8 @@ public:
|
||||
const char *func_name() const { return "trim"; }
|
||||
void print(String *str, enum_query_type query_type);
|
||||
virtual const char *mode_name() const { return "both"; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_trim>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_trim>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -587,8 +587,8 @@ public:
|
||||
String *val_str(String *);
|
||||
const char *func_name() const { return "ltrim"; }
|
||||
const char *mode_name() const { return "leading"; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_ltrim>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_ltrim>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -600,8 +600,8 @@ public:
|
||||
String *val_str(String *);
|
||||
const char *func_name() const { return "rtrim"; }
|
||||
const char *mode_name() const { return "trailing"; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_rtrim>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_rtrim>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -639,8 +639,8 @@ public:
|
||||
"password" : "old_password"); }
|
||||
static char *alloc(THD *thd, const char *password, size_t pass_len,
|
||||
enum PW_Alg al);
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_password>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_password>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -661,8 +661,8 @@ public:
|
||||
max_length = args[0]->max_length + 9;
|
||||
}
|
||||
const char *func_name() const { return "des_encrypt"; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_des_encrypt>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_des_encrypt>(thd, this); }
|
||||
};
|
||||
|
||||
class Item_func_des_decrypt :public Item_str_binary_checksum_func
|
||||
@@ -683,8 +683,8 @@ public:
|
||||
max_length-= 9U;
|
||||
}
|
||||
const char *func_name() const { return "des_decrypt"; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_des_decrypt>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_des_decrypt>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -719,8 +719,8 @@ public:
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_encrypt>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_encrypt>(thd, this); }
|
||||
};
|
||||
|
||||
#include "sql_crypt.h"
|
||||
@@ -739,8 +739,8 @@ public:
|
||||
String *val_str(String *);
|
||||
void fix_length_and_dec();
|
||||
const char *func_name() const { return "encode"; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_encode>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_encode>(thd, this); }
|
||||
protected:
|
||||
virtual void crypto_transform(String *);
|
||||
private:
|
||||
@@ -754,8 +754,8 @@ class Item_func_decode :public Item_func_encode
|
||||
public:
|
||||
Item_func_decode(THD *thd, Item *a, Item *seed_arg): Item_func_encode(thd, a, seed_arg) {}
|
||||
const char *func_name() const { return "decode"; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_decode>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_decode>(thd, this); }
|
||||
protected:
|
||||
void crypto_transform(String *);
|
||||
};
|
||||
@@ -794,8 +794,8 @@ public:
|
||||
}
|
||||
const char *func_name() const { return "database"; }
|
||||
const char *fully_qualified_func_name() const { return "database()"; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_database>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_database>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -815,8 +815,8 @@ public:
|
||||
max_length= 512 * system_charset_info->mbmaxlen;
|
||||
null_value= maybe_null= false;
|
||||
}
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_sqlerrm>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_sqlerrm>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -847,8 +847,8 @@ public:
|
||||
{
|
||||
return save_str_value_in_field(field, &str_value);
|
||||
}
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_user>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_user>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -897,8 +897,8 @@ public:
|
||||
return mark_unsupported_function(fully_qualified_func_name(), arg,
|
||||
VCOL_SESSION_FUNC);
|
||||
}
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_current_role>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_current_role>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -910,8 +910,8 @@ public:
|
||||
String *val_str(String *);
|
||||
void fix_length_and_dec();
|
||||
const char *func_name() const { return "soundex"; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_soundex>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_soundex>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -924,8 +924,8 @@ public:
|
||||
String *val_str(String *str);
|
||||
void fix_length_and_dec();
|
||||
const char *func_name() const { return "elt"; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_elt>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_elt>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -938,8 +938,8 @@ public:
|
||||
String *val_str(String *str);
|
||||
void fix_length_and_dec();
|
||||
const char *func_name() const { return "make_set"; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_make_set>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_make_set>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -955,8 +955,8 @@ public:
|
||||
String *val_str_ascii(String *);
|
||||
void fix_length_and_dec();
|
||||
const char *func_name() const { return "format"; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_format>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_format>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -978,8 +978,8 @@ public:
|
||||
max_length= arg_count * 4;
|
||||
}
|
||||
const char *func_name() const { return "char"; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_char>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_char>(thd, this); }
|
||||
};
|
||||
|
||||
class Item_func_chr :public Item_func_char
|
||||
@@ -993,8 +993,8 @@ public:
|
||||
max_length= 4;
|
||||
}
|
||||
const char *func_name() const { return "chr"; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_chr>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_chr>(thd, this); }
|
||||
};
|
||||
|
||||
class Item_func_repeat :public Item_str_func
|
||||
@@ -1006,8 +1006,8 @@ public:
|
||||
String *val_str(String *);
|
||||
void fix_length_and_dec();
|
||||
const char *func_name() const { return "repeat"; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_repeat>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_repeat>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -1018,8 +1018,8 @@ public:
|
||||
String *val_str(String *);
|
||||
void fix_length_and_dec();
|
||||
const char *func_name() const { return "space"; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_space>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_space>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -1035,8 +1035,8 @@ public:
|
||||
{
|
||||
return mark_unsupported_function(func_name(), "()", arg, VCOL_IMPOSSIBLE);
|
||||
}
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_binlog_gtid_pos>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_binlog_gtid_pos>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -1062,8 +1062,8 @@ public:
|
||||
Item_func_pad(thd, arg1, arg2) {}
|
||||
String *val_str(String *);
|
||||
const char *func_name() const { return "rpad"; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_rpad>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_rpad>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -1076,8 +1076,8 @@ public:
|
||||
Item_func_pad(thd, arg1, arg2) {}
|
||||
String *val_str(String *);
|
||||
const char *func_name() const { return "lpad"; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_lpad>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_lpad>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -1094,8 +1094,8 @@ public:
|
||||
max_length=64;
|
||||
maybe_null= 1;
|
||||
}
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_conv>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_conv>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -1129,8 +1129,8 @@ public:
|
||||
fix_char_length(args[0]->max_length * 2);
|
||||
m_arg0_type_handler= args[0]->type_handler();
|
||||
}
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_hex>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_hex>(thd, this); }
|
||||
};
|
||||
|
||||
class Item_func_unhex :public Item_str_func
|
||||
@@ -1150,8 +1150,8 @@ public:
|
||||
decimals=0;
|
||||
max_length=(1+args[0]->max_length)/2;
|
||||
}
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_unhex>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_unhex>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -1182,8 +1182,8 @@ public:
|
||||
Item_func_like_range_min(THD *thd, Item *a, Item *b):
|
||||
Item_func_like_range(thd, a, b, true) { }
|
||||
const char *func_name() const { return "like_range_min"; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_like_range_min>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_like_range_min>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -1193,8 +1193,8 @@ public:
|
||||
Item_func_like_range_max(THD *thd, Item *a, Item *b):
|
||||
Item_func_like_range(thd, a, b, false) { }
|
||||
const char *func_name() const { return "like_range_max"; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_like_range_max>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_like_range_max>(thd, this); }
|
||||
};
|
||||
#endif
|
||||
|
||||
@@ -1220,8 +1220,8 @@ public:
|
||||
void print(String *str, enum_query_type query_type);
|
||||
const char *func_name() const { return "cast_as_binary"; }
|
||||
bool need_parentheses_in_default() { return true; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_binary>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_binary>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -1242,8 +1242,8 @@ public:
|
||||
{
|
||||
return mark_unsupported_function(func_name(), "()", arg, VCOL_IMPOSSIBLE);
|
||||
}
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_load_file>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_load_file>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -1259,8 +1259,8 @@ class Item_func_export_set: public Item_str_func
|
||||
String *val_str(String *str);
|
||||
void fix_length_and_dec();
|
||||
const char *func_name() const { return "export_set"; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_export_set>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_export_set>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -1278,8 +1278,8 @@ public:
|
||||
2 * collation.collation->mbmaxlen;
|
||||
max_length= (uint32) MY_MIN(max_result_length, MAX_BLOB_WIDTH);
|
||||
}
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_quote>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_quote>(thd, this); }
|
||||
};
|
||||
|
||||
class Item_func_conv_charset :public Item_str_func
|
||||
@@ -1362,8 +1362,8 @@ public:
|
||||
void fix_length_and_dec();
|
||||
const char *func_name() const { return "convert"; }
|
||||
void print(String *str, enum_query_type query_type);
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_conv_charset>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_conv_charset>(thd, this); }
|
||||
};
|
||||
|
||||
class Item_func_set_collation :public Item_str_func
|
||||
@@ -1384,8 +1384,8 @@ public:
|
||||
return args[0]->field_for_view_update();
|
||||
}
|
||||
bool need_parentheses_in_default() { return true; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_set_collation>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_set_collation>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -1413,8 +1413,8 @@ public:
|
||||
:Item_func_expr_str_metadata(thd, a) { }
|
||||
String *val_str(String *);
|
||||
const char *func_name() const { return "charset"; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_charset>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_charset>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -1425,8 +1425,8 @@ public:
|
||||
:Item_func_expr_str_metadata(thd, a) {}
|
||||
String *val_str(String *);
|
||||
const char *func_name() const { return "collation"; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_collation>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_collation>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -1460,8 +1460,8 @@ public:
|
||||
Item* propagate_equal_fields(THD *thd, const Context &ctx, COND_EQUAL *cond)
|
||||
{ return this; }
|
||||
void print(String *str, enum_query_type query_type);
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_weight_string>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_weight_string>(thd, this); }
|
||||
};
|
||||
|
||||
class Item_func_crc32 :public Item_long_func
|
||||
@@ -1475,8 +1475,8 @@ public:
|
||||
const char *func_name() const { return "crc32"; }
|
||||
void fix_length_and_dec() { max_length=10; }
|
||||
longlong val_int();
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_crc32>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_crc32>(thd, this); }
|
||||
};
|
||||
|
||||
class Item_func_uncompressed_length : public Item_long_func_length
|
||||
@@ -1488,8 +1488,8 @@ public:
|
||||
const char *func_name() const{return "uncompressed_length";}
|
||||
void fix_length_and_dec() { max_length=10; maybe_null= true; }
|
||||
longlong val_int();
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_uncompressed_length>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_uncompressed_length>(thd, this); }
|
||||
};
|
||||
|
||||
#ifdef HAVE_COMPRESS
|
||||
@@ -1507,8 +1507,8 @@ public:
|
||||
void fix_length_and_dec(){max_length= (args[0]->max_length*120)/100+12;}
|
||||
const char *func_name() const{return "compress";}
|
||||
String *val_str(String *) ZLIB_DEPENDED_FUNCTION
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_compress>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_compress>(thd, this); }
|
||||
};
|
||||
|
||||
class Item_func_uncompress: public Item_str_binary_checksum_func
|
||||
@@ -1520,8 +1520,8 @@ public:
|
||||
void fix_length_and_dec(){ maybe_null= 1; max_length= MAX_BLOB_WIDTH; }
|
||||
const char *func_name() const{return "uncompress";}
|
||||
String *val_str(String *) ZLIB_DEPENDED_FUNCTION
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_uncompress>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_uncompress>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -1541,8 +1541,8 @@ public:
|
||||
{
|
||||
return mark_unsupported_function(func_name(), "()", arg, VCOL_NON_DETERMINISTIC);
|
||||
}
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_uuid>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_uuid>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -1564,8 +1564,8 @@ public:
|
||||
String *val_str(String *);
|
||||
void print(String *str, enum_query_type query_type);
|
||||
enum Functype functype() const { return DYNCOL_FUNC; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_dyncol_create>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_dyncol_create>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -1578,8 +1578,8 @@ public:
|
||||
const char *func_name() const{ return "column_add"; }
|
||||
String *val_str(String *);
|
||||
void print(String *str, enum_query_type query_type);
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_dyncol_add>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_dyncol_add>(thd, this); }
|
||||
};
|
||||
|
||||
class Item_func_dyncol_json: public Item_str_func
|
||||
@@ -1595,8 +1595,8 @@ public:
|
||||
collation.set(&my_charset_bin);
|
||||
decimals= 0;
|
||||
}
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_dyncol_json>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_dyncol_json>(thd, this); }
|
||||
};
|
||||
|
||||
/*
|
||||
@@ -1637,8 +1637,8 @@ public:
|
||||
bool get_dyn_value(THD *thd, DYNAMIC_COLUMN_VALUE *val, String *tmp);
|
||||
bool get_date(MYSQL_TIME *ltime, ulonglong fuzzydate);
|
||||
void print(String *str, enum_query_type query_type);
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_dyncol_get>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_dyncol_get>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -1649,8 +1649,8 @@ public:
|
||||
void fix_length_and_dec() { maybe_null= 1; max_length= MAX_BLOB_WIDTH; };
|
||||
const char *func_name() const{ return "column_list"; }
|
||||
String *val_str(String *);
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_dyncol_list>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_dyncol_list>(thd, this); }
|
||||
};
|
||||
|
||||
#endif /* ITEM_STRFUNC_INCLUDED */
|
||||
|
||||
@@ -263,8 +263,8 @@ public:
|
||||
void register_as_with_rec_ref(With_element *with_elem);
|
||||
void init_expr_cache_tracker(THD *thd);
|
||||
|
||||
Item* build_clone(THD *thd, MEM_ROOT *mem_root) { return 0; }
|
||||
Item* get_copy(THD *thd, MEM_ROOT *mem_root) { return 0; }
|
||||
Item* build_clone(THD *thd) { return 0; }
|
||||
Item* get_copy(THD *thd) { return 0; }
|
||||
|
||||
bool wrap_tvc_in_derived_table(THD *thd, st_select_lex *tvc_sl);
|
||||
|
||||
|
||||
@@ -792,8 +792,8 @@ public:
|
||||
}
|
||||
Item *copy_or_same(THD* thd);
|
||||
void remove();
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_sum_sum>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_sum_sum>(thd, this); }
|
||||
|
||||
bool supports_removal() const
|
||||
{
|
||||
@@ -856,8 +856,8 @@ class Item_sum_count :public Item_sum_int
|
||||
return has_with_distinct() ? "count(distinct " : "count(";
|
||||
}
|
||||
Item *copy_or_same(THD* thd);
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_sum_count>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_sum_count>(thd, this); }
|
||||
|
||||
bool supports_removal() const
|
||||
{
|
||||
@@ -912,8 +912,8 @@ public:
|
||||
count= 0;
|
||||
Item_sum_sum::cleanup();
|
||||
}
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_sum_avg>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_sum_avg>(thd, this); }
|
||||
|
||||
bool supports_removal() const
|
||||
{
|
||||
@@ -978,8 +978,8 @@ public:
|
||||
count= 0;
|
||||
Item_sum_num::cleanup();
|
||||
}
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_sum_variance>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_sum_variance>(thd, this); }
|
||||
};
|
||||
|
||||
/*
|
||||
@@ -999,8 +999,8 @@ class Item_sum_std :public Item_sum_variance
|
||||
Item *result_item(THD *thd, Field *field);
|
||||
const char *func_name() const { return "std("; }
|
||||
Item *copy_or_same(THD* thd);
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_sum_std>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_sum_std>(thd, this); }
|
||||
};
|
||||
|
||||
// This class is a string or number function depending on num_func
|
||||
@@ -1069,8 +1069,8 @@ public:
|
||||
bool add();
|
||||
const char *func_name() const { return "min("; }
|
||||
Item *copy_or_same(THD* thd);
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_sum_min>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_sum_min>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -1084,8 +1084,8 @@ public:
|
||||
bool add();
|
||||
const char *func_name() const { return "max("; }
|
||||
Item *copy_or_same(THD* thd);
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_sum_max>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_sum_max>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -1165,8 +1165,8 @@ public:
|
||||
bool add();
|
||||
const char *func_name() const { return "bit_or("; }
|
||||
Item *copy_or_same(THD* thd);
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_sum_or>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_sum_or>(thd, this); }
|
||||
|
||||
private:
|
||||
void set_bits_from_counters();
|
||||
@@ -1182,8 +1182,8 @@ public:
|
||||
bool add();
|
||||
const char *func_name() const { return "bit_and("; }
|
||||
Item *copy_or_same(THD* thd);
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_sum_and>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_sum_and>(thd, this); }
|
||||
|
||||
private:
|
||||
void set_bits_from_counters();
|
||||
@@ -1197,8 +1197,8 @@ public:
|
||||
bool add();
|
||||
const char *func_name() const { return "bit_xor("; }
|
||||
Item *copy_or_same(THD* thd);
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_sum_xor>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_sum_xor>(thd, this); }
|
||||
|
||||
private:
|
||||
void set_bits_from_counters();
|
||||
@@ -1255,8 +1255,8 @@ public:
|
||||
my_decimal *val_decimal(my_decimal *dec) { return val_decimal_from_real(dec); }
|
||||
String *val_str(String *str) { return val_string_from_real(str); }
|
||||
double val_real();
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_avg_field_double>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_avg_field_double>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -1275,8 +1275,8 @@ public:
|
||||
longlong val_int() { return val_int_from_decimal(); }
|
||||
String *val_str(String *str) { return val_string_from_decimal(str); }
|
||||
my_decimal *val_decimal(my_decimal *);
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_avg_field_decimal>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_avg_field_decimal>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -1296,8 +1296,8 @@ public:
|
||||
{ return val_decimal_from_real(dec_buf); }
|
||||
bool is_null() { update_null_value(); return null_value; }
|
||||
const Type_handler *type_handler() const { return &type_handler_double; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_variance_field>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_variance_field>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -1309,8 +1309,8 @@ public:
|
||||
{ }
|
||||
enum Type type() const { return FIELD_STD_ITEM; }
|
||||
double val_real();
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_std_field>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_std_field>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -1396,8 +1396,8 @@ class Item_sum_udf_float :public Item_udf_sum
|
||||
const Type_handler *type_handler() const { return &type_handler_double; }
|
||||
void fix_length_and_dec() { fix_num_length_and_dec(); }
|
||||
Item *copy_or_same(THD* thd);
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_sum_udf_float>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_sum_udf_float>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -1418,8 +1418,8 @@ public:
|
||||
const Type_handler *type_handler() const { return &type_handler_longlong; }
|
||||
void fix_length_and_dec() { decimals=0; max_length=21; }
|
||||
Item *copy_or_same(THD* thd);
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_sum_udf_int>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_sum_udf_int>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -1459,8 +1459,8 @@ public:
|
||||
const Type_handler *type_handler() const { return string_type_handler(); }
|
||||
void fix_length_and_dec();
|
||||
Item *copy_or_same(THD* thd);
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_sum_udf_str>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_sum_udf_str>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -1480,8 +1480,8 @@ public:
|
||||
const Type_handler *type_handler() const { return &type_handler_newdecimal; }
|
||||
void fix_length_and_dec() { fix_num_length_and_dec(); }
|
||||
Item *copy_or_same(THD* thd);
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_sum_udf_decimal>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_sum_udf_decimal>(thd, this); }
|
||||
};
|
||||
|
||||
#else /* Dummy functions to get sql_yacc.cc compiled */
|
||||
@@ -1668,8 +1668,8 @@ public:
|
||||
virtual void print(String *str, enum_query_type query_type);
|
||||
virtual bool change_context_processor(void *cntx)
|
||||
{ context= (Name_resolution_context *)cntx; return FALSE; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_group_concat>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_group_concat>(thd, this); }
|
||||
};
|
||||
|
||||
#endif /* ITEM_SUM_INCLUDED */
|
||||
|
||||
@@ -66,8 +66,8 @@ public:
|
||||
{
|
||||
max_length=6*MY_CHARSET_BIN_MB_MAXLEN;
|
||||
}
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_period_add>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_period_add>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -84,8 +84,8 @@ public:
|
||||
decimals=0;
|
||||
max_length=6*MY_CHARSET_BIN_MB_MAXLEN;
|
||||
}
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_period_diff>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_period_diff>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -109,8 +109,8 @@ public:
|
||||
{
|
||||
return !has_date_args();
|
||||
}
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_to_days>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_to_days>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -137,8 +137,8 @@ public:
|
||||
{
|
||||
return !has_date_args();
|
||||
}
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_to_seconds>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_to_seconds>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -160,8 +160,8 @@ public:
|
||||
{
|
||||
return !has_date_args();
|
||||
}
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_dayofmonth>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_dayofmonth>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -195,8 +195,8 @@ public:
|
||||
{
|
||||
return !has_date_args();
|
||||
}
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_month>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_month>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -217,8 +217,8 @@ public:
|
||||
{
|
||||
return mark_unsupported_function(func_name(), "()", arg, VCOL_SESSION_FUNC);
|
||||
}
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_monthname>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_monthname>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -240,8 +240,8 @@ public:
|
||||
{
|
||||
return !has_date_args();
|
||||
}
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_dayofyear>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_dayofyear>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -263,8 +263,8 @@ public:
|
||||
{
|
||||
return !has_time_args();
|
||||
}
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_hour>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_hour>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -286,8 +286,8 @@ public:
|
||||
{
|
||||
return !has_time_args();
|
||||
}
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_minute>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_minute>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -309,8 +309,8 @@ public:
|
||||
{
|
||||
return !has_date_args();
|
||||
}
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_quarter>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_quarter>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -332,8 +332,8 @@ public:
|
||||
{
|
||||
return !has_time_args();
|
||||
}
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_second>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_second>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -365,8 +365,8 @@ public:
|
||||
{
|
||||
return arg_count == 2;
|
||||
}
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_week>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_week>(thd, this); }
|
||||
};
|
||||
|
||||
class Item_func_yearweek :public Item_long_func
|
||||
@@ -393,8 +393,8 @@ public:
|
||||
{
|
||||
return !has_date_args();
|
||||
}
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_yearweek>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_yearweek>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -418,8 +418,8 @@ public:
|
||||
{
|
||||
return !has_date_args();
|
||||
}
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_year>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_year>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -454,8 +454,8 @@ public:
|
||||
{
|
||||
return !has_date_args();
|
||||
}
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_weekday>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_weekday>(thd, this); }
|
||||
};
|
||||
|
||||
class Item_func_dayname :public Item_func_weekday
|
||||
@@ -533,8 +533,8 @@ public:
|
||||
}
|
||||
longlong int_op();
|
||||
my_decimal *decimal_op(my_decimal* buf);
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_unix_timestamp>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_unix_timestamp>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -556,8 +556,8 @@ public:
|
||||
}
|
||||
longlong int_op();
|
||||
my_decimal *decimal_op(my_decimal* buf);
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_time_to_sec>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_time_to_sec>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -684,8 +684,8 @@ public:
|
||||
Item_func_curtime_local(THD *thd, uint dec): Item_func_curtime(thd, dec) {}
|
||||
const char *func_name() const { return "curtime"; }
|
||||
virtual void store_now_in_TIME(THD *thd, MYSQL_TIME *now_time);
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_curtime_local>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_curtime_local>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -695,8 +695,8 @@ public:
|
||||
Item_func_curtime_utc(THD *thd, uint dec): Item_func_curtime(thd, dec) {}
|
||||
const char *func_name() const { return "utc_time"; }
|
||||
virtual void store_now_in_TIME(THD *thd, MYSQL_TIME *now_time);
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_curtime_utc>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_curtime_utc>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -723,8 +723,8 @@ public:
|
||||
Item_func_curdate_local(THD *thd): Item_func_curdate(thd) {}
|
||||
const char *func_name() const { return "curdate"; }
|
||||
void store_now_in_TIME(THD *thd, MYSQL_TIME *now_time);
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_curdate_local>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_curdate_local>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -734,8 +734,8 @@ public:
|
||||
Item_func_curdate_utc(THD *thd): Item_func_curdate(thd) {}
|
||||
const char *func_name() const { return "utc_date"; }
|
||||
void store_now_in_TIME(THD* thd, MYSQL_TIME *now_time);
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_curdate_utc>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_curdate_utc>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -772,8 +772,8 @@ public:
|
||||
int save_in_field(Field *field, bool no_conversions);
|
||||
virtual void store_now_in_TIME(THD *thd, MYSQL_TIME *now_time);
|
||||
virtual enum Functype functype() const { return NOW_FUNC; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_now_local>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_now_local>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -789,8 +789,8 @@ public:
|
||||
return mark_unsupported_function(func_name(), "()", arg,
|
||||
VCOL_TIME_FUNC | VCOL_NON_DETERMINISTIC);
|
||||
}
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_now_utc>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_now_utc>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -813,8 +813,8 @@ public:
|
||||
VCOL_TIME_FUNC | VCOL_NON_DETERMINISTIC);
|
||||
}
|
||||
virtual enum Functype functype() const { return SYSDATE_FUNC; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_sysdate_local>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_sysdate_local>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -832,8 +832,8 @@ public:
|
||||
{
|
||||
return has_date_args() || has_time_args();
|
||||
}
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_from_days>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_from_days>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -860,8 +860,8 @@ public:
|
||||
return false;
|
||||
return mark_unsupported_function(func_name(), "()", arg, VCOL_SESSION_FUNC);
|
||||
}
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_date_format>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_date_format>(thd, this); }
|
||||
};
|
||||
|
||||
class Item_func_time_format: public Item_func_date_format
|
||||
@@ -871,8 +871,8 @@ public:
|
||||
Item_func_date_format(thd, a, b) { is_time_format= true; }
|
||||
const char *func_name() const { return "time_format"; }
|
||||
bool check_vcol_func_processor(void *arg) { return false; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_time_format>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_time_format>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -886,8 +886,8 @@ class Item_func_from_unixtime :public Item_datetimefunc
|
||||
const char *func_name() const { return "from_unixtime"; }
|
||||
void fix_length_and_dec();
|
||||
bool get_date(MYSQL_TIME *res, ulonglong fuzzy_date);
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_from_unixtime>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_from_unixtime>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -931,8 +931,8 @@ class Item_func_convert_tz :public Item_datetimefunc
|
||||
}
|
||||
bool get_date(MYSQL_TIME *res, ulonglong fuzzy_date);
|
||||
void cleanup();
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_convert_tz>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_convert_tz>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -949,8 +949,8 @@ public:
|
||||
maybe_null= true;
|
||||
}
|
||||
const char *func_name() const { return "sec_to_time"; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_sec_to_time>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_sec_to_time>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -970,8 +970,8 @@ public:
|
||||
void print(String *str, enum_query_type query_type);
|
||||
enum precedence precedence() const { return ADDINTERVAL_PRECEDENCE; }
|
||||
bool need_parentheses_in_default() { return true; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_date_add_interval>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_date_add_interval>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -1078,8 +1078,8 @@ class Item_extract :public Item_int_func
|
||||
}
|
||||
return true;
|
||||
}
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_extract>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_extract>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -1111,8 +1111,8 @@ public:
|
||||
}
|
||||
void print(String *str, enum_query_type query_type);
|
||||
bool need_parentheses_in_default() { return true; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_char_typecast>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_char_typecast>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -1136,8 +1136,8 @@ public:
|
||||
{
|
||||
args[0]->type_handler()->Item_date_typecast_fix_length_and_dec(this);
|
||||
}
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_date_typecast>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_date_typecast>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -1154,8 +1154,8 @@ public:
|
||||
{
|
||||
args[0]->type_handler()->Item_time_typecast_fix_length_and_dec(this);
|
||||
}
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_time_typecast>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_time_typecast>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -1172,8 +1172,8 @@ public:
|
||||
{
|
||||
args[0]->type_handler()->Item_datetime_typecast_fix_length_and_dec(this);
|
||||
}
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_datetime_typecast>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_datetime_typecast>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -1186,8 +1186,8 @@ public:
|
||||
Item_datefunc(thd, a, b) {}
|
||||
const char *func_name() const { return "makedate"; }
|
||||
bool get_date(MYSQL_TIME *ltime, ulonglong fuzzy_date);
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_makedate>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_makedate>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -1204,8 +1204,8 @@ public:
|
||||
bool get_date(MYSQL_TIME *ltime, ulonglong fuzzy_date);
|
||||
void print(String *str, enum_query_type query_type);
|
||||
const char *func_name() const { return "add_time"; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_add_time>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_add_time>(thd, this); }
|
||||
};
|
||||
|
||||
class Item_func_timediff :public Item_timefunc
|
||||
@@ -1222,8 +1222,8 @@ public:
|
||||
maybe_null= true;
|
||||
}
|
||||
bool get_date(MYSQL_TIME *ltime, ulonglong fuzzy_date);
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_timediff>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_timediff>(thd, this); }
|
||||
};
|
||||
|
||||
class Item_func_maketime :public Item_timefunc
|
||||
@@ -1244,8 +1244,8 @@ public:
|
||||
}
|
||||
const char *func_name() const { return "maketime"; }
|
||||
bool get_date(MYSQL_TIME *ltime, ulonglong fuzzy_date);
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_maketime>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_maketime>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -1267,8 +1267,8 @@ public:
|
||||
{
|
||||
return !has_time_args();
|
||||
}
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_microsecond>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_microsecond>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -1288,8 +1288,8 @@ public:
|
||||
maybe_null=1;
|
||||
}
|
||||
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_timestamp_diff>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_timestamp_diff>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -1314,8 +1314,8 @@ public:
|
||||
fix_length_and_charset(17, default_charset());
|
||||
}
|
||||
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_get_format>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_get_format>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -1334,8 +1334,8 @@ public:
|
||||
bool get_date(MYSQL_TIME *ltime, ulonglong fuzzy_date);
|
||||
const char *func_name() const { return "str_to_date"; }
|
||||
void fix_length_and_dec();
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_str_to_date>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_str_to_date>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -1347,8 +1347,8 @@ public:
|
||||
Item_func_last_day(THD *thd, Item *a): Item_datefunc(thd, a) {}
|
||||
const char *func_name() const { return "last_day"; }
|
||||
bool get_date(MYSQL_TIME *res, ulonglong fuzzy_date);
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_last_day>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_last_day>(thd, this); }
|
||||
};
|
||||
|
||||
#endif /* ITEM_TIMEFUNC_INCLUDED */
|
||||
|
||||
@@ -146,8 +146,8 @@ public:
|
||||
return "row_number";
|
||||
}
|
||||
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_sum_row_number>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_sum_row_number>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -221,8 +221,8 @@ public:
|
||||
}
|
||||
Item_sum_int::cleanup();
|
||||
}
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_sum_rank>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_sum_rank>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -291,8 +291,8 @@ class Item_sum_dense_rank: public Item_sum_int
|
||||
}
|
||||
Item_sum_int::cleanup();
|
||||
}
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_sum_dense_rank>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_sum_dense_rank>(thd, this); }
|
||||
};
|
||||
|
||||
class Item_sum_hybrid_simple : public Item_sum,
|
||||
@@ -354,8 +354,8 @@ class Item_sum_first_value : public Item_sum_hybrid_simple
|
||||
return "first_value";
|
||||
}
|
||||
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_sum_first_value>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_sum_first_value>(thd, this); }
|
||||
};
|
||||
|
||||
/*
|
||||
@@ -380,8 +380,8 @@ class Item_sum_last_value : public Item_sum_hybrid_simple
|
||||
return "last_value";
|
||||
}
|
||||
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_sum_last_value>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_sum_last_value>(thd, this); }
|
||||
};
|
||||
|
||||
class Item_sum_nth_value : public Item_sum_hybrid_simple
|
||||
@@ -400,8 +400,8 @@ class Item_sum_nth_value : public Item_sum_hybrid_simple
|
||||
return "nth_value";
|
||||
}
|
||||
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_sum_nth_value>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_sum_nth_value>(thd, this); }
|
||||
};
|
||||
|
||||
class Item_sum_lead : public Item_sum_hybrid_simple
|
||||
@@ -420,8 +420,8 @@ class Item_sum_lead : public Item_sum_hybrid_simple
|
||||
return "lead";
|
||||
}
|
||||
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_sum_lead>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_sum_lead>(thd, this); }
|
||||
};
|
||||
|
||||
class Item_sum_lag : public Item_sum_hybrid_simple
|
||||
@@ -440,8 +440,8 @@ class Item_sum_lag : public Item_sum_hybrid_simple
|
||||
return "lag";
|
||||
}
|
||||
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_sum_lag>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_sum_lag>(thd, this); }
|
||||
};
|
||||
|
||||
/*
|
||||
@@ -532,8 +532,8 @@ class Item_sum_percent_rank: public Item_sum_window_with_row_count
|
||||
}
|
||||
|
||||
void setup_window_func(THD *thd, Window_spec *window_spec);
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_sum_percent_rank>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_sum_percent_rank>(thd, this); }
|
||||
|
||||
private:
|
||||
longlong cur_rank; // Current rank of the current row.
|
||||
@@ -619,8 +619,8 @@ class Item_sum_cume_dist: public Item_sum_window_with_row_count
|
||||
// requires.
|
||||
}
|
||||
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_sum_cume_dist>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_sum_cume_dist>(thd, this); }
|
||||
|
||||
ulonglong get_row_number()
|
||||
{
|
||||
@@ -694,8 +694,8 @@ class Item_sum_ntile : public Item_sum_window_with_row_count
|
||||
|
||||
const Type_handler *type_handler() const { return &type_handler_longlong; }
|
||||
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_sum_ntile>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_sum_ntile>(thd, this); }
|
||||
|
||||
private:
|
||||
longlong get_num_quantiles() { return args[0]->val_int(); }
|
||||
@@ -825,8 +825,8 @@ public:
|
||||
// requires.
|
||||
}
|
||||
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_sum_percentile_disc>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_sum_percentile_disc>(thd, this); }
|
||||
void setup_window_func(THD *thd, Window_spec *window_spec);
|
||||
void setup_hybrid(THD *thd, Item *item);
|
||||
bool fix_fields(THD *thd, Item **ref);
|
||||
@@ -955,8 +955,8 @@ public:
|
||||
// requires.
|
||||
}
|
||||
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_sum_percentile_cont>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_sum_percentile_cont>(thd, this); }
|
||||
void setup_window_func(THD *thd, Window_spec *window_spec);
|
||||
void setup_hybrid(THD *thd, Item *item);
|
||||
bool fix_fields(THD *thd, Item **ref);
|
||||
@@ -1281,7 +1281,7 @@ public:
|
||||
|
||||
void print(String *str, enum_query_type query_type);
|
||||
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root) { return 0; }
|
||||
Item *get_copy(THD *thd) { return 0; }
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -247,8 +247,8 @@ public:
|
||||
Item_nodeset_func(thd, pxml) {}
|
||||
const char *func_name() const { return "xpath_rootelement"; }
|
||||
String *val_nodeset(String *nodeset);
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_nodeset_func_rootelement>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_nodeset_func_rootelement>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -260,8 +260,8 @@ public:
|
||||
Item_nodeset_func(thd, a, b, pxml) {}
|
||||
const char *func_name() const { return "xpath_union"; }
|
||||
String *val_nodeset(String *nodeset);
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_nodeset_func_union>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_nodeset_func_union>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -294,8 +294,8 @@ public:
|
||||
Item_nodeset_func_axisbyname(thd, a, n_arg, l_arg, pxml) {}
|
||||
const char *func_name() const { return "xpath_selfbyname"; }
|
||||
String *val_nodeset(String *nodeset);
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_nodeset_func_selfbyname>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_nodeset_func_selfbyname>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -308,8 +308,8 @@ public:
|
||||
Item_nodeset_func_axisbyname(thd, a, n_arg, l_arg, pxml) {}
|
||||
const char *func_name() const { return "xpath_childbyname"; }
|
||||
String *val_nodeset(String *nodeset);
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_nodeset_func_childbyname>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_nodeset_func_childbyname>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -324,8 +324,8 @@ public:
|
||||
need_self(need_self_arg) {}
|
||||
const char *func_name() const { return "xpath_descendantbyname"; }
|
||||
String *val_nodeset(String *nodeset);
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_nodeset_func_descendantbyname>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_nodeset_func_descendantbyname>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -340,8 +340,8 @@ public:
|
||||
need_self(need_self_arg) {}
|
||||
const char *func_name() const { return "xpath_ancestorbyname"; }
|
||||
String *val_nodeset(String *nodeset);
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_nodeset_func_ancestorbyname>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_nodeset_func_ancestorbyname>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -354,8 +354,8 @@ public:
|
||||
Item_nodeset_func_axisbyname(thd, a, n_arg, l_arg, pxml) {}
|
||||
const char *func_name() const { return "xpath_parentbyname"; }
|
||||
String *val_nodeset(String *nodeset);
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_nodeset_func_parentbyname>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_nodeset_func_parentbyname>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -368,8 +368,8 @@ public:
|
||||
Item_nodeset_func_axisbyname(thd, a, n_arg, l_arg, pxml) {}
|
||||
const char *func_name() const { return "xpath_attributebyname"; }
|
||||
String *val_nodeset(String *nodeset);
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_nodeset_func_attributebyname>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_nodeset_func_attributebyname>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -385,8 +385,8 @@ public:
|
||||
Item_nodeset_func(thd, a, b, pxml) {}
|
||||
const char *func_name() const { return "xpath_predicate"; }
|
||||
String *val_nodeset(String *nodeset);
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_nodeset_func_predicate>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_nodeset_func_predicate>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -398,8 +398,8 @@ public:
|
||||
Item_nodeset_func(thd, a, b, pxml) { }
|
||||
const char *func_name() const { return "xpath_elementbyindex"; }
|
||||
String *val_nodeset(String *nodeset);
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_nodeset_func_elementbyindex>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_nodeset_func_elementbyindex>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -426,8 +426,8 @@ public:
|
||||
}
|
||||
return args[0]->val_real() ? 1 : 0;
|
||||
}
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_xpath_cast_bool>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_xpath_cast_bool>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -440,8 +440,8 @@ public:
|
||||
Item_xpath_cast_number(THD *thd, Item *a): Item_real_func(thd, a) {}
|
||||
const char *func_name() const { return "xpath_cast_number"; }
|
||||
virtual double val_real() { return args[0]->val_real(); }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_xpath_cast_number>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_xpath_cast_number>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -457,8 +457,8 @@ public:
|
||||
String *val_nodeset(String *res)
|
||||
{ return string_cache; }
|
||||
void fix_length_and_dec() { max_length= MAX_BLOB_WIDTH; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_nodeset_context_cache>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_nodeset_context_cache>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -478,8 +478,8 @@ public:
|
||||
return ((MY_XPATH_FLT*)flt->ptr())->pos + 1;
|
||||
return 0;
|
||||
}
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_xpath_position>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_xpath_position>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -501,8 +501,8 @@ public:
|
||||
return predicate_supplied_context_size;
|
||||
return res->length() / sizeof(MY_XPATH_FLT);
|
||||
}
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_xpath_count>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_xpath_count>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -546,8 +546,8 @@ public:
|
||||
}
|
||||
return sum;
|
||||
}
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_xpath_sum>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_xpath_sum>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -624,8 +624,8 @@ public:
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_nodeset_to_const_comparator>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_nodeset_to_const_comparator>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -96,8 +96,8 @@ public:
|
||||
Item_xml_str_func(thd, a, b) {}
|
||||
const char *func_name() const { return "extractvalue"; }
|
||||
String *val_str(String *);
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_xml_extractvalue>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_xml_extractvalue>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -112,8 +112,8 @@ public:
|
||||
Item_xml_str_func(thd, a, b, c) {}
|
||||
const char *func_name() const { return "updatexml"; }
|
||||
String *val_str(String *);
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_xml_update>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_xml_update>(thd, this); }
|
||||
};
|
||||
|
||||
#endif /* ITEM_XMLFUNC_INCLUDED */
|
||||
|
||||
@@ -59,7 +59,7 @@ public:
|
||||
DBUG_ASSERT(0); // impossible
|
||||
return mark_unsupported_function("proc", arg, VCOL_IMPOSSIBLE);
|
||||
}
|
||||
Item* get_copy(THD *thd, MEM_ROOT *mem_root) { return 0; }
|
||||
Item* get_copy(THD *thd) { return 0; }
|
||||
};
|
||||
|
||||
class Item_proc_real :public Item_proc
|
||||
|
||||
@@ -1261,7 +1261,7 @@ bool pushdown_cond_for_derived(THD *thd, Item *cond, TABLE_LIST *derived)
|
||||
continue;
|
||||
extracted_cond_copy= !sl->next_select() ?
|
||||
extracted_cond :
|
||||
extracted_cond->build_clone(thd, thd->mem_root);
|
||||
extracted_cond->build_clone(thd);
|
||||
if (!extracted_cond_copy)
|
||||
continue;
|
||||
|
||||
@@ -1291,7 +1291,7 @@ bool pushdown_cond_for_derived(THD *thd, Item *cond, TABLE_LIST *derived)
|
||||
*/
|
||||
extracted_cond_copy= !sl->next_select() ?
|
||||
extracted_cond :
|
||||
extracted_cond->build_clone(thd, thd->mem_root);
|
||||
extracted_cond->build_clone(thd);
|
||||
if (!extracted_cond_copy)
|
||||
continue;
|
||||
|
||||
|
||||
@@ -7181,7 +7181,7 @@ Item *st_select_lex::build_cond_for_grouping_fields(THD *thd, Item *cond,
|
||||
if (no_top_clones)
|
||||
return cond;
|
||||
cond->clear_extraction_flag();
|
||||
return cond->build_clone(thd, thd->mem_root);
|
||||
return cond->build_clone(thd);
|
||||
}
|
||||
if (cond->type() == Item::COND_ITEM)
|
||||
{
|
||||
|
||||
@@ -9084,16 +9084,16 @@ Item *JOIN_TAB::get_splitting_cond_for_grouping_derived(THD *thd)
|
||||
for (ORDER *ord= sel->join->partition_list; ord;
|
||||
ord= ord->next, fld= li++)
|
||||
{
|
||||
Item *left_item= (*ord->item)->build_clone(thd, thd->mem_root);
|
||||
Item *left_item= (*ord->item)->build_clone(thd);
|
||||
uint i= 0;
|
||||
for (KEY_PART_INFO *key_part= start; key_part < end; key_part++, i++)
|
||||
{
|
||||
if (key_part->fieldnr == fld->field_index + 1)
|
||||
break;
|
||||
}
|
||||
Item *right_item= ref.items[i]->build_clone(thd, thd->mem_root);
|
||||
Item *right_item= ref.items[i]->build_clone(thd);
|
||||
Item_func_eq *eq_item= 0;
|
||||
right_item= right_item->build_clone(thd, thd->mem_root);
|
||||
right_item= right_item->build_clone(thd);
|
||||
if (left_item && right_item)
|
||||
{
|
||||
right_item->walk(&Item::set_fields_as_dependent_processor,
|
||||
|
||||
@@ -8232,8 +8232,8 @@ Item* TABLE_LIST::build_pushable_cond_for_table(THD *thd, Item *cond)
|
||||
if (!(item->used_tables() == tab_map))
|
||||
continue;
|
||||
Item_func_eq *eq= 0;
|
||||
Item *left_item_clone= left_item->build_clone(thd, thd->mem_root);
|
||||
Item *right_item_clone= item->build_clone(thd, thd->mem_root);
|
||||
Item *left_item_clone= left_item->build_clone(thd);
|
||||
Item *right_item_clone= item->build_clone(thd);
|
||||
if (left_item_clone && right_item_clone)
|
||||
{
|
||||
left_item_clone->set_item_equal(NULL);
|
||||
@@ -8263,7 +8263,7 @@ Item* TABLE_LIST::build_pushable_cond_for_table(THD *thd, Item *cond)
|
||||
return new_cond;
|
||||
}
|
||||
else if (cond->get_extraction_flag() != NO_EXTRACTION_FL)
|
||||
return cond->build_clone(thd, thd->mem_root);
|
||||
return cond->build_clone(thd);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user