mirror of
https://github.com/MariaDB/server.git
synced 2026-05-16 11:57:38 +02:00
MDEV-38574 Rename cloning functions of class Item and descendants
Rename cloning methods of class Item and its descendants in the following way: (from) (to) do_build_clone -> deep_copy build_clone -> deep_copy_with_checks do_get_copy -> shallow_copy get_copy -> shallow_copy_with_checks to better reflect their functionality. Also make Item::deep_copy() and shallow_copy() protected. Outside users should call deep_copy_with_checks() and shallow_copy_with_checks().
This commit is contained in:
parent
c882f9b25a
commit
f2b48e565c
28 changed files with 1464 additions and 629 deletions
|
|
@ -42,7 +42,7 @@ public:
|
|||
}
|
||||
const char *fully_qualified_func_name() const override
|
||||
{ return "sysconst_test()"; }
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_sysconst_test>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ public:
|
|||
unsigned_flag= 1;
|
||||
return FALSE;
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_inet_aton>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -72,7 +72,7 @@ public:
|
|||
set_maybe_null();
|
||||
return FALSE;
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_inet_ntoa>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -118,7 +118,7 @@ public:
|
|||
set_maybe_null();
|
||||
return FALSE;
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_inet6_aton>(thd, this); }
|
||||
|
||||
String *val_str(String *to) override;
|
||||
|
|
@ -156,7 +156,7 @@ public:
|
|||
return FALSE;
|
||||
}
|
||||
String *val_str_ascii(String *to) override;
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_inet6_ntoa>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -178,7 +178,7 @@ public:
|
|||
static LEX_CSTRING name= {STRING_WITH_LEN("is_ipv4") };
|
||||
return name;
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_is_ipv4>(thd, this); }
|
||||
|
||||
bool val_bool() override;
|
||||
|
|
@ -201,7 +201,7 @@ public:
|
|||
static LEX_CSTRING name= {STRING_WITH_LEN("is_ipv6") };
|
||||
return name;
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_is_ipv6>(thd, this); }
|
||||
|
||||
bool val_bool() override;
|
||||
|
|
@ -223,7 +223,7 @@ public:
|
|||
static LEX_CSTRING name= {STRING_WITH_LEN("is_ipv4_compat") };
|
||||
return name;
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_is_ipv4_compat>(thd, this); }
|
||||
bool val_bool() override;
|
||||
};
|
||||
|
|
@ -244,7 +244,7 @@ public:
|
|||
static LEX_CSTRING name= {STRING_WITH_LEN("is_ipv4_mapped") };
|
||||
return name;
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_is_ipv4_mapped>(thd, this); }
|
||||
bool val_bool() override;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -11743,7 +11743,7 @@ Virtual_column_info* Virtual_column_info::clone(THD *thd)
|
|||
return NULL;
|
||||
if (expr)
|
||||
{
|
||||
dst->expr= expr->build_clone(thd);
|
||||
dst->expr= expr->deep_copy_with_checks(thd);
|
||||
if (!dst->expr)
|
||||
return NULL;
|
||||
}
|
||||
|
|
|
|||
25
sql/item.cc
25
sql/item.cc
|
|
@ -2305,7 +2305,8 @@ public:
|
|||
Item_ident::print(str, query_type);
|
||||
}
|
||||
Ref_Type ref_type() override final { return AGGREGATE_REF; }
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_aggregate_ref>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -2803,7 +2804,7 @@ bool Type_std_attributes::agg_item_set_converter(const DTCollation &coll,
|
|||
@retval 0 on a failure
|
||||
*/
|
||||
|
||||
Item* Item_func_or_sum::do_build_clone(THD *thd) const
|
||||
Item* Item_func_or_sum::deep_copy(THD *thd) const
|
||||
{
|
||||
Item *copy_tmp_args[2]= {0,0};
|
||||
Item **copy_args= copy_tmp_args;
|
||||
|
|
@ -2816,12 +2817,12 @@ Item* Item_func_or_sum::do_build_clone(THD *thd) const
|
|||
}
|
||||
for (uint i= 0; i < arg_count; i++)
|
||||
{
|
||||
Item *arg_clone= args[i]->build_clone(thd);
|
||||
Item *arg_clone= args[i]->deep_copy_with_checks(thd);
|
||||
if (unlikely(!arg_clone))
|
||||
return 0;
|
||||
copy_args[i]= arg_clone;
|
||||
}
|
||||
Item_func_or_sum *copy= static_cast<Item_func_or_sum *>(get_copy(thd));
|
||||
Item_func_or_sum *copy= static_cast<Item_func_or_sum *>(shallow_copy_with_checks(thd));
|
||||
if (unlikely(!copy))
|
||||
return 0;
|
||||
if (arg_count > 2)
|
||||
|
|
@ -3123,13 +3124,13 @@ Item_sp::init_result_field(THD *thd, uint max_length, uint maybe_null,
|
|||
0 if an error occurred
|
||||
*/
|
||||
|
||||
Item* Item_ref::do_build_clone(THD *thd) const
|
||||
Item* Item_ref::deep_copy(THD *thd) const
|
||||
{
|
||||
Item_ref *copy= (Item_ref *) get_copy(thd);
|
||||
Item_ref *copy= (Item_ref *) shallow_copy_with_checks(thd);
|
||||
if (unlikely(!copy) ||
|
||||
unlikely(!(copy->ref= (Item**) alloc_root(thd->mem_root,
|
||||
sizeof(Item*)))) ||
|
||||
unlikely(!(*copy->ref= (* ref)->build_clone(thd))))
|
||||
unlikely(!(*copy->ref= (* ref)->deep_copy_with_checks(thd))))
|
||||
return 0;
|
||||
return copy;
|
||||
}
|
||||
|
|
@ -7955,7 +7956,7 @@ Item *Item::build_pushable_cond(THD *thd,
|
|||
{
|
||||
if (with_sum_func())
|
||||
return 0;
|
||||
return build_clone(thd);
|
||||
return deep_copy_with_checks(thd);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -8073,7 +8074,7 @@ Item *Item_field::derived_field_transformer_for_where(THD *thd, uchar *arg)
|
|||
Item *producing_item= find_producing_item(this, sel);
|
||||
if (producing_item)
|
||||
{
|
||||
Item *producing_clone= producing_item->build_clone(thd);
|
||||
Item *producing_clone= producing_item->deep_copy_with_checks(thd);
|
||||
if (producing_clone)
|
||||
producing_clone->marker|= MARKER_SUBSTITUTION;
|
||||
return producing_clone;
|
||||
|
|
@ -8091,7 +8092,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);
|
||||
return producing_item->deep_copy_with_checks(thd);
|
||||
}
|
||||
return (*ref);
|
||||
}
|
||||
|
|
@ -8104,7 +8105,7 @@ Item *Item_field::grouping_field_transformer_for_where(THD *thd, uchar *arg)
|
|||
if (gr_field)
|
||||
{
|
||||
Item *producing_clone=
|
||||
gr_field->corresponding_item->build_clone(thd);
|
||||
gr_field->corresponding_item->deep_copy_with_checks(thd);
|
||||
if (producing_clone)
|
||||
producing_clone->marker|= MARKER_SUBSTITUTION;
|
||||
return producing_clone;
|
||||
|
|
@ -8127,7 +8128,7 @@ Item_direct_view_ref::grouping_field_transformer_for_where(THD *thd,
|
|||
st_select_lex *sel= (st_select_lex *)arg;
|
||||
Field_pair *gr_field= find_matching_field_pair(this,
|
||||
sel->grouping_tmp_fields);
|
||||
return gr_field->corresponding_item->build_clone(thd);
|
||||
return gr_field->corresponding_item->deep_copy_with_checks(thd);
|
||||
}
|
||||
|
||||
void Item_field::print(String *str, enum_query_type query_type)
|
||||
|
|
|
|||
390
sql/item.h
390
sql/item.h
|
|
@ -1888,15 +1888,15 @@ public:
|
|||
|
||||
/*
|
||||
Create a shallow copy of the item (usually invoking copy constructor).
|
||||
For deep copying see build_clone().
|
||||
For deep copying see deep_copy_with_checks().
|
||||
|
||||
Return value:
|
||||
- pointer to a copy of the Item
|
||||
- nullptr if the item is not copyable
|
||||
*/
|
||||
Item *get_copy(THD *thd) const
|
||||
Item *shallow_copy_with_checks(THD *thd) const
|
||||
{
|
||||
Item *copy= do_get_copy(thd);
|
||||
Item *copy= shallow_copy(thd);
|
||||
if (copy)
|
||||
{
|
||||
// Make sure the copy is of same type as this item
|
||||
|
|
@ -1912,9 +1912,9 @@ public:
|
|||
- pointer to a clone of the Item
|
||||
- nullptr if the item is not clonable
|
||||
*/
|
||||
Item* build_clone(THD *thd) const
|
||||
Item* deep_copy_with_checks(THD *thd) const
|
||||
{
|
||||
Item *clone= do_build_clone(thd);
|
||||
Item *clone= deep_copy(thd);
|
||||
if (clone)
|
||||
{
|
||||
// Make sure the clone is of same type as this item
|
||||
|
|
@ -1932,7 +1932,8 @@ public:
|
|||
|
||||
Note: the clone may have item type different from this
|
||||
(i.e., instance of another basic constant class may be returned).
|
||||
For real clones look at build_clone()/get_copy() methods
|
||||
For real clones look at deep_copy_with_checks()/shallow_copy_with_checks()
|
||||
methods
|
||||
*/
|
||||
virtual Item *clone_item(THD *thd) const { return nullptr; }
|
||||
|
||||
|
|
@ -2795,18 +2796,18 @@ public:
|
|||
|
||||
protected:
|
||||
/*
|
||||
Service function for public method get_copy(). See comments for get_copy()
|
||||
above. Override this method in derived classes to create shallow copies of
|
||||
the item
|
||||
Service function for public method shallow_copy_with_checks().
|
||||
See comments for shallow_copy_with_checks() above. Override this method
|
||||
in derived classes to create shallow copies of the item
|
||||
*/
|
||||
virtual Item *do_get_copy(THD *thd) const = 0;
|
||||
virtual Item *shallow_copy(THD *thd) const = 0;
|
||||
|
||||
/*
|
||||
Service function for public method build_clone(). See comments for
|
||||
build_clone() above. Override this method in derived classes to create
|
||||
deep copies (clones) of the item where possible
|
||||
Service function for public method deep_copy_with_checks(). See comments
|
||||
for deep_copy_with_checks() above. Override this method in derived classes
|
||||
to create deep copies (clones) of the item where possible
|
||||
*/
|
||||
virtual Item* do_build_clone(THD *thd) const = 0;
|
||||
virtual Item *deep_copy(THD *thd) const = 0;
|
||||
};
|
||||
|
||||
MEM_ROOT *get_thd_memroot(THD *thd);
|
||||
|
|
@ -3268,10 +3269,6 @@ public:
|
|||
|
||||
bool append_for_log(THD *thd, String *str) override;
|
||||
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_splocal>(thd, this); }
|
||||
Item *do_build_clone(THD *thd) const override { return get_copy(thd); }
|
||||
|
||||
/*
|
||||
Override the inherited create_field_for_create_select(),
|
||||
because we want to preserve the exact data type for:
|
||||
|
|
@ -3297,6 +3294,12 @@ public:
|
|||
my_error(ER_WRONG_SPVAR_TYPE_IN_LIMIT, MYF(0));
|
||||
return false;
|
||||
}
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_splocal>(thd, this); }
|
||||
Item *deep_copy(THD *thd) const override
|
||||
{ return shallow_copy_with_checks(thd); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -3316,8 +3319,9 @@ public:
|
|||
pos_in_q, len_in_q)
|
||||
{ }
|
||||
|
||||
Item *do_get_copy(THD *) const override { return nullptr; }
|
||||
Item *do_build_clone(THD *thd) const override { return nullptr; }
|
||||
protected:
|
||||
Item *shallow_copy(THD *) const override { return nullptr; }
|
||||
Item *deep_copy(THD *thd) const override { return nullptr; }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -3351,8 +3355,9 @@ public:
|
|||
bool append_for_log(THD *thd, String *str) override;
|
||||
void print(String *str, enum_query_type query_type) override;
|
||||
|
||||
Item *do_get_copy(THD *) const override { return nullptr; }
|
||||
Item *do_build_clone(THD *thd) const override { return nullptr; }
|
||||
protected:
|
||||
Item *shallow_copy(THD *) const override { return nullptr; }
|
||||
Item *deep_copy(THD *thd) const override { return nullptr; }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -3374,8 +3379,9 @@ public:
|
|||
bool fix_fields(THD *thd, Item **it) override;
|
||||
void print(String *str, enum_query_type query_type) override;
|
||||
|
||||
Item *do_get_copy(THD *) const override { return nullptr; }
|
||||
Item *do_build_clone(THD *thd) const override { return nullptr; }
|
||||
protected:
|
||||
Item *shallow_copy(THD *) const override { return nullptr; }
|
||||
Item *deep_copy(THD *thd) const override { return nullptr; }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -3419,11 +3425,13 @@ public:
|
|||
purposes.
|
||||
*/
|
||||
void print(String *str, enum_query_type query_type) override;
|
||||
Item *do_get_copy(THD *) const override { return nullptr; }
|
||||
Item *do_build_clone(THD *thd) const override { return nullptr; }
|
||||
|
||||
private:
|
||||
uint m_case_expr_id;
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *) const override { return nullptr; }
|
||||
Item *deep_copy(THD *thd) const override { return nullptr; }
|
||||
};
|
||||
|
||||
/*****************************************************************************
|
||||
|
|
@ -3500,9 +3508,12 @@ public:
|
|||
{
|
||||
return mark_unsupported_function("name_const()", arg, VCOL_IMPOSSIBLE);
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_name_const>(thd, this); }
|
||||
Item *do_build_clone(THD *thd) const override { return get_copy(thd); }
|
||||
Item *deep_copy(THD *thd) const override
|
||||
{ return shallow_copy_with_checks(thd); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -3879,9 +3890,6 @@ public:
|
|||
bool cleanup_excluding_const_fields_processor(void *arg) override
|
||||
{ return field && const_item() ? 0 : cleanup_processor(arg); }
|
||||
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_field>(thd, this); }
|
||||
Item* do_build_clone(THD *thd) const override { return get_copy(thd); }
|
||||
bool is_outer_field() const override
|
||||
{
|
||||
DBUG_ASSERT(fixed());
|
||||
|
|
@ -3891,6 +3899,12 @@ public:
|
|||
friend class Item_default_value;
|
||||
friend class Item_insert_value;
|
||||
friend class st_select_lex_unit;
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_field>(thd, this); }
|
||||
Item* deep_copy(THD *thd) const override
|
||||
{ return shallow_copy_with_checks(thd); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -3905,8 +3919,6 @@ public:
|
|||
:Item_field(thd, field),
|
||||
Item_args()
|
||||
{ }
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_field_row>(thd, this); }
|
||||
|
||||
const Type_handler *type_handler() const override
|
||||
{ return &type_handler_row; }
|
||||
|
|
@ -3923,6 +3935,10 @@ public:
|
|||
return false;
|
||||
}
|
||||
bool row_create_items(THD *thd, List<Spvar_definition> *list);
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_field_row>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -4009,9 +4025,12 @@ public:
|
|||
Item_basic_constant *make_string_literal_concat(THD *thd,
|
||||
const LEX_CSTRING *)
|
||||
override;
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_null>(thd, this); }
|
||||
Item *do_build_clone(THD *thd) const override { return get_copy(thd); }
|
||||
Item *deep_copy(THD *thd) const override
|
||||
{ return shallow_copy_with_checks(thd); }
|
||||
};
|
||||
|
||||
class Item_null_result :public Item_null
|
||||
|
|
@ -4456,8 +4475,6 @@ public:
|
|||
|
||||
bool append_for_log(THD *thd, String *str) override;
|
||||
bool check_vcol_func_processor(void *) override { return false; }
|
||||
Item *do_get_copy(THD *thd) const override { return nullptr; }
|
||||
Item *do_build_clone(THD *thd) const override { return nullptr; }
|
||||
|
||||
bool add_as_clone(THD *thd);
|
||||
void sync_clones();
|
||||
|
|
@ -4467,6 +4484,7 @@ public:
|
|||
{
|
||||
invalid_default_param();
|
||||
}
|
||||
|
||||
private:
|
||||
void invalid_default_param() const;
|
||||
bool set_value(THD *thd, sp_rcontext *ctx, Item **it) override;
|
||||
|
|
@ -4499,6 +4517,10 @@ private:
|
|||
Mem_root_array<Item_param *, true> m_clones;
|
||||
Item_field *m_associated_field;
|
||||
Field *m_default_field;
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override { return nullptr; }
|
||||
Item *deep_copy(THD *thd) const override { return nullptr; }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -4558,9 +4580,12 @@ public:
|
|||
Item *neg(THD *thd) override;
|
||||
decimal_digits_t decimal_precision() const override
|
||||
{ return (decimal_digits_t) (max_length - MY_TEST(value < 0)); }
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_int>(thd, this); }
|
||||
Item *do_build_clone(THD *thd) const override { return get_copy(thd); }
|
||||
Item *deep_copy(THD *thd) const override
|
||||
{ return shallow_copy_with_checks(thd); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -4590,9 +4615,12 @@ public:
|
|||
predicate at various condition optimization stages in sql_select.
|
||||
*/
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_bool>(thd, this); }
|
||||
Item *do_build_clone(THD *thd) const override { return get_copy(thd); }
|
||||
Item *deep_copy(THD *thd) const override
|
||||
{ return shallow_copy_with_checks(thd); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -4604,7 +4632,9 @@ public:
|
|||
|
||||
void set_join_tab_idx(uint8 join_tab_idx_arg) override
|
||||
{ DBUG_ASSERT(0); }
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_bool_static>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -4621,7 +4651,9 @@ public:
|
|||
Item *neg(THD *thd) override;
|
||||
decimal_digits_t decimal_precision() const override
|
||||
{ return decimal_digits_t(max_length); }
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_uint>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -4687,9 +4719,12 @@ public:
|
|||
decimal_digits_t decimal_precision() const override
|
||||
{ return decimal_value.precision(); }
|
||||
void set_decimal_value(my_decimal *value_par);
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_decimal>(thd, this); }
|
||||
Item *do_build_clone(THD *thd) const override { return get_copy(thd); }
|
||||
Item *deep_copy(THD *thd) const override
|
||||
{ return shallow_copy_with_checks(thd); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -4736,9 +4771,12 @@ public:
|
|||
Item *clone_item(THD *thd) const override;
|
||||
Item *neg(THD *thd) override;
|
||||
void print(String *str, enum_query_type query_type) override;
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_float>(thd, this); }
|
||||
Item *do_build_clone(THD *thd) const override { return get_copy(thd); }
|
||||
Item *deep_copy(THD *thd) const override
|
||||
{ return shallow_copy_with_checks(thd); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -4758,7 +4796,9 @@ public:
|
|||
{
|
||||
return const_charset_converter(thd, tocs, true, func_name);
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_static_float_func>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -4900,10 +4940,11 @@ public:
|
|||
const LEX_CSTRING *) override;
|
||||
Item *make_odbc_literal(THD *thd, const LEX_CSTRING *typestr) override;
|
||||
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_string>(thd, this); }
|
||||
Item *do_build_clone(THD *thd) const override { return get_copy(thd); }
|
||||
|
||||
Item *deep_copy(THD *thd) const override
|
||||
{ return shallow_copy_with_checks(thd); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -4922,7 +4963,9 @@ public:
|
|||
{
|
||||
return true;
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_string_with_introducer>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -4936,7 +4979,9 @@ public:
|
|||
Item_string_sys(THD *thd, const char *str):
|
||||
Item_string(thd, str, (uint) strlen(str), system_charset_info)
|
||||
{ }
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_string_sys>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -4952,7 +4997,9 @@ public:
|
|||
Item_string(thd, str, (uint) strlen(str), &my_charset_latin1,
|
||||
DERIVATION_COERCIBLE, MY_REPERTOIRE_ASCII)
|
||||
{ }
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_string_ascii>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -4990,7 +5037,9 @@ public:
|
|||
// require fix_fields() to be re-run for every statement.
|
||||
return mark_unsupported_function(func_name.str, arg, VCOL_TIME_FUNC);
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_static_string_func>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -5009,7 +5058,9 @@ public:
|
|||
{
|
||||
return mark_unsupported_function("safe_string", arg, VCOL_IMPOSSIBLE);
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_partition_func_safe_string>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -5126,9 +5177,12 @@ public:
|
|||
return field->store_hex_hybrid(str_value.ptr(), str_value.length());
|
||||
}
|
||||
void print(String *str, enum_query_type query_type) override;
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_hex_hybrid>(thd, this); }
|
||||
Item *do_build_clone(THD *thd) const override { return get_copy(thd); }
|
||||
Item *deep_copy(THD *thd) const override
|
||||
{ return shallow_copy_with_checks(thd); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -5171,9 +5225,12 @@ public:
|
|||
collation.collation);
|
||||
}
|
||||
void print(String *str, enum_query_type query_type) override;
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_hex_string>(thd, this); }
|
||||
Item *do_build_clone(THD *thd) const override { return get_copy(thd); }
|
||||
Item *deep_copy(THD *thd) const override
|
||||
{ return shallow_copy_with_checks(thd); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -5182,7 +5239,9 @@ class Item_bin_string: public Item_hex_hybrid
|
|||
public:
|
||||
Item_bin_string(THD *thd, const char *str, size_t str_length);
|
||||
void print(String *str, enum_query_type query_type) override;
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_bin_string>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -5236,9 +5295,12 @@ public:
|
|||
{
|
||||
m_value= value;
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_timestamp_literal>(thd, this); }
|
||||
Item *do_build_clone(THD *thd) const override { return get_copy(thd); }
|
||||
Item *deep_copy(THD *thd) const override
|
||||
{ return shallow_copy_with_checks(thd); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -5332,9 +5394,12 @@ public:
|
|||
return update_null() ? 0 : cached_time.valid_date_to_packed();
|
||||
}
|
||||
bool get_date(THD *thd, MYSQL_TIME *res, date_mode_t fuzzydate) override;
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_date_literal>(thd, this); }
|
||||
Item *do_build_clone(THD *thd) const override { return get_copy(thd); }
|
||||
Item *deep_copy(THD *thd) const override
|
||||
{ return shallow_copy_with_checks(thd); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -5384,9 +5449,12 @@ public:
|
|||
{
|
||||
return Time(thd, this).to_native(to, decimals);
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_time_literal>(thd, this); }
|
||||
Item *do_build_clone(THD *thd) const override { return get_copy(thd); }
|
||||
Item *deep_copy(THD *thd) const override
|
||||
{ return shallow_copy_with_checks(thd); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -5449,9 +5517,12 @@ public:
|
|||
return update_null() ? 0 : cached_time.valid_datetime_to_packed();
|
||||
}
|
||||
bool get_date(THD *thd, MYSQL_TIME *res, date_mode_t fuzzydate) override;
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_datetime_literal>(thd, this); }
|
||||
Item *do_build_clone(THD *thd) const override { return get_copy(thd); }
|
||||
Item *deep_copy(THD *thd) const override
|
||||
{ return shallow_copy_with_checks(thd); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -5494,9 +5565,12 @@ public:
|
|||
cached_time.copy_to_mysql_time(ltime);
|
||||
return (null_value= false);
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_date_literal_for_invalid_dates>(thd, this); }
|
||||
Item *do_build_clone(THD *thd) const override { return get_copy(thd); }
|
||||
Item *deep_copy(THD *thd) const override
|
||||
{ return shallow_copy_with_checks(thd); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -5519,9 +5593,12 @@ public:
|
|||
cached_time.copy_to_mysql_time(ltime);
|
||||
return (null_value= false);
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_datetime_literal_for_invalid_dates>(thd, this); }
|
||||
Item *do_build_clone(THD *thd) const override { return get_copy(thd); }
|
||||
Item *deep_copy(THD *thd) const override
|
||||
{ return shallow_copy_with_checks(thd); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -5743,7 +5820,7 @@ public:
|
|||
virtual bool fix_length_and_dec()= 0;
|
||||
bool const_item() const override { return const_item_cache; }
|
||||
table_map used_tables() const override { return used_tables_cache; }
|
||||
Item* do_build_clone(THD *thd) const override;
|
||||
Item* deep_copy(THD *thd) const override;
|
||||
Sql_mode_dependency value_depends_on_sql_mode() const override
|
||||
{
|
||||
return Item_args::value_depends_on_sql_mode_bit_or().soft_to_hard();
|
||||
|
|
@ -5998,12 +6075,6 @@ public:
|
|||
DBUG_ASSERT(ref);
|
||||
return (*ref)->is_outer_field();
|
||||
}
|
||||
Item *do_build_clone(THD *thd) const override;
|
||||
/**
|
||||
Checks if the item tree that ref points to contains a subquery.
|
||||
*/
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_ref>(thd, this); }
|
||||
bool excl_dep_on_table(table_map tab_map) override
|
||||
{
|
||||
table_map used= used_tables();
|
||||
|
|
@ -6033,6 +6104,11 @@ public:
|
|||
}
|
||||
Item *field_transformer_for_having_pushdown(THD *thd, uchar *arg) override
|
||||
{ return (*ref)->field_transformer_for_having_pushdown(thd, arg); }
|
||||
|
||||
protected:
|
||||
Item *deep_copy(THD *thd) const override;
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_ref>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -6078,14 +6154,16 @@ public:
|
|||
longlong val_datetime_packed(THD *) override;
|
||||
longlong val_time_packed(THD *) override;
|
||||
Ref_Type ref_type() override { return DIRECT_REF; }
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_direct_ref>(thd, this); }
|
||||
|
||||
/* Should be called if ref is changed */
|
||||
inline void ref_changed()
|
||||
{
|
||||
set_properties();
|
||||
}
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_direct_ref>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -6245,9 +6323,10 @@ public:
|
|||
{
|
||||
return mark_unsupported_function("cache", arg, VCOL_IMPOSSIBLE);
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_cache_wrapper>(thd, this); }
|
||||
Item *do_build_clone(THD *) const override { return nullptr; }
|
||||
Item *deep_copy(THD *) const override { return nullptr; }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -6459,8 +6538,10 @@ public:
|
|||
my_decimal *val_decimal_result(my_decimal *val) override;
|
||||
bool val_bool_result() override;
|
||||
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_direct_view_ref>(thd, this); }
|
||||
public:
|
||||
Item *field_transformer_for_having_pushdown(THD *, uchar *) override
|
||||
{ return this; }
|
||||
};
|
||||
|
|
@ -6522,9 +6603,11 @@ public:
|
|||
table_map not_null_tables() const override { return 0; }
|
||||
Ref_Type ref_type() override { return OUTER_REF; }
|
||||
bool check_inner_refs_processor(void * arg) override;
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_outer_ref>(thd, this); }
|
||||
Item *do_build_clone(THD *thd) const override { return get_copy(thd); }
|
||||
Item *deep_copy(THD *thd) const override
|
||||
{ return shallow_copy_with_checks(thd); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -6561,7 +6644,8 @@ public:
|
|||
bool val_native(THD *thd, Native *to) override;
|
||||
void print(String *str, enum_query_type query_type) override;
|
||||
table_map used_tables() const override;
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_ref_null_helper>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -6589,9 +6673,11 @@ public:
|
|||
}
|
||||
Item *clone_item(THD *thd) const override;
|
||||
Item *real_item() override { return ref; }
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_int_with_ref>(thd, this); }
|
||||
Item *do_build_clone(THD *thd) const override { return get_copy(thd); }
|
||||
Item *deep_copy(THD *thd) const override
|
||||
{ return shallow_copy_with_checks(thd); }
|
||||
};
|
||||
|
||||
#ifdef MYSQL_SERVER
|
||||
|
|
@ -6737,9 +6823,11 @@ public:
|
|||
}
|
||||
void copy() override;
|
||||
int save_in_field(Field *field, bool no_conversions) override;
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_copy_string>(thd, this); }
|
||||
Item *do_build_clone(THD *thd) const override { return get_copy(thd); }
|
||||
Item *deep_copy(THD *thd) const override
|
||||
{ return shallow_copy_with_checks(thd); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -6819,9 +6907,11 @@ public:
|
|||
DBUG_ASSERT(sane());
|
||||
return null_value || m_value.to_native(to, decimals);
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_copy_timestamp>(thd, this); }
|
||||
Item *do_build_clone(THD *thd) const override { return get_copy(thd); }
|
||||
Item *deep_copy(THD *thd) const override
|
||||
{ return shallow_copy_with_checks(thd); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -7021,7 +7111,8 @@ public:
|
|||
description
|
||||
*/
|
||||
bool associate_with_target_field(THD *thd, Item_field *field) override;
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{
|
||||
Item_default_value *new_item=
|
||||
(Item_default_value *) get_item_copy<Item_default_value>(thd, this);
|
||||
|
|
@ -7029,7 +7120,8 @@ public:
|
|||
new_item->m_share_field= 1;
|
||||
return new_item;
|
||||
}
|
||||
Item* do_build_clone(THD *thd) const override { return get_copy(thd); }
|
||||
Item* deep_copy(THD *thd) const override
|
||||
{ return shallow_copy_with_checks(thd); }
|
||||
private:
|
||||
bool tie_field(THD *thd);
|
||||
};
|
||||
|
|
@ -7116,9 +7208,11 @@ public:
|
|||
param->set_default(true);
|
||||
return false;
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_default_specification>(thd, this); }
|
||||
Item *do_build_clone(THD *thd) const override { return get_copy(thd); }
|
||||
Item *deep_copy(THD *thd) const override
|
||||
{ return shallow_copy_with_checks(thd); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -7151,9 +7245,11 @@ public:
|
|||
return false;
|
||||
}
|
||||
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_ignore_specification>(thd, this); }
|
||||
Item *do_build_clone(THD *thd) const override { return get_copy(thd); }
|
||||
Item *deep_copy(THD *thd) const override
|
||||
{ return shallow_copy_with_checks(thd); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -7201,7 +7297,8 @@ public:
|
|||
{
|
||||
return mark_unsupported_function("value()", arg, VCOL_IMPOSSIBLE);
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_insert_value>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -7276,9 +7373,11 @@ Item_trigger_field(THD *thd, Name_resolution_context *context_arg,
|
|||
Item *copy_or_same(THD *) override { return this; }
|
||||
Item *get_tmp_table_item(THD *thd) override { return copy_or_same(thd); }
|
||||
void cleanup() override;
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_trigger_field>(thd, this); }
|
||||
Item *do_build_clone(THD *thd) const override { return get_copy(thd); }
|
||||
Item *deep_copy(THD *thd) const override
|
||||
{ return shallow_copy_with_checks(thd); }
|
||||
|
||||
private:
|
||||
void set_required_privilege(bool rw) override;
|
||||
|
|
@ -7508,9 +7607,11 @@ public:
|
|||
bool cache_value() override;
|
||||
int save_in_field(Field *field, bool no_conversions) override;
|
||||
Item *convert_to_basic_const_item(THD *thd) override;
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_cache_int>(thd, this); }
|
||||
Item *do_build_clone(THD *thd) const override { return get_copy(thd); }
|
||||
Item *deep_copy(THD *thd) const override
|
||||
{ return shallow_copy_with_checks(thd); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -7530,7 +7631,8 @@ public:
|
|||
DBUG_ASSERT(!is_cond());
|
||||
return Item_cache_bool::val_bool();
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_cache_bool>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -7544,7 +7646,8 @@ public:
|
|||
{
|
||||
return type_handler_year.Item_get_date_with_warn(thd, this, to, mode);
|
||||
}
|
||||
Item *do_build_clone(THD *thd) const override { return get_copy(thd); }
|
||||
Item *deep_copy(THD *thd) const override
|
||||
{ return shallow_copy_with_checks(thd); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -7581,7 +7684,7 @@ public:
|
|||
Item_cache_time(THD *thd)
|
||||
:Item_cache_temporal(thd, &type_handler_time2) { }
|
||||
bool cache_value() override;
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_cache_time>(thd, this); }
|
||||
Item *make_literal(THD *) override;
|
||||
longlong val_datetime_packed(THD *thd) override
|
||||
|
|
@ -7621,8 +7724,10 @@ class Item_cache_datetime: public Item_cache_temporal
|
|||
public:
|
||||
Item_cache_datetime(THD *thd)
|
||||
:Item_cache_temporal(thd, &type_handler_datetime2) { }
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_cache_datetime>(thd, this); }
|
||||
public:
|
||||
Item *make_literal(THD *) override;
|
||||
longlong val_datetime_packed(THD *) override
|
||||
{
|
||||
|
|
@ -7656,8 +7761,10 @@ class Item_cache_date: public Item_cache_temporal
|
|||
public:
|
||||
Item_cache_date(THD *thd)
|
||||
:Item_cache_temporal(thd, &type_handler_newdate) { }
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_cache_date>(thd, this); }
|
||||
public:
|
||||
Item *make_literal(THD *) override;
|
||||
longlong val_datetime_packed(THD *) override
|
||||
{
|
||||
|
|
@ -7689,9 +7796,12 @@ class Item_cache_timestamp: public Item_cache
|
|||
public:
|
||||
Item_cache_timestamp(THD *thd)
|
||||
:Item_cache(thd, &type_handler_timestamp2) { }
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_cache_timestamp>(thd, this); }
|
||||
Item *do_build_clone(THD *thd) const override { return get_copy(thd); }
|
||||
Item *deep_copy(THD *thd) const override
|
||||
{ return shallow_copy_with_checks(thd); }
|
||||
public:
|
||||
bool cache_value() override;
|
||||
String* val_str(String *to) override
|
||||
{
|
||||
|
|
@ -7750,9 +7860,11 @@ public:
|
|||
:Item_cache_real(thd, &type_handler_double)
|
||||
{ }
|
||||
String *val_str(String *str) override;
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_cache_double>(thd, this); }
|
||||
Item *do_build_clone(THD *thd) const override { return get_copy(thd); }
|
||||
Item *deep_copy(THD *thd) const override
|
||||
{ return shallow_copy_with_checks(thd); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -7763,9 +7875,11 @@ public:
|
|||
:Item_cache_real(thd, &type_handler_float)
|
||||
{ }
|
||||
String *val_str(String *str) override;
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_cache_float>(thd, this); }
|
||||
Item *do_build_clone(THD *thd) const override { return get_copy(thd); }
|
||||
Item *deep_copy(THD *thd) const override
|
||||
{ return shallow_copy_with_checks(thd); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -7787,9 +7901,11 @@ public:
|
|||
}
|
||||
bool cache_value() override;
|
||||
Item *convert_to_basic_const_item(THD *thd) override;
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_cache_decimal>(thd, this); }
|
||||
Item *do_build_clone(THD *thd) const override { return get_copy(thd); }
|
||||
Item *deep_copy(THD *thd) const override
|
||||
{ return shallow_copy_with_checks(thd); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -7818,9 +7934,11 @@ public:
|
|||
int save_in_field(Field *field, bool no_conversions) override;
|
||||
bool cache_value() override;
|
||||
Item *convert_to_basic_const_item(THD *thd) override;
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_cache_str>(thd, this); }
|
||||
Item *do_build_clone(THD *thd) const override { return get_copy(thd); }
|
||||
Item *deep_copy(THD *thd) const override
|
||||
{ return shallow_copy_with_checks(thd); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -7844,9 +7962,13 @@ public:
|
|||
*/
|
||||
return Item::safe_charset_converter(thd, tocs);
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_cache_str_for_nullif>(thd, this); }
|
||||
Item *do_build_clone(THD *thd) const override { return get_copy(thd); }
|
||||
Item *deep_copy(THD *thd) const override
|
||||
{
|
||||
return shallow_copy_with_checks(thd);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -7922,9 +8044,13 @@ public:
|
|||
}
|
||||
bool cache_value() override;
|
||||
void set_null() override;
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_cache_row>(thd, this); }
|
||||
Item *do_build_clone(THD *thd) const override { return get_copy(thd); }
|
||||
Item *deep_copy(THD *thd) const override
|
||||
{
|
||||
return shallow_copy_with_checks(thd);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -7993,8 +8119,9 @@ public:
|
|||
make_and_init_table_field(root, &name, Record_addr(maybe_null()),
|
||||
*this, table);
|
||||
}
|
||||
Item *do_get_copy(THD *) const override { return nullptr; }
|
||||
Item *do_build_clone(THD *) const override { return nullptr; }
|
||||
protected:
|
||||
Item *shallow_copy(THD *) const override { return nullptr; }
|
||||
Item *deep_copy(THD *) const override { return nullptr; }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -8148,8 +8275,10 @@ public:
|
|||
Item *safe_charset_converter(THD *thd, CHARSET_INFO *tocs) override;
|
||||
Item *get_tmp_table_item(THD *thd) override
|
||||
{ return m_item->get_tmp_table_item(thd); }
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_direct_ref_to_item>(thd, this); }
|
||||
public:
|
||||
COND *build_equal_items(THD *thd, COND_EQUAL *inherited,
|
||||
bool link_item_fields,
|
||||
COND_EQUAL **cond_equal_ref) override
|
||||
|
|
@ -8219,12 +8348,13 @@ public:
|
|||
{ return m_item->excl_dep_on_grouping_fields(sel); }
|
||||
bool is_expensive() override { return m_item->is_expensive(); }
|
||||
void set_item(Item *item) { m_item= item; }
|
||||
Item *do_build_clone(THD *thd) const override
|
||||
Item *deep_copy(THD *thd) const override
|
||||
{
|
||||
Item *clone_item= m_item->build_clone(thd);
|
||||
Item *clone_item= m_item->deep_copy_with_checks(thd);
|
||||
if (clone_item)
|
||||
{
|
||||
Item_direct_ref_to_item *copy= (Item_direct_ref_to_item *) get_copy(thd);
|
||||
Item_direct_ref_to_item *copy=
|
||||
(Item_direct_ref_to_item *) shallow_copy_with_checks(thd);
|
||||
if (!copy)
|
||||
return 0;
|
||||
copy->set_item(clone_item);
|
||||
|
|
|
|||
|
|
@ -1853,13 +1853,13 @@ bool Item_func_eq::val_bool()
|
|||
}
|
||||
|
||||
|
||||
Item *Item_func_eq::do_build_clone(THD *thd) const
|
||||
Item *Item_func_eq::deep_copy(THD *thd) const
|
||||
{
|
||||
/*
|
||||
Clone the parent and cast to the child class since there is nothing
|
||||
specific for Item_func_eq
|
||||
*/
|
||||
return (Item_func_eq*) Item_bool_rowready_func2::do_build_clone(thd);
|
||||
return (Item_func_eq*) Item_bool_rowready_func2::deep_copy(thd);
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -5551,16 +5551,16 @@ void Item_cond::neg_arguments(THD *thd)
|
|||
0 if an error occurred
|
||||
*/
|
||||
|
||||
Item *Item_cond::do_build_clone(THD *thd) const
|
||||
Item *Item_cond::deep_copy(THD *thd) const
|
||||
{
|
||||
Item_cond *copy= (Item_cond *) get_copy(thd);
|
||||
Item_cond *copy= (Item_cond *) shallow_copy_with_checks(thd);
|
||||
if (!copy)
|
||||
return 0;
|
||||
copy->list.empty();
|
||||
|
||||
for (const Item &item : list)
|
||||
{
|
||||
Item *arg_clone= item.build_clone(thd);
|
||||
Item *arg_clone= item.deep_copy_with_checks(thd);
|
||||
if (!arg_clone)
|
||||
return 0;
|
||||
if (copy->list.push_back(arg_clone, thd->mem_root))
|
||||
|
|
@ -7903,9 +7903,9 @@ bool Item_equal::create_pushable_equalities(THD *thd,
|
|||
if (right_item)
|
||||
{
|
||||
Item_func_eq *eq= 0;
|
||||
Item *left_item_clone= left_item->build_clone(thd);
|
||||
Item *left_item_clone= left_item->deep_copy_with_checks(thd);
|
||||
Item *right_item_clone= !clone_const ?
|
||||
right_item : right_item->build_clone(thd);
|
||||
right_item : right_item->deep_copy_with_checks(thd);
|
||||
if (!left_item_clone || !right_item_clone)
|
||||
return true;
|
||||
eq= new (thd->mem_root) Item_func_eq(thd,
|
||||
|
|
@ -7932,8 +7932,8 @@ bool Item_equal::create_pushable_equalities(THD *thd,
|
|||
if (checker && !((item->*checker) (arg)))
|
||||
continue;
|
||||
Item_func_eq *eq= 0;
|
||||
Item *left_item_clone= left_item->build_clone(thd);
|
||||
Item *right_item_clone= item->build_clone(thd);
|
||||
Item *left_item_clone= left_item->deep_copy_with_checks(thd);
|
||||
Item *right_item_clone= item->deep_copy_with_checks(thd);
|
||||
if (!(left_item_clone && right_item_clone))
|
||||
return true;
|
||||
left_item_clone->set_item_equal(NULL);
|
||||
|
|
|
|||
|
|
@ -310,7 +310,9 @@ public:
|
|||
static LEX_CSTRING name= {STRING_WITH_LEN("istrue") };
|
||||
return name;
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_istrue>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -331,10 +333,12 @@ public:
|
|||
return name;
|
||||
}
|
||||
bool find_not_null_fields(table_map allowed) override { return false; }
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_isnottrue>(thd, this); }
|
||||
bool eval_not_null_tables(void *) override
|
||||
{ not_null_tables_cache= 0; return false; }
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_isnottrue>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -352,7 +356,9 @@ public:
|
|||
static LEX_CSTRING name= {STRING_WITH_LEN("isfalse") };
|
||||
return name;
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_isfalse>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -373,10 +379,12 @@ public:
|
|||
return name;
|
||||
}
|
||||
bool find_not_null_fields(table_map allowed) override { return false; }
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_isnotfalse>(thd, this); }
|
||||
bool eval_not_null_tables(void *) override
|
||||
{ not_null_tables_cache= 0; return false; }
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_isnotfalse>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -450,9 +458,11 @@ public:
|
|||
void restore_first_argument();
|
||||
Item* get_wrapped_in_subselect_item()
|
||||
{ return args[1]; }
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_in_optimizer>(thd, this); }
|
||||
enum precedence precedence() const override { return args[1]->precedence(); }
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_in_optimizer>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -623,10 +633,10 @@ public:
|
|||
return add_key_fields_optimize_op(join, key_fields, and_level,
|
||||
usable_tables, sargables, false);
|
||||
}
|
||||
Item *do_build_clone(THD *thd) const override
|
||||
Item *deep_copy(THD *thd) const override
|
||||
{
|
||||
Item_bool_rowready_func2 *clone=
|
||||
(Item_bool_rowready_func2 *) Item_func::do_build_clone(thd);
|
||||
(Item_bool_rowready_func2 *) Item_func::deep_copy(thd);
|
||||
if (clone)
|
||||
{
|
||||
clone->cmp.comparators= 0;
|
||||
|
|
@ -661,7 +671,8 @@ public:
|
|||
Item_args::propagate_equal_fields(thd, Context_boolean(), cond);
|
||||
return this;
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_xor>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -685,7 +696,8 @@ public:
|
|||
Item *neg_transformer(THD *thd) override;
|
||||
bool fix_fields(THD *, Item **) override;
|
||||
void print(String *str, enum_query_type query_type) override;
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_not>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -738,7 +750,8 @@ public:
|
|||
void add_key_fields(JOIN *join, KEY_FIELD **key_fields,
|
||||
uint *and_level, table_map usable_tables,
|
||||
SARGABLE_PARAM **sargables) override;
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_trig_cond>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -771,11 +784,11 @@ public:
|
|||
void set_sub_test(Item_maxmin_subselect *item) { test_sub_item= item; test_sum_item= 0;};
|
||||
bool empty_underlying_subquery();
|
||||
Item *neg_transformer(THD *thd) override;
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_not_all>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
class Item_func_nop_all :public Item_func_not_all
|
||||
{
|
||||
public:
|
||||
|
|
@ -788,11 +801,11 @@ public:
|
|||
return name;
|
||||
}
|
||||
Item *neg_transformer(THD *thd) override;
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_nop_all>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
class Item_func_eq :public Item_bool_rowready_func2
|
||||
{
|
||||
bool abort_on_null;
|
||||
|
|
@ -833,9 +846,11 @@ public:
|
|||
uint in_equality_no;
|
||||
uint exists2in_reserved_items() override { return 1; };
|
||||
friend class Arg_comparator;
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
Item *deep_copy(THD *thd) const override;
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_eq>(thd, this); }
|
||||
Item *do_build_clone(THD *thd) const override;
|
||||
};
|
||||
|
||||
class Item_func_equal final :public Item_bool_rowready_func2
|
||||
|
|
@ -864,7 +879,9 @@ public:
|
|||
return add_key_fields_optimize_op(join, key_fields, and_level,
|
||||
usable_tables, sargables, true);
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_equal>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -884,7 +901,9 @@ public:
|
|||
return name;
|
||||
}
|
||||
Item *negated_item(THD *thd) override;
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_ge>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -904,7 +923,9 @@ public:
|
|||
return name;
|
||||
}
|
||||
Item *negated_item(THD *thd) override;
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_gt>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -924,7 +945,9 @@ public:
|
|||
return name;
|
||||
}
|
||||
Item *negated_item(THD *thd) override;
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_le>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -944,7 +967,9 @@ public:
|
|||
return name;
|
||||
}
|
||||
Item *negated_item(THD *thd) override;
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_lt>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -969,7 +994,9 @@ public:
|
|||
Item *negated_item(THD *thd) override;
|
||||
void add_key_fields(JOIN *join, KEY_FIELD **key_fields, uint *and_level,
|
||||
table_map usable_tables, SARGABLE_PARAM **sargables) override;
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_ne>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -1070,9 +1097,6 @@ public:
|
|||
cond);
|
||||
return this;
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_between>(thd, this); }
|
||||
|
||||
longlong val_int_cmp_string();
|
||||
longlong val_int_cmp_datetime();
|
||||
longlong val_int_cmp_time();
|
||||
|
|
@ -1080,6 +1104,10 @@ public:
|
|||
longlong val_int_cmp_int();
|
||||
longlong val_int_cmp_real();
|
||||
longlong val_int_cmp_decimal();
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_between>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -1106,7 +1134,9 @@ public:
|
|||
fix_char_length(2); // returns "1" or "0" or "-1"
|
||||
return FALSE;
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_strcmp>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -1144,7 +1174,9 @@ public:
|
|||
str->append(func_name_cstring());
|
||||
print_args(str, 0, query_type);
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_interval>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -1176,7 +1208,9 @@ public:
|
|||
return name;
|
||||
}
|
||||
table_map not_null_tables() const override { return 0; }
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_coalesce>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -1271,7 +1305,9 @@ public:
|
|||
}
|
||||
|
||||
table_map not_null_tables() const override { return 0; }
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_ifnull>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -1350,8 +1386,11 @@ public:
|
|||
bool eval_not_null_tables(void *opt_arg) override;
|
||||
void fix_after_pullout(st_select_lex *new_parent, Item **ref, bool merge)
|
||||
override;
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_if>(thd, this); }
|
||||
|
||||
private:
|
||||
void cache_type_info(Item *source);
|
||||
};
|
||||
|
|
@ -1376,7 +1415,9 @@ public:
|
|||
{
|
||||
return fix_length_and_dec2_eliminate_null(args + 1);
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_nvl2>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -1470,8 +1511,6 @@ public:
|
|||
cond, &args[2]);
|
||||
return this;
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_nullif>(thd, this); }
|
||||
Item *derived_field_transformer_for_having(THD *thd, uchar *arg) override
|
||||
{ reset_first_arg_if_needed(); return this; }
|
||||
Item *derived_field_transformer_for_where(THD *thd, uchar *arg) override
|
||||
|
|
@ -1482,6 +1521,10 @@ public:
|
|||
{ reset_first_arg_if_needed(); return this; }
|
||||
Item *in_subq_field_transformer_for_having(THD *thd, uchar *arg) override
|
||||
{ reset_first_arg_if_needed(); return this; }
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_nullif>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -2421,7 +2464,9 @@ public:
|
|||
return this;
|
||||
}
|
||||
Item *find_item() override;
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_case_searched>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -2471,16 +2516,18 @@ public:
|
|||
Item *propagate_equal_fields(THD *thd, const Context &ctx, COND_EQUAL *cond)
|
||||
override;
|
||||
Item *find_item() override;
|
||||
Item *do_build_clone(THD *thd) const override
|
||||
protected:
|
||||
Item *deep_copy(THD *thd) const override
|
||||
{
|
||||
Item_func_case_simple *clone= (Item_func_case_simple *)
|
||||
Item_func_case::do_build_clone(thd);
|
||||
Item_func_case::deep_copy(thd);
|
||||
uint ncases= when_count();
|
||||
if (clone && clone->Predicant_to_list_comparator::init_clone(thd, ncases))
|
||||
return NULL;
|
||||
return clone;
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
}
|
||||
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_case_simple>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -2500,7 +2547,9 @@ public:
|
|||
void print(String *str, enum_query_type query_type) override;
|
||||
bool fix_length_and_dec() override;
|
||||
Item *find_item() override;
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_decode_oracle>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -2672,11 +2721,9 @@ public:
|
|||
void fix_after_pullout(st_select_lex *new_parent, Item **ref, bool merge)
|
||||
override;
|
||||
bool count_sargable_conds(void *arg) override;
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_in>(thd, this); }
|
||||
Item *do_build_clone(THD *thd) const override
|
||||
Item *deep_copy(THD *thd) const override
|
||||
{
|
||||
Item_func_in *clone= (Item_func_in *) Item_func::do_build_clone(thd);
|
||||
Item_func_in *clone= (Item_func_in *) Item_func::deep_copy(thd);
|
||||
if (clone)
|
||||
{
|
||||
clone->array= 0;
|
||||
|
|
@ -2691,6 +2738,10 @@ public:
|
|||
Item *in_predicate_to_in_subs_transformer(THD *thd, uchar *arg) override;
|
||||
Item *in_predicate_to_equality_transformer(THD *thd, uchar *arg) override;
|
||||
uint32 max_length_of_left_expr();
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_in>(thd, this); }
|
||||
};
|
||||
|
||||
class cmp_item_row :public cmp_item
|
||||
|
|
@ -2824,7 +2875,9 @@ public:
|
|||
table_map not_null_tables() const override { return 0; }
|
||||
bool find_not_null_fields(table_map allowed) override;
|
||||
Item *neg_transformer(THD *thd) override;
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_isnull>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -2880,7 +2933,9 @@ public:
|
|||
Item *neg_transformer(THD *thd) override;
|
||||
void print(String *str, enum_query_type query_type) override;
|
||||
void top_level_item() override { abort_on_null=1; }
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_isnotnull>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -3042,15 +3097,16 @@ public:
|
|||
}
|
||||
|
||||
bool find_selective_predicates_list_processor(void *arg) override;
|
||||
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_like>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
typedef struct pcre2_real_code_8 pcre2_code;
|
||||
typedef struct pcre2_real_match_data_8 pcre2_match_data;
|
||||
#define PCRE2_SIZE size_t
|
||||
|
||||
class Regexp_processor_pcre
|
||||
{
|
||||
pcre2_code *m_pcre;
|
||||
|
|
@ -3140,7 +3196,6 @@ public:
|
|||
return name;
|
||||
}
|
||||
enum precedence precedence() const override { return IN_PRECEDENCE; }
|
||||
Item *do_get_copy(THD *thd) const override { return 0; }
|
||||
void print(String *str, enum_query_type query_type) override
|
||||
{
|
||||
print_op(str, query_type);
|
||||
|
|
@ -3148,6 +3203,8 @@ public:
|
|||
|
||||
CHARSET_INFO *compare_collation() const override
|
||||
{ return cmp_collation.collation; }
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override { return nullptr; }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -3184,7 +3241,8 @@ public:
|
|||
static LEX_CSTRING name= {STRING_WITH_LEN("regexp_instr") };
|
||||
return name;
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override { return 0; }
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override { return nullptr; }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -3283,7 +3341,7 @@ public:
|
|||
}
|
||||
bool eval_not_null_tables(void *opt_arg) override;
|
||||
bool find_not_null_fields(table_map allowed) override;
|
||||
Item *do_build_clone(THD *thd) const override;
|
||||
Item *deep_copy(THD *thd) const override;
|
||||
bool excl_dep_on_table(table_map tab_map) override;
|
||||
bool excl_dep_on_grouping_fields(st_select_lex *sel) override;
|
||||
|
||||
|
|
@ -3472,7 +3530,9 @@ 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* do_get_copy(THD *thd) const override { return 0; }
|
||||
protected:
|
||||
Item* shallow_copy(THD *thd) const override { return 0; }
|
||||
public:
|
||||
/*
|
||||
This does not comply with the specification of the virtual method,
|
||||
but Item_equal items are processed distinguishly anyway
|
||||
|
|
@ -3643,7 +3703,9 @@ public:
|
|||
table_map usable_tables, SARGABLE_PARAM **sargables)
|
||||
override;
|
||||
SEL_TREE *get_mm_tree(RANGE_OPT_PARAM *param, Item **cond_ptr) override;
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_cond_and>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -3671,7 +3733,8 @@ public:
|
|||
table_map not_null_tables() const override { return and_tables_cache; }
|
||||
Item *copy_andor_structure(THD *thd) override;
|
||||
Item *neg_transformer(THD *thd) override;
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_cond_or>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -3686,7 +3749,8 @@ public:
|
|||
return name;
|
||||
}
|
||||
bool need_parentheses_in_default() override { return false; }
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_dyncol_check>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -3702,7 +3766,8 @@ public:
|
|||
return name;
|
||||
}
|
||||
bool need_parentheses_in_default() override { return false; }
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_dyncol_exists>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -3735,7 +3800,8 @@ public:
|
|||
return name;
|
||||
}
|
||||
bool val_bool() override;
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_cursor_isopen>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -3754,7 +3820,8 @@ public:
|
|||
return name;
|
||||
}
|
||||
bool val_bool() override;
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_cursor_found>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -3773,7 +3840,8 @@ public:
|
|||
return name;
|
||||
}
|
||||
bool val_bool() override;
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_cursor_notfound>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
|
|||
321
sql/item_func.h
321
sql/item_func.h
|
|
@ -1293,13 +1293,15 @@ public:
|
|||
bool fix_length_and_dec() override;
|
||||
const Type_handler *type_handler() const override
|
||||
{ return &type_handler_slong; }
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_hash>(thd, this); }
|
||||
LEX_CSTRING func_name_cstring() const override
|
||||
{
|
||||
static LEX_CSTRING name= {STRING_WITH_LEN("<hash>") };
|
||||
return name;
|
||||
}
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_hash>(thd, this); }
|
||||
};
|
||||
|
||||
class Item_func_hash_mariadb_100403: public Item_func_hash
|
||||
|
|
@ -1309,13 +1311,15 @@ public:
|
|||
:Item_func_hash(thd, item)
|
||||
{}
|
||||
longlong val_int() override;
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_hash_mariadb_100403>(thd, this); }
|
||||
LEX_CSTRING func_name_cstring() const override
|
||||
{
|
||||
static LEX_CSTRING name= {STRING_WITH_LEN("<hash_mariadb_100403>") };
|
||||
return name;
|
||||
}
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_hash_mariadb_100403>(thd, this); }
|
||||
};
|
||||
|
||||
class Item_longlong_func: public Item_int_func
|
||||
|
|
@ -1375,7 +1379,9 @@ public:
|
|||
{
|
||||
return Cursor_ref::print_func(str, func_name_cstring());
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_cursor_rowcount>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -1400,7 +1406,9 @@ public:
|
|||
return mark_unsupported_function(func_name(), "()", arg,
|
||||
VCOL_SESSION_FUNC);
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_connection_id>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -1472,7 +1480,9 @@ public:
|
|||
decimal_digits_t decimal_precision() const override
|
||||
{ return args[0]->decimal_precision(); }
|
||||
bool need_parentheses_in_default() override { return true; }
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_signed>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -1508,7 +1518,9 @@ public:
|
|||
decimal_digits_t decimal_precision() const override
|
||||
{ return decimal_digits_t(max_length); }
|
||||
void print(String *str, enum_query_type query_type) override;
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_unsigned>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -1550,7 +1562,9 @@ public:
|
|||
}
|
||||
void print(String *str, enum_query_type query_type) override;
|
||||
bool need_parentheses_in_default() override { return true; }
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_decimal_typecast>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -1605,7 +1619,9 @@ public:
|
|||
nr.to_string(str, decimals);
|
||||
return str;
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_float_typecast>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -1627,7 +1643,9 @@ public:
|
|||
return name;
|
||||
}
|
||||
double val_real() override { return val_real_with_truncate(DBL_MAX); }
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_double_typecast>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -1657,7 +1675,9 @@ public:
|
|||
longlong int_op() override;
|
||||
double real_op() override;
|
||||
my_decimal *decimal_op(my_decimal *) override;
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_plus>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -1696,7 +1716,9 @@ public:
|
|||
Item_func_additive_op::fix_length_and_dec_int();
|
||||
fix_unsigned_flag();
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_minus>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -1719,7 +1741,9 @@ public:
|
|||
bool fix_length_and_dec() override;
|
||||
bool check_partition_func_processor(void *int_arg) override {return FALSE;}
|
||||
bool check_vcol_func_processor(void *arg) override { return FALSE;}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_mul>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -1742,7 +1766,9 @@ public:
|
|||
void fix_length_and_dec_double();
|
||||
void fix_length_and_dec_int();
|
||||
void result_precision() override;
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_div>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -1770,7 +1796,9 @@ public:
|
|||
bool check_partition_func_processor(void *int_arg) override {return FALSE;}
|
||||
bool check_vcol_func_processor(void *arg) override { return FALSE;}
|
||||
bool need_parentheses_in_default() override { return true; }
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_int_div>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -1808,7 +1836,9 @@ public:
|
|||
}
|
||||
bool check_partition_func_processor(void *int_arg) override {return FALSE;}
|
||||
bool check_vcol_func_processor(void *arg) override { return FALSE;}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_mod>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -1839,7 +1869,9 @@ public:
|
|||
decimal_digits_t decimal_precision() const override
|
||||
{ return args[0]->decimal_precision(); }
|
||||
bool need_parentheses_in_default() override { return true; }
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_neg>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -1861,7 +1893,9 @@ public:
|
|||
void fix_length_and_dec_double();
|
||||
void fix_length_and_dec_decimal();
|
||||
bool fix_length_and_dec() override;
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_abs>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -1893,7 +1927,9 @@ public:
|
|||
static LEX_CSTRING name= {STRING_WITH_LEN("exp") };
|
||||
return name;
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_exp>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -1908,7 +1944,9 @@ public:
|
|||
static LEX_CSTRING name= {STRING_WITH_LEN("ln") };
|
||||
return name;
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_ln>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -1924,7 +1962,9 @@ public:
|
|||
static LEX_CSTRING name= {STRING_WITH_LEN("log") };
|
||||
return name;
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_log>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -1939,7 +1979,9 @@ public:
|
|||
static LEX_CSTRING name= {STRING_WITH_LEN("log2") };
|
||||
return name;
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_log2>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -1954,7 +1996,9 @@ public:
|
|||
static LEX_CSTRING name= {STRING_WITH_LEN("log10") };
|
||||
return name;
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_log10>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -1969,7 +2013,9 @@ public:
|
|||
static LEX_CSTRING name= {STRING_WITH_LEN("sqrt") };
|
||||
return name;
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_sqrt>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -1984,7 +2030,9 @@ public:
|
|||
static LEX_CSTRING name= {STRING_WITH_LEN("pow") };
|
||||
return name;
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_pow>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -1999,7 +2047,9 @@ public:
|
|||
static LEX_CSTRING name= {STRING_WITH_LEN("acos") };
|
||||
return name;
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_acos>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -2013,7 +2063,9 @@ public:
|
|||
static LEX_CSTRING name= {STRING_WITH_LEN("asin") };
|
||||
return name;
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_asin>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -2028,7 +2080,9 @@ public:
|
|||
static LEX_CSTRING name= {STRING_WITH_LEN("atan") };
|
||||
return name;
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_atan>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -2042,7 +2096,9 @@ public:
|
|||
static LEX_CSTRING name= {STRING_WITH_LEN("cos") };
|
||||
return name;
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_cos>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -2056,7 +2112,9 @@ public:
|
|||
static LEX_CSTRING name= {STRING_WITH_LEN("sin") };
|
||||
return name;
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_sin>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -2070,7 +2128,9 @@ public:
|
|||
static LEX_CSTRING name= {STRING_WITH_LEN("tan") };
|
||||
return name;
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_tan>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -2084,7 +2144,9 @@ public:
|
|||
static LEX_CSTRING name= {STRING_WITH_LEN("cot") };
|
||||
return name;
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_cot>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -2131,7 +2193,9 @@ public:
|
|||
my_decimal *decimal_op(my_decimal *) override;
|
||||
bool date_op(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate) override;
|
||||
bool time_op(THD *thd, MYSQL_TIME *ltime) override;
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_ceiling>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -2151,7 +2215,9 @@ public:
|
|||
my_decimal *decimal_op(my_decimal *) override;
|
||||
bool date_op(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate) override;
|
||||
bool time_op(THD *thd, MYSQL_TIME *ltime) override;
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_floor>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -2201,7 +2267,9 @@ public:
|
|||
*/
|
||||
return args[0]->real_type_handler()->Item_func_round_fix_length_and_dec(this);
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_round>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -2231,7 +2299,9 @@ public:
|
|||
{
|
||||
return mark_unsupported_function(func_name(), "()", arg, VCOL_SESSION_FUNC);
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_rand>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -2280,12 +2350,14 @@ public:
|
|||
return mark_unsupported_function(func_name(), "()", arg,
|
||||
VCOL_IMPOSSIBLE);
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override { return 0; }
|
||||
/* This function is used in insert, update and delete */
|
||||
void store_pointer_to_row_counter(ha_rows *row_counter)
|
||||
{
|
||||
accepted_rows= row_counter;
|
||||
}
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override { return 0; }
|
||||
};
|
||||
|
||||
void fix_rownum_pointers(THD *thd, SELECT_LEX *select_lex, ha_rows *ptr);
|
||||
|
|
@ -2305,7 +2377,9 @@ public:
|
|||
decimal_digits_t decimal_precision() const override { return 1; }
|
||||
bool fix_length_and_dec() override { fix_char_length(2); return FALSE; }
|
||||
longlong val_int() override;
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_sign>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -2332,7 +2406,9 @@ public:
|
|||
max_length= float_length(decimals);
|
||||
return FALSE;
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_units>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -2439,7 +2515,9 @@ public:
|
|||
static LEX_CSTRING name= {STRING_WITH_LEN("least") };
|
||||
return name;
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_min>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -2452,7 +2530,9 @@ public:
|
|||
static LEX_CSTRING name= {STRING_WITH_LEN("greatest") };
|
||||
return name;
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_max>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -2492,7 +2572,9 @@ public:
|
|||
Type_std_attributes::set(*args[0]);
|
||||
return FALSE;
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_rollup_const>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -2518,7 +2600,9 @@ public:
|
|||
static LEX_CSTRING name= {STRING_WITH_LEN("octet_length") };
|
||||
return name;
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_octet_length>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -2538,7 +2622,9 @@ public:
|
|||
static LEX_CSTRING name= {STRING_WITH_LEN("bit_length") };
|
||||
return name;
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_bit_length>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -2553,7 +2639,9 @@ public:
|
|||
static LEX_CSTRING name= {STRING_WITH_LEN("char_length") };
|
||||
return name;
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_char_length>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -2585,9 +2673,11 @@ public:
|
|||
override
|
||||
{ return this; }
|
||||
bool const_item() const override { return true; }
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_coercibility>(thd, this); }
|
||||
table_map used_tables() const override { return 0; }
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_coercibility>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -2623,7 +2713,9 @@ public:
|
|||
return agg_arg_charsets_for_comparison(cmp_collation, args, 2);
|
||||
}
|
||||
void print(String *str, enum_query_type query_type) override;
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_locate>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -2642,7 +2734,9 @@ public:
|
|||
return name;
|
||||
}
|
||||
bool fix_length_and_dec() override;
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_field>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -2661,7 +2755,9 @@ public:
|
|||
return name;
|
||||
}
|
||||
bool fix_length_and_dec() override { max_length=3; return FALSE; }
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_ascii>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -2679,7 +2775,9 @@ public:
|
|||
static LEX_CSTRING name= {STRING_WITH_LEN("ord") };
|
||||
return name;
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_ord>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -2701,7 +2799,9 @@ public:
|
|||
return name;
|
||||
}
|
||||
bool fix_length_and_dec() override;
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_find_in_set>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -2747,7 +2847,7 @@ public:
|
|||
return name;
|
||||
}
|
||||
enum precedence precedence() const override { return BITOR_PRECEDENCE; }
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_bit_or>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -2763,7 +2863,8 @@ public:
|
|||
return name;
|
||||
}
|
||||
enum precedence precedence() const override { return BITAND_PRECEDENCE; }
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_bit_and>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -2779,7 +2880,8 @@ public:
|
|||
return name;
|
||||
}
|
||||
bool fix_length_and_dec() override;
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_bit_count>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -2795,7 +2897,8 @@ public:
|
|||
return name;
|
||||
}
|
||||
enum precedence precedence() const override { return SHIFT_PRECEDENCE; }
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_shift_left>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -2811,7 +2914,8 @@ public:
|
|||
return name;
|
||||
}
|
||||
enum precedence precedence() const override { return SHIFT_PRECEDENCE; }
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_shift_right>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -2831,7 +2935,8 @@ public:
|
|||
str->append(func_name_cstring());
|
||||
args[0]->print_parenthesised(str, query_type, precedence());
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_bit_neg>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -2861,7 +2966,8 @@ public:
|
|||
{
|
||||
return mark_unsupported_function(func_name(), "()", arg, VCOL_IMPOSSIBLE);
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_last_insert_id>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -2894,7 +3000,8 @@ public:
|
|||
{
|
||||
return mark_unsupported_function(func_name(), "()", arg, VCOL_IMPOSSIBLE);
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_benchmark>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -2925,7 +3032,8 @@ public:
|
|||
{
|
||||
return mark_unsupported_function(func_name(), "()", arg, VCOL_IMPOSSIBLE);
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_sleep>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -3082,7 +3190,8 @@ class Item_func_udf_float :public Item_udf_func
|
|||
const Type_handler *type_handler() const override
|
||||
{ return &type_handler_double; }
|
||||
bool fix_length_and_dec() override { fix_num_length_and_dec(); return FALSE; }
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_udf_float>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -3109,7 +3218,8 @@ public:
|
|||
return &type_handler_slonglong;
|
||||
}
|
||||
bool fix_length_and_dec() override { decimals= 0; max_length= 21; return FALSE; }
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_udf_int>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -3137,7 +3247,8 @@ public:
|
|||
const Type_handler *type_handler() const override
|
||||
{ return &type_handler_newdecimal; }
|
||||
bool fix_length_and_dec() override { fix_num_length_and_dec(); return FALSE; }
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_udf_decimal>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -3177,7 +3288,8 @@ public:
|
|||
const Type_handler *type_handler() const override
|
||||
{ return string_type_handler(); }
|
||||
bool fix_length_and_dec() override;
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_udf_str>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -3282,7 +3394,8 @@ class Item_func_get_lock final :public Item_func_lock
|
|||
set_maybe_null();
|
||||
return FALSE;
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override final
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override final
|
||||
{ return get_item_copy<Item_func_get_lock>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -3298,7 +3411,8 @@ public:
|
|||
static LEX_CSTRING name= {STRING_WITH_LEN("release_all_locks") };
|
||||
return name;
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override final
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override final
|
||||
{ return get_item_copy<Item_func_release_all_locks>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -3322,7 +3436,8 @@ public:
|
|||
set_maybe_null();
|
||||
return FALSE;
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override final
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override final
|
||||
{ return get_item_copy<Item_func_release_lock>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -3363,7 +3478,8 @@ public:
|
|||
{
|
||||
return mark_unsupported_function(func_name(), "()", arg, VCOL_IMPOSSIBLE);
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_master_pos_wait>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -3392,7 +3508,8 @@ public:
|
|||
{
|
||||
return mark_unsupported_function(func_name(), "()", arg, VCOL_IMPOSSIBLE);
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_master_gtid_wait>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -3513,8 +3630,10 @@ public:
|
|||
bool register_field_in_bitmap(void *arg) override;
|
||||
bool set_entry(THD *thd, bool create_if_not_exists);
|
||||
void cleanup() override;
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_set_user_var>(thd, this); }
|
||||
public:
|
||||
bool excl_dep_on_table(table_map tab_map) override { return false; }
|
||||
};
|
||||
|
||||
|
|
@ -3546,7 +3665,8 @@ public:
|
|||
table_map used_tables() const override
|
||||
{ return const_item() ? 0 : RAND_TABLE_BIT; }
|
||||
bool eq(const Item *item, bool binary_cmp) const override;
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_get_user_var>(thd, this); }
|
||||
private:
|
||||
bool set_value(THD *thd, sp_rcontext *ctx, Item **it) override;
|
||||
|
|
@ -3629,9 +3749,11 @@ public:
|
|||
void set_value(const char *str, uint length, CHARSET_INFO* cs);
|
||||
const Type_handler *type_handler() const override
|
||||
{ return &type_handler_double; }
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_user_var_as_out_param>(thd, this); }
|
||||
Item *do_build_clone(THD *thd) const override { return get_copy(thd); }
|
||||
Item *deep_copy(THD *thd) const override
|
||||
{ return shallow_copy_with_checks(thd); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -3693,7 +3815,8 @@ public:
|
|||
|
||||
void cleanup() override;
|
||||
bool check_vcol_func_processor(void *arg) override;
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_get_system_var>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -3756,9 +3879,10 @@ public:
|
|||
{
|
||||
return mark_unsupported_function("match ... against()", arg, VCOL_IMPOSSIBLE);
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_match>(thd, this); }
|
||||
Item *do_build_clone(THD *thd) const override { return nullptr; }
|
||||
Item *deep_copy(THD *thd) const override { return nullptr; }
|
||||
private:
|
||||
/**
|
||||
Check whether storage engine for given table,
|
||||
|
|
@ -3808,7 +3932,8 @@ public:
|
|||
return name;
|
||||
}
|
||||
enum precedence precedence() const override { return BITXOR_PRECEDENCE; }
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_bit_xor>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -3836,7 +3961,8 @@ public:
|
|||
{
|
||||
return mark_unsupported_function(func_name(), "()", arg, VCOL_IMPOSSIBLE);
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_is_free_lock>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -3863,7 +3989,8 @@ public:
|
|||
{
|
||||
return mark_unsupported_function(func_name(), "()", arg, VCOL_IMPOSSIBLE);
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_is_used_lock>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -3924,7 +4051,8 @@ public:
|
|||
{
|
||||
return mark_unsupported_function(func_name(), "()", arg, VCOL_IMPOSSIBLE);
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_row_count>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -4062,7 +4190,9 @@ public:
|
|||
{
|
||||
return TRUE;
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override { return 0; }
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override { return 0; }
|
||||
public:
|
||||
bool eval_not_null_tables(void *opt_arg) override
|
||||
{
|
||||
not_null_tables_cache= 0;
|
||||
|
|
@ -4097,7 +4227,8 @@ public:
|
|||
{
|
||||
return mark_unsupported_function(func_name(), "()", arg, VCOL_IMPOSSIBLE);
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_found_rows>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -4120,7 +4251,8 @@ public:
|
|||
{
|
||||
return mark_unsupported_function(func_name(), "()", arg, VCOL_IMPOSSIBLE);
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_oracle_sql_rowcount>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -4150,7 +4282,8 @@ public:
|
|||
max_length= 11;
|
||||
return FALSE;
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_sqlcode>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -4177,7 +4310,8 @@ public:
|
|||
return mark_unsupported_function(func_name(), "()", arg,
|
||||
VCOL_NON_DETERMINISTIC);
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_uuid_short>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -4218,7 +4352,8 @@ public:
|
|||
Item_func::update_used_tables();
|
||||
copy_flags(last_value, item_base_t::MAYBE_NULL);
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_last_value>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -4272,8 +4407,10 @@ public:
|
|||
}
|
||||
}
|
||||
bool const_item() const override { return 0; }
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_nextval>(thd, this); }
|
||||
public:
|
||||
void print(String *str, enum_query_type query_type) override;
|
||||
bool check_vcol_func_processor(void *arg) override
|
||||
{
|
||||
|
|
@ -4297,7 +4434,8 @@ public:
|
|||
static LEX_CSTRING name= {STRING_WITH_LEN("lastval") };
|
||||
return name;
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_lastval>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -4324,7 +4462,8 @@ public:
|
|||
return name;
|
||||
}
|
||||
void print(String *str, enum_query_type query_type) override;
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_setval>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -219,7 +219,9 @@ public:
|
|||
return name;
|
||||
}
|
||||
String *val_str(String *) override;
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_geometry_from_text>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -241,7 +243,9 @@ public:
|
|||
return name;
|
||||
}
|
||||
String *val_str(String *) override;
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_geometry_from_wkb>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -267,7 +271,9 @@ public:
|
|||
return name;
|
||||
}
|
||||
String *val_str(String *) override;
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_geometry_from_json>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -284,7 +290,9 @@ public:
|
|||
}
|
||||
String *val_str_ascii(String *) override;
|
||||
bool fix_length_and_dec() override;
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_as_wkt>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -309,7 +317,9 @@ public:
|
|||
set_maybe_null();
|
||||
return FALSE;
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_as_wkb>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -336,7 +346,9 @@ public:
|
|||
}
|
||||
bool fix_length_and_dec() override;
|
||||
String *val_str_ascii(String *) override;
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_as_geojson>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -359,7 +371,9 @@ public:
|
|||
set_maybe_null();
|
||||
return FALSE;
|
||||
};
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_geometry_type>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -398,7 +412,9 @@ public:
|
|||
return name;
|
||||
}
|
||||
String *val_str(String *) override;
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_convexhull>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -418,7 +434,9 @@ public:
|
|||
{
|
||||
return &type_handler_point;
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_centroid>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -437,7 +455,9 @@ public:
|
|||
{
|
||||
return &type_handler_polygon;
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_envelope>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -475,7 +495,9 @@ public:
|
|||
return name;
|
||||
}
|
||||
String *val_str(String *) override;
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_boundary>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -498,7 +520,9 @@ public:
|
|||
{
|
||||
return &type_handler_point;
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_point>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -527,7 +551,9 @@ public:
|
|||
}
|
||||
}
|
||||
String *val_str(String *) override;
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_spatial_decomp>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -564,7 +590,9 @@ public:
|
|||
}
|
||||
}
|
||||
String *val_str(String *) override;
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_spatial_decomp_n>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -624,7 +652,9 @@ public:
|
|||
static LEX_CSTRING name= {STRING_WITH_LEN("geometrycollection") };
|
||||
return name;
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_geometrycollection>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -644,7 +674,9 @@ public:
|
|||
static LEX_CSTRING name= {STRING_WITH_LEN("linestring") };
|
||||
return name;
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_linestring>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -664,7 +696,9 @@ public:
|
|||
static LEX_CSTRING name= {STRING_WITH_LEN("polygon") };
|
||||
return name;
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_polygon>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -686,7 +720,9 @@ public:
|
|||
static LEX_CSTRING name= {STRING_WITH_LEN("multilinestring") };
|
||||
return name;
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_multilinestring>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -708,7 +744,9 @@ public:
|
|||
static LEX_CSTRING name= {STRING_WITH_LEN("multipoint") };
|
||||
return name;
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_multipoint>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -730,7 +768,9 @@ public:
|
|||
static LEX_CSTRING name= {STRING_WITH_LEN("multipolygon") };
|
||||
return name;
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_multipolygon>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -782,7 +822,7 @@ public:
|
|||
usable_tables, sargables, false);
|
||||
}
|
||||
bool need_parentheses_in_default() override { return false; }
|
||||
Item *do_build_clone(THD *thd) const override { return nullptr; }
|
||||
Item *deep_copy(THD *thd) const override { return nullptr; }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -794,7 +834,9 @@ public:
|
|||
{ }
|
||||
bool val_bool() override;
|
||||
LEX_CSTRING func_name_cstring() const override;
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_spatial_mbr_rel>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -810,7 +852,9 @@ public:
|
|||
{ }
|
||||
bool val_bool() override;
|
||||
LEX_CSTRING func_name_cstring() const override;
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_spatial_precise_rel>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -837,7 +881,9 @@ public:
|
|||
return name;
|
||||
}
|
||||
bool need_parentheses_in_default() override { return false; }
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_spatial_relate>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -874,7 +920,9 @@ public:
|
|||
{
|
||||
Item_func::print(str, query_type);
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_spatial_operation>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -935,7 +983,9 @@ public:
|
|||
return name;
|
||||
}
|
||||
String *val_str(String *) override;
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_buffer>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -954,7 +1004,9 @@ public:
|
|||
bool fix_length_and_dec() override
|
||||
{ set_maybe_null(); return FALSE; }
|
||||
bool need_parentheses_in_default() override { return false; }
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_isempty>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -975,7 +1027,9 @@ public:
|
|||
}
|
||||
bool fix_length_and_dec() override { decimals=0; max_length=2; return FALSE; }
|
||||
decimal_digits_t decimal_precision() const override { return 1; }
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_issimple>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -992,7 +1046,9 @@ public:
|
|||
}
|
||||
bool fix_length_and_dec() override { decimals=0; max_length=2; return FALSE; }
|
||||
decimal_digits_t decimal_precision() const override { return 1; }
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_isclosed>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -1006,7 +1062,9 @@ public:
|
|||
static LEX_CSTRING name= {STRING_WITH_LEN("st_isring") };
|
||||
return name;
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_isring>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -1023,7 +1081,9 @@ public:
|
|||
}
|
||||
bool fix_length_and_dec() override
|
||||
{ max_length= 10; set_maybe_null(); return FALSE; }
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_dimension>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -1045,7 +1105,9 @@ public:
|
|||
set_maybe_null();
|
||||
return FALSE;
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_x>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -1067,7 +1129,9 @@ public:
|
|||
set_maybe_null();
|
||||
return FALSE;
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_y>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -1085,7 +1149,9 @@ public:
|
|||
}
|
||||
bool fix_length_and_dec() override
|
||||
{ max_length= 10; set_maybe_null(); return FALSE; }
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_numgeometries>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -1103,7 +1169,9 @@ public:
|
|||
}
|
||||
bool fix_length_and_dec() override
|
||||
{ max_length= 10; set_maybe_null(); return FALSE; }
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_numinteriorring>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -1121,7 +1189,9 @@ public:
|
|||
}
|
||||
bool fix_length_and_dec() override
|
||||
{ max_length= 10; set_maybe_null(); return FALSE; }
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_numpoints>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -1143,7 +1213,9 @@ public:
|
|||
set_maybe_null();
|
||||
return FALSE;
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_area>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -1167,7 +1239,9 @@ public:
|
|||
set_maybe_null();
|
||||
return FALSE;
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_glength>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -1185,7 +1259,9 @@ public:
|
|||
}
|
||||
bool fix_length_and_dec() override
|
||||
{ max_length= 10; set_maybe_null(); return FALSE; }
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_srid>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -1206,7 +1282,9 @@ public:
|
|||
static LEX_CSTRING name= {STRING_WITH_LEN("st_distance") };
|
||||
return name;
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_distance>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -1224,7 +1302,9 @@ public:
|
|||
static LEX_CSTRING name= {STRING_WITH_LEN("st_distance_sphere") };
|
||||
return name;
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_sphere_distance>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -1248,7 +1328,9 @@ public:
|
|||
{
|
||||
return &type_handler_point;
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_pointonsurface>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -1270,7 +1352,9 @@ class Item_func_gis_debug: public Item_long_func
|
|||
{
|
||||
return mark_unsupported_function(func_name(), "()", arg, VCOL_IMPOSSIBLE);
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_gis_debug>(thd, this); }
|
||||
};
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -101,9 +101,11 @@ public:
|
|||
static const Lex_cstring fmt(STRING_WITH_LEN("json"));
|
||||
return to->set_format_name(fmt);
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_json_valid>(thd, this); }
|
||||
enum Functype functype() const override { return JSON_VALID_FUNC; }
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_json_valid>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -122,9 +124,11 @@ public:
|
|||
return name;
|
||||
}
|
||||
bool fix_length_and_dec() override;
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_json_exists>(thd, this); }
|
||||
bool val_bool() override;
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_json_exists>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -170,7 +174,9 @@ public:
|
|||
{
|
||||
return je->check_and_get_value_scalar(res, error);
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_json_value>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -198,7 +204,9 @@ public:
|
|||
{
|
||||
return je->check_and_get_value_complex(res, error);
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_json_query>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -217,7 +225,9 @@ public:
|
|||
}
|
||||
bool fix_length_and_dec() override;
|
||||
String *val_str(String *) override;
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_json_quote>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -236,7 +246,9 @@ public:
|
|||
}
|
||||
bool fix_length_and_dec() override;
|
||||
String *val_str(String *) override;
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_json_unquote>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -291,7 +303,9 @@ public:
|
|||
double val_real() override;
|
||||
my_decimal *val_decimal(my_decimal *) override;
|
||||
uint get_n_paths() const override { return arg_count - 1; }
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_json_extract>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -314,7 +328,9 @@ public:
|
|||
}
|
||||
bool fix_length_and_dec() override;
|
||||
bool val_bool() override;
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_json_contains>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -341,7 +357,9 @@ public:
|
|||
bool fix_fields(THD *thd, Item **ref) override;
|
||||
bool fix_length_and_dec() override;
|
||||
bool val_bool() override;
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_json_contains_path>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -363,7 +381,9 @@ public:
|
|||
static LEX_CSTRING name= {STRING_WITH_LEN("json_array") };
|
||||
return name;
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_json_array>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -384,7 +404,9 @@ public:
|
|||
static LEX_CSTRING name= {STRING_WITH_LEN("json_array_append") };
|
||||
return name;
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_json_array_append>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -400,7 +422,9 @@ public:
|
|||
static LEX_CSTRING name= {STRING_WITH_LEN("json_array_insert") };
|
||||
return name;
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_json_array_insert>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -418,7 +442,9 @@ public:
|
|||
static LEX_CSTRING name= {STRING_WITH_LEN("json_object") };
|
||||
return name;
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_json_object>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -436,7 +462,9 @@ public:
|
|||
static LEX_CSTRING name= {STRING_WITH_LEN("json_merge_preserve") };
|
||||
return name;
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_json_merge>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -451,7 +479,9 @@ public:
|
|||
return name;
|
||||
}
|
||||
String *val_str(String *) override;
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_json_merge_patch>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -482,7 +512,9 @@ public:
|
|||
}
|
||||
bool fix_length_and_dec() override;
|
||||
longlong val_int() override;
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_json_length>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -502,7 +534,9 @@ public:
|
|||
}
|
||||
bool fix_length_and_dec() override { max_length= 10; return FALSE; }
|
||||
longlong val_int() override;
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_json_depth>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -520,7 +554,9 @@ public:
|
|||
}
|
||||
bool fix_length_and_dec() override;
|
||||
String *val_str(String *) override;
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_json_type>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -546,7 +582,9 @@ public:
|
|||
return (mode_insert ?
|
||||
(mode_replace ? json_set : json_insert) : json_replace);
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_json_insert>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -566,7 +604,9 @@ public:
|
|||
static LEX_CSTRING name= {STRING_WITH_LEN("json_remove") };
|
||||
return name;
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_json_remove>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -587,7 +627,9 @@ public:
|
|||
}
|
||||
bool fix_length_and_dec() override;
|
||||
String *val_str(String *) override;
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_json_keys>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -616,7 +658,9 @@ public:
|
|||
bool fix_length_and_dec() override;
|
||||
String *val_str(String *) override;
|
||||
uint get_n_paths() const override { return arg_count > 4 ? arg_count - 4 : 0; }
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_json_search>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -644,7 +688,9 @@ public:
|
|||
bool fix_length_and_dec() override;
|
||||
String *val_str(String *str) override;
|
||||
String *val_json(String *str) override;
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_json_format>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -690,7 +736,9 @@ public:
|
|||
String* val_str(String *str) override;
|
||||
|
||||
Item *copy_or_same(THD* thd) override;
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_json_arrayagg>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -739,7 +787,9 @@ public:
|
|||
String* val_str(String* str) override;
|
||||
Item *copy_or_same(THD* thd) override;
|
||||
void no_rows_in_result() override {}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_json_objectagg>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -180,7 +180,7 @@ void Item_row::bring_value()
|
|||
}
|
||||
|
||||
|
||||
Item* Item_row::do_build_clone(THD *thd) const
|
||||
Item* Item_row::deep_copy(THD *thd) const
|
||||
{
|
||||
Item **copy_args= static_cast<Item**>
|
||||
(alloc_root(thd->mem_root, sizeof(Item*) * arg_count));
|
||||
|
|
@ -188,12 +188,12 @@ Item* Item_row::do_build_clone(THD *thd) const
|
|||
return 0;
|
||||
for (uint i= 0; i < arg_count; i++)
|
||||
{
|
||||
Item *arg_clone= args[i]->build_clone(thd);
|
||||
Item *arg_clone= args[i]->deep_copy_with_checks(thd);
|
||||
if (!arg_clone)
|
||||
return 0;
|
||||
copy_args[i]= arg_clone;
|
||||
}
|
||||
Item_row *copy= (Item_row *) get_copy(thd);
|
||||
Item_row *copy= (Item_row *) shallow_copy_with_checks(thd);
|
||||
if (unlikely(!copy))
|
||||
return 0;
|
||||
copy->args= copy_args;
|
||||
|
|
|
|||
|
|
@ -148,9 +148,11 @@ public:
|
|||
}
|
||||
|
||||
bool check_vcol_func_processor(void *arg) override {return FALSE; }
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_row>(thd, this); }
|
||||
Item *do_build_clone(THD *thd) const override;
|
||||
Item *deep_copy(THD *thd) const override;
|
||||
};
|
||||
|
||||
#endif /* ITEM_ROW_INCLUDED */
|
||||
|
|
|
|||
|
|
@ -155,7 +155,9 @@ public:
|
|||
static LEX_CSTRING name= {STRING_WITH_LEN("md5") };
|
||||
return name;
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_md5>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -171,7 +173,9 @@ public:
|
|||
static LEX_CSTRING name= {STRING_WITH_LEN("sha") };
|
||||
return name;
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_sha>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -187,7 +191,9 @@ public:
|
|||
static LEX_CSTRING name= {STRING_WITH_LEN("sha2") };
|
||||
return name;
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_sha2>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -204,7 +210,9 @@ public:
|
|||
static LEX_CSTRING name= {STRING_WITH_LEN("to_base64") };
|
||||
return name;
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_to_base64>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -221,7 +229,9 @@ public:
|
|||
static LEX_CSTRING name= {STRING_WITH_LEN("from_base64") };
|
||||
return name;
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_from_base64>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -252,7 +262,9 @@ public:
|
|||
static LEX_CSTRING name= {STRING_WITH_LEN("aes_encrypt") };
|
||||
return name;
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_aes_encrypt>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -267,7 +279,9 @@ public:
|
|||
static LEX_CSTRING name= {STRING_WITH_LEN("aes_decrypt") };
|
||||
return name;
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_aes_decrypt>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -301,7 +315,9 @@ public:
|
|||
static LEX_CSTRING name= {STRING_WITH_LEN("concat") };
|
||||
return name;
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_concat>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -332,10 +348,10 @@ public:
|
|||
print_sql_mode_qualified_name(str, query_type);
|
||||
print_args_parenthesized(str, query_type);
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
{
|
||||
return get_item_copy<Item_func_concat_operator_oracle>(thd, this);
|
||||
}
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_concat_operator_oracle>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -357,7 +373,9 @@ public:
|
|||
static LEX_CSTRING name= {STRING_WITH_LEN("decode_histogram") };
|
||||
return name;
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_decode_histogram>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -374,7 +392,9 @@ public:
|
|||
return name;
|
||||
}
|
||||
table_map not_null_tables() const override { return 0; }
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_concat_ws>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -390,7 +410,9 @@ public:
|
|||
static LEX_CSTRING name= {STRING_WITH_LEN("reverse") };
|
||||
return name;
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_reverse>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -416,7 +438,9 @@ public:
|
|||
static LEX_CSTRING name= {STRING_WITH_LEN("replace") };
|
||||
return name;
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_replace>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -441,7 +465,9 @@ public:
|
|||
print_sql_mode_qualified_name(str, query_type);
|
||||
print_args_parenthesized(str, query_type);
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_replace_oracle>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -481,7 +507,8 @@ public:
|
|||
static LEX_CSTRING name= {STRING_WITH_LEN("regexp_replace") };
|
||||
return name;
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override { return 0;}
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override { return nullptr; }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -502,6 +529,8 @@ public:
|
|||
{
|
||||
return val_str_internal(str, true);
|
||||
}
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override { return nullptr; }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -526,7 +555,8 @@ public:
|
|||
static LEX_CSTRING name= {STRING_WITH_LEN("regexp_substr") };
|
||||
return name;
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override { return 0; }
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override { return nullptr; }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -544,7 +574,9 @@ public:
|
|||
static LEX_CSTRING name= {STRING_WITH_LEN("insert") };
|
||||
return name;
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_insert>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -571,7 +603,9 @@ public:
|
|||
return name;
|
||||
}
|
||||
bool fix_length_and_dec() override;
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_lcase>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -585,7 +619,9 @@ public:
|
|||
return name;
|
||||
}
|
||||
bool fix_length_and_dec() override;
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_ucase>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -603,7 +639,9 @@ public:
|
|||
static LEX_CSTRING name= {STRING_WITH_LEN("left") };
|
||||
return name;
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_left>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -620,7 +658,9 @@ public:
|
|||
static LEX_CSTRING name= {STRING_WITH_LEN("right") };
|
||||
return name;
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_right>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -649,7 +689,9 @@ public:
|
|||
static LEX_CSTRING name= {STRING_WITH_LEN("substr") };
|
||||
return name;
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_substr>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -685,7 +727,9 @@ public:
|
|||
print_sql_mode_qualified_name(str, query_type);
|
||||
print_args_parenthesized(str, query_type);
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_substr_oracle>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -702,9 +746,10 @@ public:
|
|||
static LEX_CSTRING name= {STRING_WITH_LEN("substring_index") };
|
||||
return name;
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_substr_index>(thd, this); }
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_substr_index>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -745,7 +790,9 @@ public:
|
|||
}
|
||||
void print(String *str, enum_query_type query_type) override;
|
||||
virtual LEX_CSTRING mode_name() const { return { "both", 4}; }
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_trim>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -766,7 +813,9 @@ public:
|
|||
set_maybe_null();
|
||||
return res;
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_trim_oracle>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -789,7 +838,9 @@ public:
|
|||
}
|
||||
LEX_CSTRING mode_name() const override
|
||||
{ return { STRING_WITH_LEN("leading") }; }
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_ltrim>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -810,7 +861,9 @@ public:
|
|||
set_maybe_null();
|
||||
return res;
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_ltrim_oracle>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -829,7 +882,9 @@ public:
|
|||
}
|
||||
LEX_CSTRING mode_name() const override
|
||||
{ return { STRING_WITH_LEN("trailing") }; }
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_rtrim>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -850,7 +905,8 @@ public:
|
|||
set_maybe_null();
|
||||
return res;
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_rtrim_oracle>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -893,7 +949,9 @@ public:
|
|||
}
|
||||
static char *alloc(THD *thd, const char *password, size_t pass_len,
|
||||
enum PW_Alg al);
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_password>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -920,7 +978,9 @@ public:
|
|||
static LEX_CSTRING name= {STRING_WITH_LEN("des_encrypt") };
|
||||
return name;
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_des_encrypt>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -947,7 +1007,9 @@ public:
|
|||
static LEX_CSTRING name= {STRING_WITH_LEN("des_decrypt") };
|
||||
return name;
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_des_decrypt>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -992,7 +1054,9 @@ public:
|
|||
{
|
||||
return FALSE;
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_encrypt>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -1016,9 +1080,10 @@ public:
|
|||
static LEX_CSTRING name= {STRING_WITH_LEN("encode") };
|
||||
return name;
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_encode>(thd, this); }
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_encode>(thd, this); }
|
||||
virtual void crypto_transform(String *);
|
||||
private:
|
||||
/** Provide a seed for the PRNG sequence. */
|
||||
|
|
@ -1041,9 +1106,10 @@ public:
|
|||
static LEX_CSTRING name= {STRING_WITH_LEN("decode") };
|
||||
return name;
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_decode>(thd, this); }
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_decode>(thd, this); }
|
||||
void crypto_transform(String *) override;
|
||||
};
|
||||
|
||||
|
|
@ -1087,7 +1153,9 @@ public:
|
|||
}
|
||||
const char *fully_qualified_func_name() const override
|
||||
{ return "database()"; }
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_database>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -1115,7 +1183,9 @@ public:
|
|||
base_flags&= ~item_base_t::MAYBE_NULL;
|
||||
return FALSE;
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_sqlerrm>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -1153,7 +1223,9 @@ public:
|
|||
{
|
||||
return save_str_value_in_field(field, &str_value);
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_user>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -1179,7 +1251,9 @@ public:
|
|||
return mark_unsupported_function(fully_qualified_func_name(), arg,
|
||||
VCOL_SESSION_FUNC);
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_current_user>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -1217,7 +1291,9 @@ public:
|
|||
return mark_unsupported_function(fully_qualified_func_name(), arg,
|
||||
VCOL_SESSION_FUNC);
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_current_role>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -1234,7 +1310,9 @@ public:
|
|||
static LEX_CSTRING name= {STRING_WITH_LEN("soundex") };
|
||||
return name;
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_soundex>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -1252,7 +1330,9 @@ public:
|
|||
static LEX_CSTRING name= {STRING_WITH_LEN("elt") };
|
||||
return name;
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_elt>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -1270,7 +1350,9 @@ public:
|
|||
static LEX_CSTRING name= {STRING_WITH_LEN("make_set") };
|
||||
return name;
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_make_set>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -1291,7 +1373,9 @@ public:
|
|||
static LEX_CSTRING name= {STRING_WITH_LEN("format") };
|
||||
return name;
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_format>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -1320,9 +1404,12 @@ public:
|
|||
return name;
|
||||
}
|
||||
void print(String *str, enum_query_type query_type) override;
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_char>(thd, this); }
|
||||
};
|
||||
} ;
|
||||
|
||||
|
||||
class Item_func_chr :public Item_func_char
|
||||
{
|
||||
|
|
@ -1340,7 +1427,9 @@ public:
|
|||
static LEX_CSTRING name= {STRING_WITH_LEN("chr") };
|
||||
return name;
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_chr>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -1357,7 +1446,9 @@ public:
|
|||
static LEX_CSTRING name= {STRING_WITH_LEN("repeat") };
|
||||
return name;
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_repeat>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -1373,7 +1464,9 @@ public:
|
|||
static LEX_CSTRING name= {STRING_WITH_LEN("space") };
|
||||
return name;
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_space>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -1394,7 +1487,9 @@ public:
|
|||
{
|
||||
return mark_unsupported_function(func_name(), "()", arg, VCOL_IMPOSSIBLE);
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_binlog_gtid_pos>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -1436,7 +1531,9 @@ public:
|
|||
return name;
|
||||
}
|
||||
Sql_mode_dependency value_depends_on_sql_mode() const override;
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_rpad>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -1470,7 +1567,9 @@ public:
|
|||
print_sql_mode_qualified_name(str, query_type);
|
||||
print_args_parenthesized(str, query_type);
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_rpad_oracle>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -1496,7 +1595,9 @@ public:
|
|||
static LEX_CSTRING name= {STRING_WITH_LEN("lpad") };
|
||||
return name;
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_lpad>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -1530,7 +1631,9 @@ public:
|
|||
print_sql_mode_qualified_name(str, query_type);
|
||||
print_args_parenthesized(str, query_type);
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_lpad_oracle>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -1553,7 +1656,9 @@ public:
|
|||
set_maybe_null();
|
||||
return FALSE;
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_conv>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -1603,7 +1708,9 @@ public:
|
|||
fix_char_length(char_length);
|
||||
return FALSE;
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_hex>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -1629,7 +1736,9 @@ public:
|
|||
max_length=(1+args[0]->max_length)/2;
|
||||
return FALSE;
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_unhex>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -1668,7 +1777,9 @@ public:
|
|||
static LEX_CSTRING name= {STRING_WITH_LEN("like_range_min") };
|
||||
return name;
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_like_range_min>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -1683,7 +1794,9 @@ public:
|
|||
static LEX_CSTRING name= {STRING_WITH_LEN("like_range_max") };
|
||||
return name;
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_like_range_max>(thd, this); }
|
||||
};
|
||||
#endif
|
||||
|
|
@ -1715,7 +1828,9 @@ public:
|
|||
return name;
|
||||
}
|
||||
bool need_parentheses_in_default() override { return true; }
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_binary>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -1742,7 +1857,9 @@ public:
|
|||
{
|
||||
return mark_unsupported_function(func_name(), "()", arg, VCOL_IMPOSSIBLE);
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_load_file>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -1763,7 +1880,9 @@ class Item_func_export_set: public Item_str_func
|
|||
static LEX_CSTRING name= {STRING_WITH_LEN("export_set") };
|
||||
return name;
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_export_set>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -1790,7 +1909,9 @@ public:
|
|||
max_length= (uint32) MY_MIN(max_result_length, MAX_BLOB_WIDTH);
|
||||
return FALSE;
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_quote>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -1886,9 +2007,11 @@ public:
|
|||
return name;
|
||||
}
|
||||
void print(String *str, enum_query_type query_type) override;
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_conv_charset>(thd, this); }
|
||||
int save_in_field(Field*, bool) override;
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_conv_charset>(thd, this); }
|
||||
};
|
||||
|
||||
class Item_func_set_collation :public Item_str_func
|
||||
|
|
@ -1914,7 +2037,9 @@ public:
|
|||
return args[0]->field_for_view_update();
|
||||
}
|
||||
bool need_parentheses_in_default() override { return true; }
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_set_collation>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -1951,8 +2076,6 @@ public:
|
|||
static LEX_CSTRING name= {STRING_WITH_LEN("charset") };
|
||||
return name;
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_charset>(thd, this); }
|
||||
table_map used_tables() const override { return 0; }
|
||||
bool fix_length_and_dec() override
|
||||
{
|
||||
|
|
@ -1970,6 +2093,10 @@ public:
|
|||
args[0]->charset_for_protocol()->cs_name.length;
|
||||
return false;
|
||||
}
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_charset>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -1984,7 +2111,9 @@ public:
|
|||
static LEX_CSTRING name= {STRING_WITH_LEN("collation") };
|
||||
return name;
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_collation>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -2024,7 +2153,9 @@ public:
|
|||
override
|
||||
{ return this; }
|
||||
void print(String *str, enum_query_type query_type) override;
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_weight_string>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -2043,7 +2174,9 @@ public:
|
|||
}
|
||||
bool fix_length_and_dec() override { max_length=10; return FALSE; }
|
||||
longlong val_int() override;
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_crc32>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -2064,7 +2197,9 @@ public:
|
|||
set_maybe_null();
|
||||
return FALSE; }
|
||||
longlong val_int() override;
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_uncompressed_length>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -2091,7 +2226,9 @@ public:
|
|||
return name;
|
||||
}
|
||||
String *val_str(String *) override ZLIB_DEPENDED_FUNCTION
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_compress>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -2113,7 +2250,9 @@ public:
|
|||
return name;
|
||||
}
|
||||
String *val_str(String *) override ZLIB_DEPENDED_FUNCTION
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_uncompress>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -2147,7 +2286,9 @@ Item_func_uuid(THD *thd, bool without_separators_arg): Item_str_func(thd),
|
|||
return mark_unsupported_function(func_name(), "()", arg,
|
||||
VCOL_NON_DETERMINISTIC);
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_uuid>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -2174,7 +2315,9 @@ public:
|
|||
String *val_str(String *) override;
|
||||
void print(String *str, enum_query_type query_type) override;
|
||||
enum Functype functype() const override { return DYNCOL_FUNC; }
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_dyncol_create>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -2192,7 +2335,9 @@ public:
|
|||
}
|
||||
String *val_str(String *) override;
|
||||
void print(String *str, enum_query_type query_type) override;
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_dyncol_add>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -2214,7 +2359,9 @@ public:
|
|||
decimals= 0;
|
||||
return FALSE;
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_dyncol_json>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -2264,7 +2411,9 @@ public:
|
|||
bool get_dyn_value(THD *thd, DYNAMIC_COLUMN_VALUE *val, String *tmp);
|
||||
bool get_date(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate) override;
|
||||
void print(String *str, enum_query_type query_type) override;
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_dyncol_get>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -2286,7 +2435,9 @@ public:
|
|||
return name;
|
||||
}
|
||||
String *val_str(String *) override;
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_dyncol_list>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -2312,7 +2463,9 @@ public:
|
|||
return name;
|
||||
}
|
||||
bool fix_length_and_dec() override;
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_temptable_rowid>(thd, this); }
|
||||
};
|
||||
#ifdef WITH_WSREP
|
||||
|
|
@ -2336,7 +2489,9 @@ public:
|
|||
set_maybe_null();
|
||||
return FALSE;
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_wsrep_last_written_gtid>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -2357,7 +2512,9 @@ public:
|
|||
set_maybe_null();
|
||||
return FALSE;
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_wsrep_last_seen_gtid>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -2375,7 +2532,9 @@ public:
|
|||
return name;
|
||||
}
|
||||
longlong val_int() override;
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_wsrep_sync_wait_upto>(thd, this); }
|
||||
};
|
||||
#endif /* WITH_WSREP */
|
||||
|
|
|
|||
|
|
@ -278,11 +278,12 @@ public:
|
|||
void register_as_with_rec_ref(With_element *with_elem);
|
||||
void init_expr_cache_tracker(THD *thd);
|
||||
|
||||
Item* do_build_clone(THD *thd) const override { return nullptr; }
|
||||
Item *do_get_copy(THD *thd) const override { return 0; }
|
||||
|
||||
st_select_lex *wrap_tvc_into_select(THD *thd, st_select_lex *tvc_sl);
|
||||
|
||||
protected:
|
||||
Item* deep_copy(THD *thd) const override { return nullptr; }
|
||||
Item *shallow_copy(THD *thd) const override { return nullptr; }
|
||||
|
||||
friend class select_result_interceptor;
|
||||
friend class Item_in_optimizer;
|
||||
friend bool Item_field::fix_fields(THD *, Item **);
|
||||
|
|
|
|||
110
sql/item_sum.h
110
sql/item_sum.h
|
|
@ -865,9 +865,6 @@ public:
|
|||
}
|
||||
Item *copy_or_same(THD* thd) override;
|
||||
void remove() override;
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_sum_sum>(thd, this); }
|
||||
|
||||
bool supports_removal() const override
|
||||
{
|
||||
return true;
|
||||
|
|
@ -876,6 +873,10 @@ public:
|
|||
private:
|
||||
void add_helper(bool perform_removal);
|
||||
ulonglong count;
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_sum_sum>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -940,13 +941,14 @@ public:
|
|||
return has_with_distinct() ? name_distinct : name_normal;
|
||||
}
|
||||
Item *copy_or_same(THD* thd) override;
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_sum_count>(thd, this); }
|
||||
|
||||
bool supports_removal() const override
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_sum_count>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -998,13 +1000,14 @@ public:
|
|||
count= 0;
|
||||
Item_sum_sum::cleanup();
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_sum_avg>(thd, this); }
|
||||
|
||||
bool supports_removal() const override
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_sum_avg>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -1087,7 +1090,9 @@ public:
|
|||
m_stddev= Stddev();
|
||||
Item_sum_double::cleanup();
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_sum_variance>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -1113,7 +1118,9 @@ class Item_sum_std final :public Item_sum_variance
|
|||
return sample ? stddev_samp_name : std_name;
|
||||
}
|
||||
Item *copy_or_same(THD* thd) override final;
|
||||
Item *do_get_copy(THD *thd) const override final
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override final
|
||||
{ return get_item_copy<Item_sum_std>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -1216,7 +1223,9 @@ public:
|
|||
return sum_name;
|
||||
}
|
||||
Item *copy_or_same(THD* thd) override;
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_sum_min>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -1235,7 +1244,9 @@ public:
|
|||
return sum_name;
|
||||
}
|
||||
Item *copy_or_same(THD* thd) override;
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_sum_max>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -1328,11 +1339,13 @@ public:
|
|||
return sum_name;
|
||||
}
|
||||
Item *copy_or_same(THD* thd) override;
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_sum_or>(thd, this); }
|
||||
|
||||
private:
|
||||
void set_bits_from_counters() override;
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_sum_or>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -1349,11 +1362,13 @@ public:
|
|||
return sum_min_name;
|
||||
}
|
||||
Item *copy_or_same(THD* thd) override;
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_sum_and>(thd, this); }
|
||||
|
||||
private:
|
||||
void set_bits_from_counters() override;
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_sum_and>(thd, this); }
|
||||
};
|
||||
|
||||
class Item_sum_xor final :public Item_sum_bit
|
||||
|
|
@ -1368,11 +1383,13 @@ public:
|
|||
return sum_min_name;
|
||||
}
|
||||
Item *copy_or_same(THD* thd) override;
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_sum_xor>(thd, this); }
|
||||
|
||||
private:
|
||||
void set_bits_from_counters() override;
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_sum_xor>(thd, this); }
|
||||
};
|
||||
|
||||
class sp_head;
|
||||
|
|
@ -1512,9 +1529,11 @@ public:
|
|||
{
|
||||
return sp_result_field;
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_sum_sp>(thd, this); }
|
||||
Item *copy_or_same(THD *thd) override;
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_sum_sp>(thd, this); }
|
||||
};
|
||||
|
||||
/* Items to get the value of a stored sum function */
|
||||
|
|
@ -1578,9 +1597,12 @@ public:
|
|||
String *val_str(String *str) override
|
||||
{ return val_string_from_real(str); }
|
||||
double val_real() override;
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_avg_field_double>(thd, this); }
|
||||
Item *do_build_clone(THD *thd) const override { return get_copy(thd); }
|
||||
Item *deep_copy(THD *thd) const override
|
||||
{ return shallow_copy_with_checks(thd); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -1609,9 +1631,12 @@ public:
|
|||
return VDec(this).to_string_round(str, decimals);
|
||||
}
|
||||
my_decimal *val_decimal(my_decimal *) override;
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_avg_field_decimal>(thd, this); }
|
||||
Item *do_build_clone(THD *thd) const override { return get_copy(thd); }
|
||||
Item *deep_copy(THD *thd) const override
|
||||
{ return shallow_copy_with_checks(thd); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -1632,9 +1657,12 @@ public:
|
|||
bool is_null() override { update_null_value(); return null_value; }
|
||||
const Type_handler *type_handler() const override
|
||||
{ return &type_handler_double; }
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_variance_field>(thd, this); }
|
||||
Item *do_build_clone(THD *thd) const override { return get_copy(thd); }
|
||||
Item *deep_copy(THD *thd) const override
|
||||
{ return shallow_copy_with_checks(thd); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -1646,9 +1674,12 @@ public:
|
|||
{ }
|
||||
enum Type type() const override { return FIELD_STD_ITEM; }
|
||||
double val_real() override;
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_std_field>(thd, this); }
|
||||
Item *do_build_clone(THD *thd) const override { return get_copy(thd); }
|
||||
Item *deep_copy(THD *thd) const override
|
||||
{ return shallow_copy_with_checks(thd); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -1746,7 +1777,9 @@ class Item_sum_udf_float :public Item_udf_sum
|
|||
bool fix_length_and_dec() override
|
||||
{ fix_num_length_and_dec(); return FALSE; }
|
||||
Item *copy_or_same(THD* thd) override;
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_sum_udf_float>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -1773,7 +1806,9 @@ public:
|
|||
}
|
||||
bool fix_length_and_dec() override { decimals=0; max_length=21; return FALSE; }
|
||||
Item *copy_or_same(THD* thd) override;
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_sum_udf_int>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -1815,7 +1850,9 @@ public:
|
|||
{ return string_type_handler(); }
|
||||
bool fix_length_and_dec() override;
|
||||
Item *copy_or_same(THD* thd) override;
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_sum_udf_str>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -1847,7 +1884,9 @@ public:
|
|||
bool fix_length_and_dec() override
|
||||
{ fix_num_length_and_dec(); return FALSE; }
|
||||
Item *copy_or_same(THD* thd) override;
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_sum_udf_decimal>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -2108,13 +2147,14 @@ public:
|
|||
void print(String *str, enum_query_type query_type) override;
|
||||
bool change_context_processor(void *cntx) override
|
||||
{ context= (Name_resolution_context *)cntx; return FALSE; }
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_group_concat>(thd, this); }
|
||||
qsort_cmp2 get_comparator_function_for_distinct();
|
||||
qsort_cmp2 get_comparator_function_for_order_by();
|
||||
uchar* get_record_pointer();
|
||||
uint get_null_bytes();
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_group_concat>(thd, this); }
|
||||
};
|
||||
|
||||
#endif /* ITEM_SUM_INCLUDED */
|
||||
|
|
|
|||
|
|
@ -67,7 +67,9 @@ public:
|
|||
max_length=6*MY_CHARSET_BIN_MB_MAXLEN;
|
||||
return FALSE;
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_period_add>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -90,7 +92,9 @@ public:
|
|||
max_length=6*MY_CHARSET_BIN_MB_MAXLEN;
|
||||
return FALSE;
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_period_diff>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -120,7 +124,9 @@ public:
|
|||
{
|
||||
return !has_date_args();
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_to_days>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -153,7 +159,9 @@ public:
|
|||
{
|
||||
return !has_date_args();
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_to_seconds>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -181,7 +189,9 @@ public:
|
|||
{
|
||||
return !has_date_args();
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_dayofmonth>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -210,7 +220,9 @@ public:
|
|||
{
|
||||
return !has_date_args();
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_month>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -236,7 +248,9 @@ public:
|
|||
{
|
||||
return mark_unsupported_function(func_name(), "()", arg, VCOL_SESSION_FUNC);
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_monthname>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -264,7 +278,9 @@ public:
|
|||
{
|
||||
return !has_date_args();
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_dayofyear>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -292,7 +308,9 @@ public:
|
|||
{
|
||||
return !has_time_args();
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_hour>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -320,7 +338,9 @@ public:
|
|||
{
|
||||
return !has_time_args();
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_minute>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -348,7 +368,9 @@ public:
|
|||
{
|
||||
return !has_date_args();
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_quarter>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -376,7 +398,9 @@ public:
|
|||
{
|
||||
return !has_time_args();
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_second>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -414,7 +438,9 @@ public:
|
|||
{
|
||||
return arg_count == 2;
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_week>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -447,7 +473,9 @@ public:
|
|||
{
|
||||
return !has_date_args();
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_yearweek>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -477,7 +505,9 @@ public:
|
|||
{
|
||||
return !has_date_args();
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_year>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -512,7 +542,9 @@ public:
|
|||
{
|
||||
return !has_date_args();
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_weekday>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -539,7 +571,9 @@ class Item_func_dayname :public Item_str_func
|
|||
{
|
||||
return !has_date_args();
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_dayname>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -608,7 +642,9 @@ public:
|
|||
}
|
||||
longlong int_op() override;
|
||||
my_decimal *decimal_op(my_decimal* buf) override;
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_unix_timestamp>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -636,7 +672,9 @@ public:
|
|||
}
|
||||
longlong int_op() override;
|
||||
my_decimal *decimal_op(my_decimal* buf) override;
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_time_to_sec>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -756,7 +794,9 @@ public:
|
|||
return name;
|
||||
}
|
||||
void store_now_in_TIME(THD *thd, MYSQL_TIME *now_time) override;
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_curtime_local>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -772,7 +812,9 @@ public:
|
|||
return name;
|
||||
}
|
||||
void store_now_in_TIME(THD *thd, MYSQL_TIME *now_time) override;
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_curtime_utc>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -804,7 +846,9 @@ public:
|
|||
return name;
|
||||
}
|
||||
void store_now_in_TIME(THD *thd, MYSQL_TIME *now_time) override;
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_curdate_local>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -819,7 +863,9 @@ public:
|
|||
return name;
|
||||
}
|
||||
void store_now_in_TIME(THD* thd, MYSQL_TIME *now_time) override;
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_curdate_utc>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -864,7 +910,9 @@ public:
|
|||
int save_in_field(Field *field, bool no_conversions) override;
|
||||
void store_now_in_TIME(THD *thd, MYSQL_TIME *now_time) override;
|
||||
enum Functype functype() const override { return NOW_FUNC; }
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_now_local>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -885,7 +933,9 @@ public:
|
|||
return mark_unsupported_function(func_name(), "()", arg,
|
||||
VCOL_TIME_FUNC | VCOL_NON_DETERMINISTIC);
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_now_utc>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -914,7 +964,9 @@ public:
|
|||
VCOL_TIME_FUNC | VCOL_NON_DETERMINISTIC);
|
||||
}
|
||||
enum Functype functype() const override { return SYSDATE_FUNC; }
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_sysdate_local>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -937,7 +989,9 @@ public:
|
|||
{
|
||||
return has_date_args() || has_time_args();
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_from_days>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -974,7 +1028,9 @@ public:
|
|||
return false;
|
||||
return mark_unsupported_function(func_name(), "()", arg, VCOL_SESSION_FUNC);
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_date_format>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -989,7 +1045,9 @@ public:
|
|||
return name;
|
||||
}
|
||||
bool check_vcol_func_processor(void *arg) override { return false; }
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_time_format>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -1043,7 +1101,8 @@ public:
|
|||
return mark_unsupported_function(func_name(), "()", arg, VCOL_SESSION_FUNC);
|
||||
}
|
||||
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_tochar>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -1066,7 +1125,9 @@ class Item_func_from_unixtime :public Item_datetimefunc
|
|||
{
|
||||
return mark_unsupported_function(func_name(), "()", arg, VCOL_SESSION_FUNC);
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_from_unixtime>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -1116,7 +1177,9 @@ class Item_func_convert_tz :public Item_datetimefunc
|
|||
}
|
||||
bool get_date(THD *thd, MYSQL_TIME *res, date_mode_t fuzzydate) override;
|
||||
void cleanup() override;
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_convert_tz>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -1139,7 +1202,9 @@ public:
|
|||
static LEX_CSTRING name= {STRING_WITH_LEN("sec_to_time") };
|
||||
return name;
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_sec_to_time>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -1163,7 +1228,9 @@ public:
|
|||
void print(String *str, enum_query_type query_type) override;
|
||||
enum precedence precedence() const override { return INTERVAL_PRECEDENCE; }
|
||||
bool need_parentheses_in_default() override { return true; }
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_date_add_interval>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -1275,7 +1342,9 @@ class Item_extract :public Item_int_func,
|
|||
}
|
||||
return true;
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_extract>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -1322,7 +1391,9 @@ public:
|
|||
}
|
||||
void print(String *str, enum_query_type query_type) override;
|
||||
bool need_parentheses_in_default() override { return true; }
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_char_typecast>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -1363,7 +1434,9 @@ public:
|
|||
{
|
||||
return args[0]->type_handler()->Item_date_typecast_fix_length_and_dec(this);
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_date_typecast>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -1389,7 +1462,9 @@ public:
|
|||
Item_time_typecast_fix_length_and_dec(this);
|
||||
}
|
||||
Sql_mode_dependency value_depends_on_sql_mode() const override;
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_time_typecast>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -1415,7 +1490,9 @@ public:
|
|||
Item_datetime_typecast_fix_length_and_dec(this);
|
||||
}
|
||||
Sql_mode_dependency value_depends_on_sql_mode() const override;
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_datetime_typecast>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -1433,7 +1510,9 @@ public:
|
|||
return name;
|
||||
}
|
||||
bool get_date(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate) override;
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_makedate>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -1475,7 +1554,9 @@ public:
|
|||
return (null_value= Sec6_add(dt.get_mysql_time(), it.get_mysql_time(), 1).
|
||||
to_datetime(ltime));
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_timestamp>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -1507,7 +1588,9 @@ public:
|
|||
static LEX_CSTRING subtime= { STRING_WITH_LEN("subtime") };
|
||||
return sign > 0 ? addtime : subtime;
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_add_time>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -1533,7 +1616,9 @@ public:
|
|||
return FALSE;
|
||||
}
|
||||
bool get_date(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate) override;
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_timediff>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -1560,7 +1645,9 @@ public:
|
|||
return name;
|
||||
}
|
||||
bool get_date(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate) override;
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_maketime>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -1588,7 +1675,9 @@ public:
|
|||
{
|
||||
return !has_time_args();
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_microsecond>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -1617,7 +1706,9 @@ public:
|
|||
return FALSE;
|
||||
}
|
||||
void print(String *str, enum_query_type query_type) override;
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_timestamp_diff>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -1648,7 +1739,9 @@ public:
|
|||
return FALSE;
|
||||
}
|
||||
void print(String *str, enum_query_type query_type) override;
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_get_format>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -1672,7 +1765,9 @@ public:
|
|||
return name;
|
||||
}
|
||||
bool fix_length_and_dec() override;
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_str_to_date>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -1689,7 +1784,9 @@ public:
|
|||
return name;
|
||||
}
|
||||
bool get_date(THD *thd, MYSQL_TIME *res, date_mode_t fuzzydate) override;
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_last_day>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -48,7 +48,9 @@ public:
|
|||
return name;
|
||||
}
|
||||
void print(String *str, enum_query_type query_type) override;
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_history>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -64,10 +66,12 @@ public:
|
|||
return (trt_field == TR_table::FLD_BEGIN_TS) ? begin_name : commit_name;
|
||||
}
|
||||
bool get_date(THD *thd, MYSQL_TIME *res, date_mode_t fuzzydate) override;
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_trt_ts>(thd, this); }
|
||||
bool fix_length_and_dec() override
|
||||
{ fix_attributes_datetime(decimals); return FALSE; }
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_trt_ts>(thd, this); }
|
||||
};
|
||||
|
||||
class Item_func_trt_id : public Item_longlong_func
|
||||
|
|
@ -109,7 +113,9 @@ public:
|
|||
}
|
||||
|
||||
longlong val_int() override;
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_trt_id>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -126,7 +132,9 @@ public:
|
|||
return name;
|
||||
}
|
||||
bool val_bool() override;
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_trt_trx_sees>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -150,7 +150,8 @@ public:
|
|||
return name;
|
||||
}
|
||||
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_sum_row_number>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -225,7 +226,9 @@ public:
|
|||
}
|
||||
Item_sum_int::cleanup();
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_sum_rank>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -298,7 +301,9 @@ class Item_sum_dense_rank: public Item_sum_int
|
|||
}
|
||||
Item_sum_int::cleanup();
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_sum_dense_rank>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -362,7 +367,8 @@ class Item_sum_first_value : public Item_sum_hybrid_simple
|
|||
return name;
|
||||
}
|
||||
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_sum_first_value>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -389,7 +395,8 @@ class Item_sum_last_value : public Item_sum_hybrid_simple
|
|||
return name;
|
||||
}
|
||||
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_sum_last_value>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -411,7 +418,8 @@ class Item_sum_nth_value : public Item_sum_hybrid_simple
|
|||
return name;
|
||||
}
|
||||
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_sum_nth_value>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -433,7 +441,8 @@ class Item_sum_lead : public Item_sum_hybrid_simple
|
|||
return name;
|
||||
}
|
||||
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_sum_lead>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -455,7 +464,8 @@ class Item_sum_lag : public Item_sum_hybrid_simple
|
|||
return name;
|
||||
}
|
||||
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_sum_lag>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -570,7 +580,8 @@ class Item_sum_percent_rank: public Item_sum_double,
|
|||
Partition_row_count::set_partition_row_count(count);
|
||||
}
|
||||
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_sum_percent_rank>(thd, this); }
|
||||
|
||||
private:
|
||||
|
|
@ -658,9 +669,9 @@ class Item_sum_cume_dist: public Item_sum_double,
|
|||
Partition_row_count::set_partition_row_count(count);
|
||||
}
|
||||
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_sum_cume_dist>(thd, this); }
|
||||
|
||||
};
|
||||
|
||||
class Item_sum_ntile : public Item_sum_int,
|
||||
|
|
@ -735,7 +746,8 @@ class Item_sum_ntile : public Item_sum_int,
|
|||
Partition_row_count::set_partition_row_count(count);
|
||||
}
|
||||
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_sum_ntile>(thd, this); }
|
||||
|
||||
private:
|
||||
|
|
@ -899,8 +911,11 @@ public:
|
|||
Partition_row_count::set_partition_row_count(count);
|
||||
}
|
||||
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_sum_percentile_disc>(thd, this); }
|
||||
|
||||
public:
|
||||
void setup_window_func(THD *thd, Window_spec *window_spec) override;
|
||||
void setup_hybrid(THD *thd, Item *item);
|
||||
bool fix_fields(THD *thd, Item **ref) override;
|
||||
|
|
@ -1036,8 +1051,11 @@ public:
|
|||
Partition_row_count::set_partition_row_count(count);
|
||||
}
|
||||
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_sum_percentile_cont>(thd, this); }
|
||||
|
||||
public:
|
||||
void setup_window_func(THD *thd, Window_spec *window_spec) override;
|
||||
void setup_hybrid(THD *thd, Item *item);
|
||||
bool fix_fields(THD *thd, Item **ref) override;
|
||||
|
|
@ -1391,8 +1409,8 @@ public:
|
|||
|
||||
void print(String *str, enum_query_type query_type) override;
|
||||
|
||||
Item *do_get_copy(THD *thd) const override { return 0; }
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override { return nullptr; }
|
||||
};
|
||||
|
||||
#endif /* ITEM_WINDOWFUNC_INCLUDED */
|
||||
|
|
|
|||
|
|
@ -221,7 +221,8 @@ public:
|
|||
return { STRING_WITH_LEN("xpath_rootelement") };
|
||||
}
|
||||
bool val_native(THD *thd, Native *nodeset) override;
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_nodeset_func_rootelement>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -237,7 +238,8 @@ public:
|
|||
return { STRING_WITH_LEN("xpath_union") };
|
||||
}
|
||||
bool val_native(THD *thd, Native *nodeset) override;
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_nodeset_func_union>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -277,7 +279,8 @@ public:
|
|||
return { STRING_WITH_LEN("xpath_selfbyname") };
|
||||
}
|
||||
bool val_native(THD *thd, Native *nodeset) override;
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_nodeset_func_selfbyname>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -294,7 +297,8 @@ public:
|
|||
return { STRING_WITH_LEN("xpath_childbyname") };
|
||||
}
|
||||
bool val_native(THD *thd, Native *nodeset) override;
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_nodeset_func_childbyname>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -313,7 +317,8 @@ public:
|
|||
return { STRING_WITH_LEN("xpath_descendantbyname") };
|
||||
}
|
||||
bool val_native(THD *thd, Native *nodeset) override;
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_nodeset_func_descendantbyname>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -332,7 +337,8 @@ public:
|
|||
return { STRING_WITH_LEN("xpath_ancestorbyname") };
|
||||
}
|
||||
bool val_native(THD *thd, Native *nodeset) override;
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_nodeset_func_ancestorbyname>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -350,7 +356,8 @@ public:
|
|||
return { STRING_WITH_LEN("xpath_parentbyname") };
|
||||
}
|
||||
bool val_native(THD *thd, Native *nodeset) override;
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_nodeset_func_parentbyname>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -367,7 +374,8 @@ public:
|
|||
return { STRING_WITH_LEN("xpath_attributebyname") };
|
||||
}
|
||||
bool val_native(THD *thd, Native *nodeset) override;
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_nodeset_func_attributebyname>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -387,7 +395,8 @@ public:
|
|||
return { STRING_WITH_LEN("xpath_predicate") };
|
||||
}
|
||||
bool val_native(THD *thd, Native *nodeset) override;
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_nodeset_func_predicate>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -403,7 +412,8 @@ public:
|
|||
return { STRING_WITH_LEN("xpath_elementbyindex") };
|
||||
}
|
||||
bool val_native(THD *thd, Native *nodeset) override;
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_nodeset_func_elementbyindex>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -434,7 +444,8 @@ public:
|
|||
}
|
||||
return args[0]->val_real() ? 1 : 0;
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_xpath_cast_bool>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -451,7 +462,8 @@ public:
|
|||
return { STRING_WITH_LEN("xpath_cast_number") };
|
||||
}
|
||||
double val_real() override { return args[0]->val_real(); }
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_xpath_cast_number>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -471,7 +483,8 @@ public:
|
|||
}
|
||||
bool fix_length_and_dec() override
|
||||
{ max_length= MAX_BLOB_WIDTH; return FALSE; }
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_nodeset_context_cache>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -495,7 +508,8 @@ public:
|
|||
return tmp_native_value.element(0).pos + 1;
|
||||
return 0;
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_xpath_position>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -521,7 +535,8 @@ public:
|
|||
return predicate_supplied_context_size;
|
||||
return tmp_native_value.elements();
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_xpath_count>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -569,7 +584,8 @@ public:
|
|||
}
|
||||
return sum;
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_xpath_sum>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -654,7 +670,8 @@ public:
|
|||
}
|
||||
return 0;
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_nodeset_to_const_comparator>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -137,7 +137,9 @@ public:
|
|||
return name;
|
||||
}
|
||||
String *val_str(String *) override;
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_xml_extractvalue>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -158,7 +160,9 @@ public:
|
|||
return name;
|
||||
}
|
||||
String *val_str(String *) override;
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_xml_update>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -602,8 +602,8 @@ void TABLE::add_splitting_info_for_key_field(KEY_FIELD *key_field)
|
|||
condition of the select that specifies this table.
|
||||
*/
|
||||
THD *thd= in_use;
|
||||
Item *left_item= spl_field->producing_item->build_clone(thd);
|
||||
Item *right_item= key_field->val->build_clone(thd);
|
||||
Item *left_item= spl_field->producing_item->deep_copy_with_checks(thd);
|
||||
Item *right_item= key_field->val->deep_copy_with_checks(thd);
|
||||
Item_func_eq *eq_item= 0;
|
||||
if (left_item && right_item)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -6996,7 +6996,7 @@ Item *Item_field::in_subq_field_transformer_for_where(THD *thd, uchar *arg)
|
|||
Item_in_subselect *subq_pred= ((Item *)arg)->get_IN_subquery();
|
||||
Item *producing_item= get_corresponding_item(thd, this, subq_pred);
|
||||
if (producing_item)
|
||||
return producing_item->build_clone(thd);
|
||||
return producing_item->deep_copy_with_checks(thd);
|
||||
return this;
|
||||
}
|
||||
|
||||
|
|
@ -7009,7 +7009,7 @@ Item *Item_direct_view_ref::in_subq_field_transformer_for_where(THD *thd,
|
|||
Item_in_subselect *subq_pred= ((Item *)arg)->get_IN_subquery();
|
||||
Item *producing_item= get_corresponding_item(thd, this, subq_pred);
|
||||
DBUG_ASSERT (producing_item != NULL);
|
||||
return producing_item->build_clone(thd);
|
||||
return producing_item->deep_copy_with_checks(thd);
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -70,7 +70,9 @@ public:
|
|||
{
|
||||
return type_handler()->Item_get_date_with_warn(thd, this, ltime, fuzzydate);
|
||||
}
|
||||
Item* do_get_copy(THD *thd) const override { return 0; }
|
||||
|
||||
protected:
|
||||
Item* shallow_copy(THD *thd) const override { return nullptr; }
|
||||
};
|
||||
|
||||
class Item_proc_real :public Item_proc
|
||||
|
|
@ -125,8 +127,10 @@ public:
|
|||
{ s->set(value, default_charset()); return s; }
|
||||
my_decimal *val_decimal(my_decimal *) override;
|
||||
unsigned int size_of() { return sizeof(*this);}
|
||||
Item *do_get_copy(THD *thd) const override { return nullptr; }
|
||||
Item *do_build_clone(THD *thd) const override { return nullptr; }
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override { return nullptr; }
|
||||
Item *deep_copy(THD *thd) const override { return nullptr; }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -167,8 +171,10 @@ public:
|
|||
my_decimal *val_decimal(my_decimal *) override;
|
||||
void cleanup() override { value.free(); }
|
||||
unsigned int size_of() { return sizeof(*this);}
|
||||
Item *do_get_copy(THD *thd) const override { return nullptr; }
|
||||
Item *do_build_clone(THD *thd) const override { return nullptr; }
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override { return nullptr; }
|
||||
Item *deep_copy(THD *thd) const override { return nullptr; }
|
||||
};
|
||||
|
||||
/* The procedure class definitions */
|
||||
|
|
|
|||
|
|
@ -1562,7 +1562,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);
|
||||
extracted_cond->deep_copy_with_checks(thd);
|
||||
if (!extracted_cond_copy)
|
||||
continue;
|
||||
|
||||
|
|
|
|||
|
|
@ -9018,7 +9018,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);
|
||||
return cond->deep_copy_with_checks(thd);
|
||||
}
|
||||
if (cond->type() == Item::COND_ITEM)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -8940,7 +8940,7 @@ mysql_prepare_alter_table(THD *thd, TABLE *table,
|
|||
|
||||
if (keep)
|
||||
{
|
||||
Item *expr_copy= check->expr->get_copy(thd);
|
||||
Item *expr_copy= check->expr->shallow_copy_with_checks(thd);
|
||||
check= new Virtual_column_info();
|
||||
check->name= share->period.constr_name;
|
||||
check->automatic_name= true;
|
||||
|
|
|
|||
|
|
@ -294,15 +294,18 @@ public:
|
|||
str->append(tmp);
|
||||
str->append('\'');
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_literal_fbt>(thd, this); }
|
||||
Item *do_build_clone(THD *thd) const override { return get_copy(thd); }
|
||||
|
||||
// Non-overriding methods
|
||||
void set_value(const Fbt &value)
|
||||
{
|
||||
m_value= value;
|
||||
}
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_literal_fbt>(thd, this); }
|
||||
Item *deep_copy(THD *thd) const override
|
||||
{ return shallow_copy_with_checks(thd); }
|
||||
};
|
||||
|
||||
class Field_fbt: public Field
|
||||
|
|
@ -872,9 +875,12 @@ public:
|
|||
{
|
||||
return Item::save_in_field(field, no_conversions);
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_copy_fbt>(thd, this); }
|
||||
Item *do_build_clone(THD *thd) const override { return get_copy(thd); }
|
||||
Item *deep_copy(THD *thd) const override
|
||||
{ return shallow_copy_with_checks(thd); }
|
||||
};
|
||||
|
||||
class Item_char_typecast_func_handler_fbt_to_binary:
|
||||
|
|
@ -974,7 +980,9 @@ public:
|
|||
Fbt_null tmp(args[0]);
|
||||
return null_value= tmp.is_null() || tmp.to_native(to);
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_typecast_fbt>(thd, this); }
|
||||
};
|
||||
|
||||
|
|
@ -984,9 +992,6 @@ public:
|
|||
public:
|
||||
Item_cache_fbt(THD *thd)
|
||||
:Item_cache(thd, singleton()) { }
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_cache_fbt>(thd, this); }
|
||||
Item *do_build_clone(THD *thd) const override { return get_copy(thd); }
|
||||
bool cache_value() override
|
||||
{
|
||||
if (!example)
|
||||
|
|
@ -1050,6 +1055,12 @@ public:
|
|||
return true;
|
||||
return to->copy(m_value.ptr(), m_value.length());
|
||||
}
|
||||
|
||||
protected:
|
||||
Item *shallow_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_cache_fbt>(thd, this); }
|
||||
Item *deep_copy(THD *thd) const override
|
||||
{ return shallow_copy_with_checks(thd); }
|
||||
};
|
||||
|
||||
/* =[ methods ]=============================================== */
|
||||
|
|
|
|||
|
|
@ -3673,7 +3673,7 @@ Virtual_column_info::is_equivalent(THD *thd, TABLE_SHARE *share, TABLE_SHARE *vc
|
|||
const Virtual_column_info* vcol, bool &error) const
|
||||
{
|
||||
error= true;
|
||||
Item *cmp_expr= vcol->expr->build_clone(thd);
|
||||
Item *cmp_expr= vcol->expr->deep_copy_with_checks(thd);
|
||||
if (!cmp_expr)
|
||||
return false;
|
||||
Item::func_processor_rename_table param;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue