59#include "mysqld_error.h"
102#define COND_FILTER_ALLPASS 1.0f
104#define COND_FILTER_EQUALITY 0.1f
106#define COND_FILTER_INEQUALITY 0.3333f
108#define COND_FILTER_BETWEEN 0.1111f
115#define COND_FILTER_STALE -1.0f
131#define COND_FILTER_STALE_NO_CONST -2.0f
166#define MY_COLL_ALLOW_SUPERSET_CONV 1
167#define MY_COLL_ALLOW_COERCIBLE_CONV 2
168#define MY_COLL_DISALLOW_NONE 4
169#define MY_COLL_ALLOW_NUMERIC_CONV 8
171#define MY_COLL_ALLOW_CONV \
172 (MY_COLL_ALLOW_SUPERSET_CONV | MY_COLL_ALLOW_COERCIBLE_CONV)
173#define MY_COLL_CMP_CONV (MY_COLL_ALLOW_CONV | MY_COLL_DISALLOW_NONE)
206 uint repertoire_arg) {
291 if (is_null_terminated)
348#define NAME_STRING(x) Name_string(STRING_WITH_LEN(x))
379 void copy(
const char *str_arg,
size_t length_arg,
const CHARSET_INFO *cs_arg,
380 bool is_autogenerated_arg);
468 DBUG_PRINT(
"outer_field", (
"creating ctx %p",
this));
509 ? ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
511 ? ER_DEFAULT_VAL_GENERATED_FUNCTION_IS_NOT_ALLOWED
512 : ER_CHECK_CONSTRAINT_FUNCTION_IS_NOT_ALLOWED);
873 static void *
operator new(
size_t size)
noexcept {
874 return (*THR_MALLOC)->Alloc(size);
877 const std::nothrow_t &arg
878 [[maybe_unused]] = std::nothrow)
noexcept {
882 static void operator delete(
void *ptr [[maybe_unused]],
883 size_t size [[maybe_unused]]) {
887 const std::nothrow_t &)
noexcept {}
1163 void rename(
char *new_name);
1193 [[maybe_unused]]) {}
1225 bool pin =
false,
bool inherit =
false) {
1263 const Query_block *outer_query_block [[maybe_unused]]) {
1264 return std::nullopt;
1285 bool no_conversions);
1299 bool no_conversions);
1331 virtual bool eq(
const Item *,
bool binary_cmp)
const;
1708 bool *incl_endp [[maybe_unused]]) {
1931 my_error(ER_NOT_SUPPORTED_YET,
MYF(0),
"item type for JSON");
1963 double rows_in_table [[maybe_unused]]) {
1965 assert((read_tables & filter_for_table) == 0);
2092 return decimal_value;
2337 bool used_alias)
const;
2355 bool skip_registered);
2472 return (*
reinterpret_cast<std::remove_reference_t<T> *
>(arg))(
this);
2478 return (*
reinterpret_cast<std::remove_reference_t<T> *
>(*arg))(
this);
2549 if ((this->*analyzer)(arg_p))
return ((this->*transformer)(arg_t));
2555 (*traverser)(
this, arg);
2668 if (table !=
nullptr && table != field->
table)
return false;
2670 table = field->
table;
2726 assert(root !=
nullptr);
2879 if (*arg) *arg =
nullptr;
3135 if (this_context == other_context) {
3552 [[maybe_unused]])
const {
3593 return item->
walk(&Item::walk_helper_thunk<T>, walk,
3594 reinterpret_cast<uchar *
>(&functor));
3604template <
class T,
class U>
3606 uchar *analyzer_ptr =
reinterpret_cast<uchar *
>(&analyzer);
3607 return item->
compile(&Item::analyze_helper_thunk<T>, &analyzer_ptr,
3608 &Item::walk_helper_thunk<U>,
3609 reinterpret_cast<uchar *
>(&transformer));
3619 return item->
transform(&Item::walk_helper_thunk<T>,
3620 pointer_cast<uchar *>(&transformer));
3699 Field *field,
bool no_conversions)
override;
3713 Field *field,
bool no_conversions) {
3862 bool no_conversions)
override {
3876 uint nitems,
int item_sep = 1) {
3901#define NO_FIELD_INDEX ((uint16)(-1))
4000 const char *table_name_arg,
const char *field_name_arg)
4015 const char *table_name_arg,
const char *field_name_arg)
4093 const char *db_name_arg,
const char *table_name_arg)
const;
4129 bool any_privileges);
4141 const char *table_name_arg)
4180 bool no_conversions)
override;
4236 if (
item_equal ==
nullptr && item_equal_arg !=
nullptr) {
4274 const char *table_name_arg,
const char *field_name_arg);
4275 Item_field(
const POS &pos,
const char *db_arg,
const char *table_name_arg,
4276 const char *field_name_arg);
4285 bool eq(
const Item *item,
bool binary_cmp)
const override;
4342 return pointer_cast<Field *>(arg) ==
field;
4346 auto mark_field = pointer_cast<Mark_field *>(arg);
4414 double rows_in_table)
override;
4435 float default_filter)
const;
4487 const char *opt_table_name)
4488 :
super(pos, opt_schema_name, opt_table_name,
"*") {}
4530 bool no_conversions)
override;
4548 bool eq(
const Item *item,
bool binary_cmp)
const override;
4579 bool no_conversions)
override;
4858 bool eq(
const Item *item,
bool binary_cmp)
const override;
4884 pointer_cast<Check_function_as_value_generator_parameters *>(args);
4989 bool no_conversions)
override;
5000 return static_cast<double>(
value);
5018 bool eq(
const Item *,
bool)
const override;
5047 bool no_conversions)
override;
5081 bool no_conversions)
override;
5119 bool no_conversions)
override;
5154 bool eq(
const Item *,
bool binary_cmp)
const override;
5205 bool no_conversions)
override;
5215 if (
value <= LLONG_MIN) {
5239 bool eq(
const Item *,
bool binary_cmp)
const override;
5289 bool no_conversions)
override;
5392 bool eq(
const Item *item,
bool binary_cmp)
const override;
5450 const char *cptr,
const char *
end,
5451 int unsigned_target);
5480 pointer_cast<Check_function_as_value_generator_parameters *>(args);
5506 pointer_cast<Check_function_as_value_generator_parameters *>(args);
5546 bool no_conversions)
override;
5584 bool eq(
const Item *item,
bool binary_cmp)
const override;
5684 return llrint(realval);
5709 bool no_conversions)
override;
5726 const char *table_name_arg,
const char *field_name_arg)
5727 :
Item_ident(context_arg, db_name_arg, table_name_arg, field_name_arg) {}
5728 Item_ref(
const POS &pos,
const char *db_name_arg,
const char *table_name_arg,
5729 const char *field_name_arg)
5730 :
Item_ident(pos, db_name_arg, table_name_arg, field_name_arg) {}
5747 const char *db_name_arg,
const char *table_name_arg,
5748 const char *field_name_arg,
bool alias_of_expr_arg =
false);
5750 const char *field_name_arg);
5767 bool eq(
const Item *item,
bool binary_cmp)
const override {
5801 if (
map != 0)
return map;
5853 if (order ==
PREFIX) (*traverser)(
this, arg);
5855 if (order ==
POSTFIX) (*traverser)(
this, arg);
5924 pointer_cast<Check_function_as_value_generator_parameters *>(args);
5953 const char *db_name_arg,
const char *alias_name_arg,
5954 const char *table_name_arg,
const char *field_name_arg,
5956 :
Item_ref(context_arg, item, db_name_arg, alias_name_arg,
5963 assert(db_name_arg ==
nullptr);
5988 const Item *inner_item;
5997 inner_item = inner_ref->
ref_item();
5999 inner_ref = down_cast<const Item_ref *>(inner_item);
6003 ? down_cast<const Item_field *>(inner_item)
6028 return field !=
nullptr
6033 bool eq(
const Item *item,
bool)
const override;
6068 bool no_conversions)
override;
6125 const char *db_name_arg,
const char *table_name_arg,
6126 const char *field_name_arg,
bool alias_of_expr_arg,
6128 :
Item_ref(context_arg, item, db_name_arg, table_name_arg, field_name_arg,
6165 :
super(context_arg, item,
"",
"",
""),
owner(master) {}
6198 bool no_conversions)
override {
6387 bool cmp()
override;
6396 bool cmp()
override;
6404 bool cmp()
override;
6412 bool cmp()
override;
6420 bool cmp()
override;
6428 bool cmp()
override;
6436 bool no_conversions)
override;
6443 bool eq(
const Item *item,
bool binary_cmp)
const override;
6468 reinterpret_cast<char *
>(args));
6494 bool no_conversions)
override {
6523 bool eq(
const Item *item,
bool binary_cmp)
const override;
6542 pointer_cast<Check_function_as_value_generator_parameters *>(args);
6612 bool eq(
const Item *item,
bool binary_cmp)
const override;
6629 pointer_cast<Check_function_as_value_generator_parameters *>(args);
6711 if (
example ==
nullptr)
return;
6742 bool eq(
const Item *item,
bool)
const override {
return this == item; }
6794 pointer_cast<Check_function_as_value_generator_parameters *>(args);
6907 bool no_conversions)
override;
7092 field->
field =
true;
7096 pointer_cast<Check_function_as_value_generator_parameters *>(args);
7154 bool no_conversions)
override;
7159 bool eq(
const Item *item,
bool binary_cmp)
const override;
7210 return std::count_if(fields.
begin(), fields.
end(),
7211 [](
Item *item) { return !item->hidden; });
7215 return std::count_if(fields.
begin(), fields.
end(),
7216 [](
Item *item) { return item->hidden; });
7221 for (
Item *item : fields) {
7222 if (item->hidden)
continue;
7223 if (index-- == 0)
return item;
uint32_t Access_bitmask
Definition: auth_acls.h:34
A type for SQL-like 3-valued Booleans: true/false/unknown.
Definition: item.h:592
value
Definition: item.h:606
@ v_UNKNOWN
Definition: item.h:606
@ v_FALSE
Definition: item.h:606
@ v_TRUE
Definition: item.h:606
Bool3(value v)
This is private; instead, use false3()/etc.
Definition: item.h:608
static const Bool3 true3()
Definition: item.h:599
static const Bool3 unknown3()
Definition: item.h:597
static const Bool3 false3()
Definition: item.h:595
bool is_true() const
Definition: item.h:601
value m_val
Definition: item.h:610
bool is_unknown() const
Definition: item.h:602
bool is_false() const
Definition: item.h:603
Definition: item_cmpfunc.h:2701
bool cmp() override
Compare the value associated with the item with the stored value.
Definition: item_buff.cc:184
Cached_item_decimal(Item *item_par)
Definition: item.h:6427
my_decimal value
Definition: item.h:6424
longlong value
Definition: item.h:6408
bool cmp() override
Compare the value associated with the item with the stored value.
Definition: item_buff.cc:151
Cached_item_int(Item *item_par)
Definition: item.h:6411
Cached_item subclass for JSON values.
Definition: item.h:6391
Json_wrapper * m_value
The cached JSON value.
Definition: item.h:6392
~Cached_item_json() override
Definition: item_buff.cc:99
Cached_item_json(Item *item)
Definition: item_buff.cc:96
bool cmp() override
Compare the new JSON value in member 'item' with the previous value.
Definition: item_buff.cc:107
Cached_item_real(Item *item_par)
Definition: item.h:6403
bool cmp() override
Compare the value associated with the item with the stored value.
Definition: item_buff.cc:135
double value
Definition: item.h:6400
String tmp_value
Definition: item.h:6383
Cached_item_str(Item *arg)
Definition: item.h:6386
bool cmp() override
Compare the value associated with the item with the stored value.
Definition: item_buff.cc:76
String value
Definition: item.h:6382
Cached_item_temporal(Item *item_par)
Definition: item.h:6419
bool cmp() override
Compare the value associated with the item with the stored value.
Definition: item_buff.cc:168
longlong value
Definition: item.h:6416
This is used for segregating rows in groups (e.g.
Definition: item.h:6357
Item ** get_item_ptr()
Definition: item.h:6376
Item * item
The item whose value to cache.
Definition: item.h:6359
virtual ~Cached_item()=default
Item * get_item()
Definition: item.h:6375
virtual bool cmp()=0
Compare the value associated with the item with the stored value.
Cached_item(Item *i)
Definition: item.h:6360
bool null_value
Definition: item.h:6363
void set(Derivation derivation_arg)
Definition: item.h:220
DTCollation(const CHARSET_INFO *collation_arg, Derivation derivation_arg)
Definition: item.h:190
void set_repertoire_from_charset(const CHARSET_INFO *cs)
Definition: item.h:181
bool aggregate(DTCollation &dt, uint flags=0)
Aggregate two collations together taking into account their coercibility (aka derivation):.
Definition: item.cc:2403
void set(const DTCollation &dt)
Definition: item.h:195
DTCollation()
Definition: item.h:185
void set(const CHARSET_INFO *collation_arg, Derivation derivation_arg, uint repertoire_arg)
Definition: item.h:205
bool set(DTCollation &dt1, DTCollation &dt2, uint flags=0)
Definition: item.h:223
void set_numeric()
Definition: item.h:211
void set_repertoire(uint repertoire_arg)
Definition: item.h:221
const CHARSET_INFO * collation
Definition: item.h:177
Derivation derivation
Definition: item.h:178
const char * derivation_name() const
Definition: item.h:227
void set(const CHARSET_INFO *collation_arg, Derivation derivation_arg)
Definition: item.h:200
uint repertoire
Definition: item.h:179
void set(const CHARSET_INFO *collation_arg)
Definition: item.h:216
A field that stores a JSON value.
Definition: field.h:3987
const CHARSET_INFO * charset_for_protocol() const
Definition: field.h:1595
virtual Item_result cast_to_int_type() const
Definition: field.h:1044
static constexpr size_t MAX_LONG_BLOB_WIDTH
Definition: field.h:737
virtual bool is_array() const
Whether the field is a typed array.
Definition: field.h:1798
static constexpr size_t MAX_VARCHAR_WIDTH
Definition: field.h:731
const char * field_name
Definition: field.h:686
virtual uint32 max_display_length() const =0
TABLE * table
Pointer to TABLE object that owns this field.
Definition: field.h:681
bool is_null(ptrdiff_t row_offset=0) const
Check whether the full table's row is NULL or the Field has value NULL.
Definition: field.h:1224
virtual my_decimal * val_decimal(my_decimal *) const =0
bool is_tmp_nullable() const
Definition: field.h:908
virtual double val_real() const =0
virtual longlong val_int() const =0
virtual Item_result numeric_context_result_type() const
Returns Item_result type of a field when it appears in numeric context such as: SELECT time_column + ...
Definition: field.h:1040
virtual bool eq_def(const Field *field) const
Definition: field.cc:8437
virtual bool get_date(MYSQL_TIME *ltime, my_time_flags_t fuzzydate) const
Definition: field.cc:2098
geometry_type
Definition: field.h:718
@ GEOM_GEOMETRY
Definition: field.h:719
virtual Item_result result_type() const =0
bool is_nullable() const
Definition: field.h:1297
virtual geometry_type get_geometry_type() const
Definition: field.h:1678
static Item_result result_merge_type(enum_field_types)
Detect Item_result by given field type of UNION merge result.
Definition: field.cc:1359
String * val_str(String *str) const
Definition: field.h:1009
bool is_field_for_functional_index() const
Definition: field.h:874
virtual bool get_time(MYSQL_TIME *ltime) const
Definition: field.cc:2105
static constexpr size_t MAX_MEDIUM_BLOB_WIDTH
Definition: field.h:736
void dbug_print() const
Definition: field.h:1685
Context object for (functions that override) Item::clean_up_after_removal().
Definition: item.h:2723
Query_block *const m_root
Pointer to Cleanup_after_removal_context containing from which select the walk started,...
Definition: item.h:2737
Cleanup_after_removal_context(Query_block *root)
Definition: item.h:2725
Query_block * get_root()
Definition: item.h:2729
List< Item > * m_items
Definition: item.h:2578
Collect_item_fields_or_refs(List< Item > *fields_or_refs)
Definition: item.h:2579
Collect_item_fields_or_refs(const Collect_item_fields_or_refs &)=delete
Collect_item_fields_or_refs & operator=(const Collect_item_fields_or_refs &)=delete
Collect_item_fields_or_view_refs(const Collect_item_fields_or_view_refs &)=delete
Query_block * m_transformed_block
Definition: item.h:2593
List< Item > * m_item_fields_or_view_refs
Definition: item.h:2592
Collect_item_fields_or_view_refs(List< Item > *fields_or_vr, Query_block *transformed_block)
Definition: item.h:2594
Collect_item_fields_or_view_refs & operator=(const Collect_item_fields_or_view_refs &)=delete
Interface for storing an aggregation of type and type specification of multiple Item objects.
Definition: item.h:7063
longlong val_int() override=0
Item_result result_type() const override
Return expression type of Item_aggregate_type.
Definition: item.cc:10262
my_decimal * val_decimal(my_decimal *) override=0
void set_typelib(Item *item)
Set typelib information for an aggregated enum/set field.
Definition: item.cc:10534
bool get_time(MYSQL_TIME *) override=0
Item_aggregate_type(THD *, Item *)
Definition: item.cc:10243
bool get_date(MYSQL_TIME *, my_time_flags_t) override=0
String * val_str(String *) override=0
bool check_function_as_value_generator(uchar *args) override
Check if this item is allowed for a virtual column or inside a default expression.
Definition: item.h:7094
static uint32 display_length(Item *item)
Calculate length for merging result for given Item type.
Definition: item.cc:10417
void make_field(Send_field *field) override
Definition: item.h:7089
Field * make_field_by_type(TABLE *table, bool strict)
Make temporary table field according collected information about type of UNION result.
Definition: item.cc:10479
bool join_types(THD *, Item *)
Find field type which can carry current Item_aggregate_type type and type of given Item.
Definition: item.cc:10343
double val_real() override=0
Field::geometry_type get_geometry_type() const override
Definition: item.h:7086
TYPELIB * m_typelib
Typelib information, only used for data type ENUM and SET.
Definition: item.h:7066
Field::geometry_type geometry_type
Geometry type, only used for data type GEOMETRY.
Definition: item.h:7068
Represents [schema.
Definition: item.h:4475
bool is_asterisk() const override
Checks if the current object represents an asterisk select list item.
Definition: item.h:4495
Item_asterisk(const POS &pos, const char *opt_schema_name, const char *opt_table_name)
Constructor.
Definition: item.h:4486
bool itemize(Parse_context *pc, Item **res) override
The same as contextualize() but with additional parameter.
Definition: item.cc:10915
Item_field super
Definition: item.h:4476
bool fix_fields(THD *, Item **) override
Resolve the name of a column reference.
Definition: item.h:4491
Item_basic_constant(const POS &pos)
Definition: item.h:3630
void cleanup() override
Called for every Item after use (preparation and execution).
Definition: item.h:3639
void set_str_value(String *str)
Definition: item.h:3647
bool basic_const_item() const override
Returns true if this is a simple constant item like an integer, not a constant expression.
Definition: item.h:3646
void set_used_tables(table_map map)
Definition: item.h:3635
table_map used_table_map
Definition: item.h:3626
bool check_function_as_value_generator(uchar *) override
Check if this item is allowed for a virtual column or inside a default expression.
Definition: item.h:3637
Item_basic_constant()
Definition: item.h:3629
table_map used_tables() const override
Definition: item.h:3636
Item_bin_string(const char *str, size_t str_length)
Definition: item.h:5598
void bin_string_init(const char *str, size_t str_length)
Definition: item.cc:7254
static LEX_CSTRING make_bin_str(const char *str, size_t str_length)
Definition: item.cc:7224
Item_hex_string super
Definition: item.h:5595
Item_bin_string(const POS &pos, const LEX_STRING &literal)
Definition: item.h:5601
Item_blob(const char *name, size_t length)
Definition: item.h:5498
enum Type type() const override
Definition: item.h:5503
bool check_function_as_value_generator(uchar *args) override
Check if this item is allowed for a virtual column or inside a default expression.
Definition: item.h:5504
Cache class for BIT type expressions.
Definition: item.h:6842
Item_cache_bit(enum_field_types field_type_arg)
Definition: item.h:6844
uint string_length()
Definition: item.h:6854
String * val_str(String *str) override
Transform the result Item_cache_int::value in bit format.
Definition: item.cc:9663
longlong val_int() override
Definition: item.cc:9859
longlong val_time_temporal() override
Return time value of item in packed longlong format.
Definition: item.cc:9834
longlong int_value
Definition: item.h:6994
longlong val_date_temporal() override
Return date value of item in packed longlong format.
Definition: item.cc:9847
bool cache_value() override
Definition: item.cc:9694
my_decimal * val_decimal(my_decimal *) override
Definition: item.cc:9751
void store_value(Item *item, longlong val_arg)
Definition: item.cc:9710
bool get_time(MYSQL_TIME *ltime) override
Definition: item.cc:9806
String * val_str(String *str) override
Definition: item.cc:9723
bool get_date(MYSQL_TIME *ltime, my_time_flags_t fuzzydate) override
Definition: item.cc:9772
bool str_value_cached
Definition: item.h:6995
Item_result result_type() const override
Definition: item.h:7013
void clear() override
Definition: item.h:7023
String cached_string
Definition: item.h:6991
void store(Item *item) override
Assigns to the cache the expression to be cached.
Definition: item.cc:9718
bool cache_value_int()
Definition: item.cc:9679
Item_cache_datetime(enum_field_types field_type_arg)
Definition: item.h:6998
double val_real() override
Definition: item.cc:9832
double val_real() override
Definition: item.cc:10039
my_decimal decimal_value
Definition: item.h:6880
bool cache_value() override
Definition: item.cc:10023
bool get_date(MYSQL_TIME *ltime, my_time_flags_t fuzzydate) override
Definition: item.h:6889
longlong val_int() override
Definition: item.cc:10047
Item_cache_decimal()
Definition: item.h:6883
String * val_str(String *str) override
Definition: item.cc:10055
void store_value(Item *expr, my_decimal *d)
Definition: item.cc:10032
my_decimal * val_decimal(my_decimal *) override
Definition: item.cc:10064
bool get_time(MYSQL_TIME *ltime) override
Definition: item.h:6892
Item_result result_type() const override
Definition: item.h:6895
double val_real() override
Definition: item.cc:9650
longlong val_int() override
Definition: item.cc:9657
bool get_date(MYSQL_TIME *ltime, my_time_flags_t fuzzydate) override
Definition: item.h:6828
longlong value
Definition: item.h:6810
Item_cache_int(enum_field_types field_type_arg)
Definition: item.h:6814
longlong val_date_temporal() override
Return date value of item in packed longlong format.
Definition: item.h:6825
longlong val_time_temporal() override
Return time value of item in packed longlong format.
Definition: item.h:6824
Item_result result_type() const override
Definition: item.h:6832
Item_cache_int()
Definition: item.h:6813
bool cache_value() override
Definition: item.cc:9619
bool get_time(MYSQL_TIME *ltime) override
Definition: item.h:6831
my_decimal * val_decimal(my_decimal *) override
Definition: item.cc:9643
void store_value(Item *item, longlong val_arg)
Unlike store(), this stores an explicitly provided value, not the one of 'item'; however,...
Definition: item.cc:9628
String * val_str(String *str) override
Definition: item.cc:9636
An item cache for values of type JSON.
Definition: item.h:7030
Item_result result_type() const override
Definition: item.h:7044
my_decimal * val_decimal(my_decimal *val) override
Definition: item.cc:9936
bool m_is_sorted
Whether the cached value is array and it is sorted.
Definition: item.h:7034
bool get_date(MYSQL_TIME *ltime, my_time_flags_t fuzzydate) override
Definition: item.cc:9946
Json_wrapper * m_value
Cached value.
Definition: item.h:7032
bool cache_value() override
Read the JSON value and cache it.
Definition: item.cc:9872
Item_cache_json()
Definition: item.cc:9861
bool get_time(MYSQL_TIME *ltime) override
Definition: item.cc:9956
~Item_cache_json() override
Definition: item.cc:9866
bool val_json(Json_wrapper *wr) override
Copy the cached JSON value into a wrapper.
Definition: item.cc:9905
bool is_sorted()
Returns true when cached value is array and it's sorted.
Definition: item.h:7053
void store_value(Item *expr, Json_wrapper *wr)
Definition: item.cc:9889
double val_real() override
Definition: item.cc:9926
String * val_str(String *str) override
Definition: item.cc:9915
void sort()
Sort cached data. Only arrays are affected.
Definition: item.cc:9975
longlong val_int() override
Definition: item.cc:9966
bool get_date(MYSQL_TIME *ltime, my_time_flags_t fuzzydate) override
Definition: item.h:6867
Item_cache_real()
Definition: item.h:6861
void store_value(Item *expr, double value)
Definition: item.cc:9991
double value
Definition: item.h:6858
my_decimal * val_decimal(my_decimal *) override
Definition: item.cc:10016
bool cache_value() override
Definition: item.cc:9983
Item_result result_type() const override
Definition: item.h:6873
double val_real() override
Definition: item.cc:9997
bool get_time(MYSQL_TIME *ltime) override
Definition: item.h:6870
String * val_str(String *str) override
Definition: item.cc:10009
longlong val_int() override
Definition: item.cc:10003
Item * element_index(uint i) override
Definition: item.h:6981
longlong val_int() override
Definition: item.h:6957
double val_real() override
Definition: item.h:6953
bool null_inside() override
Definition: item.cc:10225
Item_result result_type() const override
Definition: item.h:6978
Item ** addr(uint i) override
Definition: item.h:6982
bool allocate(uint num) override
'allocate' is only used in Item_cache_row::setup()
Definition: item.cc:10155
Item_cache_row()
Definition: item.h:6939
void bring_value() override
Definition: item.cc:10236
bool get_time(MYSQL_TIME *) override
Definition: item.h:6973
my_decimal * val_decimal(my_decimal *) override
Definition: item.h:6965
void make_field(Send_field *) override
Definition: item.h:6952
void illegal_method_call(const char *) const
Definition: item.cc:10209
bool get_date(MYSQL_TIME *, my_time_flags_t) override
Definition: item.h:6969
uint item_count
Definition: item.h:6936
bool check_cols(uint c) override
Definition: item.cc:10217
bool cache_value() override
Definition: item.cc:10186
uint cols() const override
Definition: item.h:6980
bool setup(Item *item) override
Definition: item.cc:10162
void store(Item *item) override
Assigns to the cache the expression to be cached.
Definition: item.cc:10175
void cleanup() override
Called for every Item after use (preparation and execution).
Definition: item.h:6986
Item_cache ** values
Definition: item.h:6935
String * val_str(String *) override
Definition: item.h:6961
type_conversion_status save_in_field_inner(Field *field, bool no_conversions) override
Helper function which does all of the work for save_in_field(Field*, bool), except some error checkin...
Definition: item.cc:10141
bool get_date(MYSQL_TIME *ltime, my_time_flags_t fuzzydate) override
Definition: item.h:6922
bool get_time(MYSQL_TIME *ltime) override
Definition: item.h:6925
bool cache_value() override
Definition: item.cc:10070
Item_result result_type() const override
Definition: item.h:6928
void store_value(Item *expr, String &s)
Definition: item.cc:10092
String value_buff
Definition: item.h:6902
my_decimal * val_decimal(my_decimal *) override
Definition: item.cc:10130
const CHARSET_INFO * charset() const
Definition: item.h:6929
double val_real() override
Definition: item.cc:10102
String * val_str(String *) override
Definition: item.cc:10124
longlong val_int() override
Definition: item.cc:10113
char buffer[STRING_BUFFER_USUAL_SIZE]
Definition: item.h:6901
String * value
Definition: item.h:6902
bool is_varbinary
Definition: item.h:6903
Item_cache_str(const Item *item)
Definition: item.h:6910
bool walk(Item_processor processor, enum_walk walk, uchar *arg) override
Traverses a tree of Items in prefix and/or postfix order.
Definition: item.cc:9590
void cleanup() override
Called for every Item after use (preparation and execution).
Definition: item.cc:9608
Field * field()
If this item caches a field value, return pointer to underlying field.
Definition: item.h:6755
Item * get_example() const
Definition: item.h:6804
bool eq_def(const Field *field)
Definition: item.h:6739
Item_field * cached_field
Field that this object will get value from.
Definition: item.h:6682
virtual bool allocate(uint)
Definition: item.h:6716
Item ** get_example_ptr()
Definition: item.h:6805
bool is_non_const_over_literals(uchar *) override
Definition: item.h:6791
bool has_value()
Check if saved item has a non-NULL value.
Definition: item.cc:9596
Item_result result_type() const override
Definition: item.h:6800
friend bool has_rollup_result(Item *item)
Checks if an item has a ROLLUP NULL which needs to be written to temp table.
Definition: sql_executor.cc:343
bool basic_const_item() const override
Returns true if this is a simple constant item like an integer, not a constant expression.
Definition: item.h:6780
void fix_after_pullout(Query_block *parent_query_block, Query_block *removed_query_block) override
Fix after tables have been moved from one query_block level to the parent level, e....
Definition: item.h:6709
virtual bool cache_value()=0
void store_null()
Force an item to be null.
Definition: item.h:6768
Item_cache(enum_field_types field_type_arg)
Definition: item.h:6702
table_map used_table_map
Definition: item.h:6676
enum Type type() const override
Definition: item.h:6733
Item_cache()
Definition: item.h:6697
virtual void store(Item *item)
Assigns to the cache the expression to be cached.
Definition: item.cc:9571
virtual bool setup(Item *item)
Definition: item.h:6717
bool value_cached
Definition: item.h:6690
table_map used_tables() const override
Definition: item.h:6736
bool is_null() override
The method allows to determine nullness of a complex expression without fully evaluating it,...
Definition: item.h:6788
virtual void clear()
Definition: item.h:6784
bool check_function_as_value_generator(uchar *args) override
Check if this item is allowed for a virtual column or inside a default expression.
Definition: item.h:6792
Item * example
Definition: item.h:6675
friend bool replace_contents_of_rollup_wrappers_with_tmp_fields(THD *thd, Query_block *select, Item *item_arg)
For each rollup wrapper below the given item, replace its argument with a temporary field,...
Definition: sql_executor.cc:4414
static Item_cache * get_cache(const Item *item)
Definition: item.cc:9528
void print(const THD *thd, String *str, enum_query_type query_type) const override
This method is used for to:
Definition: item.cc:9580
bool store_and_cache(Item *item)
Definition: item.h:6775
bool eq(const Item *item, bool) const override
Definition: item.h:6742
uint m_case_expr_id
Definition: item.h:3812
Type type() const override
Definition: item.h:3799
Item * this_item() override
Definition: item.cc:1873
Item_case_expr(uint case_expr_id)
Definition: item.cc:1869
Item ** this_item_addr(THD *thd, Item **) override
Definition: item.cc:1885
void print(const THD *thd, String *str, enum_query_type query_type) const override
This method is used for to:
Definition: item.cc:1891
Item_result result_type() const override
Definition: item.h:3800
longlong val_date_temporal() override
Return date value of item in packed longlong format.
Definition: item.h:6256
Item_datetime_with_ref(enum_field_types field_type_arg, uint8 decimals_arg, longlong i, Item *ref_arg)
Constructor for Item_datetime_with_ref.
Definition: item.h:6251
longlong val_time_temporal() override
Return time value of item in packed longlong format.
Definition: item.h:6257
Item * clone_item() const override
Definition: item.cc:6900
uint decimal_precision() const override
Definition: item.h:5153
bool eq(const Item *, bool binary_cmp) const override
Definition: item.cc:3387
String * val_str(String *) override
Definition: item.cc:3370
void print(const THD *thd, String *str, enum_query_type query_type) const override
This method is used for to:
Definition: item.cc:3376
Item_result result_type() const override
Definition: item.h:5132
longlong val_int() override
Definition: item.cc:3358
enum Type type() const override
Definition: item.h:5131
my_decimal * val_decimal(my_decimal *) override
Definition: item.h:5136
my_decimal decimal_value
Definition: item.h:5117
double val_real() override
Definition: item.cc:3364
bool get_date(MYSQL_TIME *ltime, my_time_flags_t fuzzydate) override
Definition: item.h:5137
bool check_partition_func_processor(uchar *) override
Check if a partition function is allowed.
Definition: item.h:5156
type_conversion_status save_in_field_inner(Field *field, bool no_conversions) override
Helper function which does all of the work for save_in_field(Field*, bool), except some error checkin...
Definition: item.cc:6859
Item_num super
Definition: item.h:5114
Item_decimal(const POS &pos, const char *str_arg, uint length, const CHARSET_INFO *charset)
Definition: item.cc:3299
Item * clone_item() const override
Definition: item.h:5143
Item_num * neg() override
Definition: item.h:5148
void set_decimal_value(const my_decimal *value_par)
Definition: item.cc:3402
bool get_time(MYSQL_TIME *ltime) override
Definition: item.h:5140
bool itemize(Parse_context *pc, Item **res) override
The same as contextualize() but with additional parameter.
Definition: item.cc:8862
Item * transform(Item_transformer transformer, uchar *args) override
Perform a generic transformation of the Item tree, by adding zero or more additional Item objects to ...
Definition: item.cc:9001
type_conversion_status save_in_field_inner(Field *field, bool no_conversions) override
Helper function which does all of the work for save_in_field(Field*, bool), except some error checkin...
Definition: item.cc:8957
void print(const THD *thd, String *str, enum_query_type query_type) const override
This method is used for to:
Definition: item.cc:8946
Item_default_value(const POS &pos, Item *a=nullptr)
Definition: item.h:6439
bool eq(const Item *item, bool binary_cmp) const override
Definition: item.cc:8878
void bind_fields() override
Bind objects from the current execution context to field objects in item trees.
Definition: item.cc:8936
bool walk(Item_processor processor, enum_walk walk, uchar *args) override
Traverses a tree of Items in prefix and/or postfix order.
Definition: item.h:6460
Item_field super
Definition: item.h:6432
bool check_column_privileges(uchar *) override
Check privileges of base table column.
Definition: item.h:6458
table_map used_tables() const override
Definition: item.h:6449
bool check_gcol_depend_default_processor(uchar *args) override
Check if a generated expression depends on DEFAULT function with specific column name as argument.
Definition: item.h:6466
Item * arg
The argument for this function.
Definition: item.h:6476
bool collect_item_field_or_view_ref_processor(uchar *arg) override
Collects fields and view references that have the qualifying table in the specified query block.
Definition: item.cc:6161
Item * argument() const
Definition: item.h:6472
uchar * m_rowbuffer_saved
Pointer to row buffer that was used to calculate field value offset.
Definition: item.h:6478
bool fix_fields(THD *, Item **) override
Resolve the name of a column reference.
Definition: item.cc:8883
enum Type type() const override
Definition: item.h:6442
Item * replace_item_field(uchar *) override
If this default value is the target of replacement, replace it with the info object's item or,...
Definition: item.cc:6185
Item * get_tmp_table_item(THD *thd) override
If an Item is materialized in a temporary table, a different Item may have to be used in the part of ...
Definition: item.h:6450
void cleanup() override
Called for every Item after use (preparation and execution).
Definition: item.h:6446
Item_empty_string – is a utility class to put an item into List<Item> which is then used in protocol....
Definition: item.h:5518
void make_field(Send_field *field) override
Definition: item.cc:6280
Item_empty_string(const char *header, size_t length, const CHARSET_INFO *cs=nullptr)
Definition: item.h:5520
Definition: item_cmpfunc.h:2561
Item * replace_equal_field(uchar *) override
Replace an Item_field for an equal Item_field that evaluated earlier (if any).
Definition: item.cc:6231
bool check_column_privileges(uchar *arg) override
Check privileges of base table column.
Definition: item.cc:1163
bool collect_item_field_or_ref_processor(uchar *arg) override
When collecting information about columns when transforming correlated scalar subqueries using derive...
Definition: item.cc:855
bool check_column_in_window_functions(uchar *arg) override
Check if this column is found in PARTITION clause of all the window functions.
Definition: item.cc:1012
bool eq(const Item *item, bool binary_cmp) const override
Definition: item.cc:3092
bool find_field_processor(uchar *arg) override
Is this an Item_field which references the given Field argument?
Definition: item.h:4341
bool get_date(MYSQL_TIME *ltime, my_time_flags_t fuzzydate) override
Definition: item.cc:3070
Item * safe_charset_converter(THD *thd, const CHARSET_INFO *tocs) override
Definition: item.cc:5928
bool alias_name_used() const override
Definition: item.h:4441
bool any_privileges
Definition: item.h:4266
bool check_partition_func_processor(uchar *) override
Check if a partition function is allowed.
Definition: item.h:4354
void set_item_equal(Item_equal *item_equal_arg)
Definition: item.h:4235
enum Type type() const override
Definition: item.h:4284
bool add_field_to_cond_set_processor(uchar *) override
Item::walk function.
Definition: item.cc:894
Item_result numeric_context_result_type() const override
Result type when an item appear in a numeric context.
Definition: item.h:4302
void set_item_equal_all_join_nests(Item_equal *item_equal)
Definition: item.h:4241
Item_equal * item_equal_all_join_nests
Definition: item.h:4256
void set_field(Field *field)
Definition: item.cc:2881
Item_result cast_to_int_type() const override
Definition: item.h:4306
const Item_field * base_item_field() const
Definition: item.h:4320
bool collect_item_field_processor(uchar *arg) override
Store the pointer to this item field into a list if not already there.
Definition: item.cc:828
Item * replace_with_derived_expr_ref(uchar *arg) override
Assuming this expression is part of a condition that would be pushed to the HAVING clause of a materi...
Definition: item.cc:1076
uint16 field_index
Index for this field in table->field array.
Definition: item.h:4233
const CHARSET_INFO * charset_for_protocol(void) override
Definition: item.h:4387
bool subst_argument_checker(uchar **arg) override
Check whether a field can be substituted by an equal item.
Definition: item.cc:6042
void print(const THD *thd, String *str, enum_query_type query_type) const override
This method is used for to:
Definition: item.cc:7906
Field * result_field
Result field.
Definition: item.h:4198
Item_result result_type() const override
Definition: item.h:4301
uint32 max_disp_length()
Definition: item.h:4372
void dbug_print() const
Definition: item.h:4392
double val_real() override
Definition: item.cc:3028
bool find_item_in_field_list_processor(uchar *arg) override
Check if an Item_field references some field from a list of fields.
Definition: item.cc:923
void save_org_in_field(Field *field) override
Set a field's value from a item.
Definition: item.cc:6583
void make_field(Send_field *tmp_field) override
Definition: item.cc:6529
bool get_time(MYSQL_TIME *ltime) override
Definition: item.cc:3078
void set_base_item_field(const Item_field *item)
Definition: item.h:4316
bool get_timeval(my_timeval *tm, int *warnings) override
Get timestamp in "struct timeval" format.
Definition: item.cc:3086
enum_monotonicity_info get_monotonicity_info() const override
Definition: item.h:4309
float get_cond_filter_default_probability(double max_distinct_values, float default_filter) const
Returns the probability for the predicate "col OP <val>" to be true for a row in the case where no in...
Definition: item.cc:7947
Item_field * field_for_view_update() override
Definition: item.h:4373
const Item_field * m_base_item_field
If this field is derived from another field, e.g.
Definition: item.h:4220
void set_result_field(Field *field_arg) override
Definition: item.h:4313
bool send(Protocol *protocol, String *str_arg) override
This is only called from items that is not of type item_field.
Definition: item.cc:7871
int fix_outer_field(THD *thd, Field **field, Item **reference)
Resolve the name of an outer select column reference.
Definition: item.cc:5250
Table_ref * table_ref
Table containing this resolved field.
Definition: item.h:4192
table_map used_tables() const override
Definition: item.cc:3128
bool is_null() override
The method allows to determine nullness of a complex expression without fully evaluating it,...
Definition: item.h:4326
Item_equal * item_equal
Used during optimization to perform multiple equality analysis, this analysis should be performed dur...
Definition: item.h:4228
void reset_field()
Reset all aspect of a field object, so that it can be re-resolved.
Definition: item.cc:5970
Field * field
Source field.
Definition: item.h:4194
Item * update_value_transformer(uchar *select_arg) override
Add the field to the select list and substitute it for the reference to the field.
Definition: item.cc:7892
bool check_column_in_group_by(uchar *arg) override
Check if this column is found in GROUP BY.
Definition: item.cc:1046
uint32_t last_org_destination_field_memcpyable
Definition: item.h:4212
bool returns_array() const override
Whether the item returns array of its data type.
Definition: item.h:4448
Item * replace_item_field(uchar *) override
If this field is the target is the target of replacement, replace it with the info object's item or,...
Definition: item.cc:6140
longlong val_date_temporal() override
Return date value of item in packed longlong format.
Definition: item.cc:3046
void bind_fields() override
Bind objects from the current execution context to field objects in item trees.
Definition: item.cc:5899
void set_can_use_prefix_key() override
Definition: item.h:4450
uint32_t last_destination_field_memcpyable
Definition: item.h:4213
Item * equal_fields_propagator(uchar *arg) override
If field matches a multiple equality, set a pointer to that object in the field.
Definition: item.cc:6099
longlong val_time_temporal() override
Return time value of item in packed longlong format.
Definition: item.cc:3040
String * val_str(String *) override
Definition: item.cc:3013
Item * get_tmp_table_item(THD *thd) override
If an Item is materialized in a temporary table, a different Item may have to be used in the part of ...
Definition: item.cc:3219
my_decimal * val_decimal(my_decimal *) override
Definition: item.cc:3064
Field::geometry_type get_geometry_type() const override
Definition: item.h:4383
Access_bitmask have_privileges
Definition: item.h:4264
bool add_field_to_set_processor(uchar *arg) override
Item::walk function.
Definition: item.cc:885
Item * replace_with_derived_expr(uchar *arg) override
Assuming this expression is part of a condition that would be pushed to the WHERE clause of a materia...
Definition: item.cc:1059
bool strip_db_table_name_processor(uchar *) override
Generated fields don't need db/table names.
Definition: item.cc:10861
bool remove_column_from_bitmap(uchar *arg) override
Visitor interface for removing all column expressions (Item_field) in this expression tree from a bit...
Definition: item.cc:901
bool is_outer_field() const override
Definition: item.h:4379
bool repoint_const_outer_ref(uchar *arg) override
If this object is the real_item of an Item_ref, repoint the result_field to field.
Definition: item.cc:10850
bool no_constant_propagation
If true, the optimizer's constant propagation will not replace this item with an equal constant.
Definition: item.h:4259
bool val_json(Json_wrapper *result) override
Get a JSON value from an Item.
Definition: item.cc:3020
bool collect_item_field_or_view_ref_processor(uchar *arg) override
Collects fields and view references that have the qualifying table in the specified query block.
Definition: item.cc:872
bool is_valid_for_pushdown(uchar *arg) override
Check if all the columns present in this expression are from the derived table.
Definition: item.cc:934
Item_ident super
Definition: item.h:4166
virtual bool is_asterisk() const
Checks if the current object represents an asterisk select list item.
Definition: item.h:4461
Field * tmp_table_field(TABLE *) override
Definition: item.h:4315
bool can_use_prefix_key
Definition: item.h:4271
void fix_after_pullout(Query_block *parent_query_block, Query_block *removed_query_block) override
Fix after tables have been moved from one query_block level to the parent level, e....
Definition: item.h:4170
Item_field(Name_resolution_context *context_arg, const char *db_arg, const char *table_name_arg, const char *field_name_arg)
Constructor used for internal information queries.
Definition: item.cc:2738
type_conversion_status save_in_field_inner(Field *field, bool no_conversions) override
Helper function which does all of the work for save_in_field(Field*, bool), except some error checkin...
Definition: item.cc:6598
longlong val_date_temporal_at_utc() override
Definition: item.cc:3058
void cleanup() override
Called for every Item after use (preparation and execution).
Definition: item.cc:5933
longlong val_int() override
Definition: item.cc:3034
float get_filtering_effect(THD *thd, table_map filter_for_table, table_map read_tables, const MY_BITMAP *fields_to_ignore, double rows_in_table) override
Calculate condition filtering effect for "WHERE field", which implicitly means "WHERE field <> 0".
Definition: item.cc:7935
longlong val_time_temporal_at_utc() override
Definition: item.cc:3052
Field * last_org_destination_field
Definition: item.h:4210
bool used_tables_for_level(uchar *arg) override
Return used table information for the specified query block (level).
Definition: item.cc:3134
TYPELIB * get_typelib() const override
Get the typelib information for an item of type set or enum.
Definition: item.cc:3009
bool mark_field_in_map(uchar *arg) override
Mark underlying field in read or write map of a table.
Definition: item.h:4345
bool check_function_as_value_generator(uchar *args) override
Check if this item is allowed for a virtual column or inside a default expression.
Definition: item.cc:1110
bool disable_constant_propagation(uchar *) override
Definition: item.h:4367
bool replace_field_processor(uchar *arg) override
A processor that replaces any Fields with a Create_field_wrapper.
Definition: sql_table.cc:7516
Field * last_destination_field
Definition: item.h:4211
Field * get_tmp_table_field() override
If this Item is being materialized into a temporary table, returns the field that is being materializ...
Definition: item.h:4314
bool itemize(Parse_context *pc, Item **res) override
The same as contextualize() but with additional parameter.
Definition: item.cc:2773
Item_equal * find_item_equal(COND_EQUAL *cond_equal) const
Find a field among specified multiple equalities.
Definition: item.cc:5998
longlong val_int_endpoint(bool left_endp, bool *incl_endp) override
Definition: item.cc:3230
bool fix_fields(THD *, Item **) override
Resolve the name of a column reference.
Definition: item.cc:5689
Item_num super
Definition: item.h:5160
longlong val_int() override
Definition: item.h:5213
Name_string presentation
Definition: item.h:5162
bool get_date(MYSQL_TIME *ltime, my_time_flags_t fuzzydate) override
Definition: item.h:5224
Item_float(double value_par, uint decimal_par)
Definition: item.h:5193
Item_float(const POS &pos, const Name_string name_arg, double val_arg, uint decimal_par, uint length)
Definition: item.h:5182
Item * clone_item() const override
Definition: item.h:5230
void init(const char *str_arg, uint length)
This function is only called during parsing:
Definition: item.cc:6970
Item_float(const char *str_arg, uint length)
Definition: item.h:5167
double val_real() override
Definition: item.h:5209
type_conversion_status save_in_field_inner(Field *field, bool no_conversions) override
Helper function which does all of the work for save_in_field(Field*, bool), except some error checkin...
Definition: item.cc:6987
void print(const THD *thd, String *str, enum_query_type query_type) const override
This method is used for to:
Definition: item.cc:6995
bool eq(const Item *, bool binary_cmp) const override
Definition: item.cc:7017
bool get_time(MYSQL_TIME *ltime) override
Definition: item.h:5227
Item_num * neg() override
Definition: item.h:5233
String * val_str(String *) override
Definition: item.cc:3410
my_decimal * val_decimal(my_decimal *) override
Definition: item.cc:3417
double value
Definition: item.h:5165
Item_float(const Name_string name_arg, double val_arg, uint decimal_par, uint length)
Definition: item.h:5172
Item_float(const POS &pos, const char *str_arg, uint length)
Definition: item.h:5168
enum Type type() const override
Definition: item.h:5208
void print(const THD *, String *str, enum_query_type) const override
This method is used for to:
Definition: item.h:5250
const Name_string func_name
Definition: item.h:5243
Item * safe_charset_converter(THD *thd, const CHARSET_INFO *tocs) override
Definition: item.cc:1337
Item_func_pi(const POS &pos)
Definition: item.h:5246
Item * safe_charset_converter(THD *thd, const CHARSET_INFO *tocs) override
Definition: item.cc:7209
uint decimal_precision() const override
Definition: item.cc:7062
Item_result result_type() const override
Definition: item.h:5577
Item_result cast_to_int_type() const override
Definition: item.h:5581
my_decimal * val_decimal(my_decimal *) override
Definition: item.cc:7137
void hex_string_init(const char *str, uint str_length)
Definition: item.cc:7088
Item_result numeric_context_result_type() const override
Result type when an item appear in a numeric context.
Definition: item.h:5578
bool get_time(MYSQL_TIME *ltime) override
Definition: item.h:5574
enum Type type() const override
Definition: item.h:5557
bool get_date(MYSQL_TIME *ltime, my_time_flags_t fuzzydate) override
Definition: item.h:5571
Item_hex_string()
Definition: item.cc:7035
longlong val_int() override
Definition: item.cc:7098
Item_basic_constant super
Definition: item.h:5542
Item * clone_item() const override
Definition: item.h:5563
static LEX_CSTRING make_hex_str(const char *str, size_t str_length)
Definition: item.cc:7046
type_conversion_status save_in_field_inner(Field *field, bool no_conversions) override
Helper function which does all of the work for save_in_field(Field*, bool), except some error checkin...
Definition: item.cc:7145
double val_real() override
Definition: item.h:5558
bool eq(const Item *item, bool binary_cmp) const override
Definition: item.cc:7198
String * val_str(String *) override
Definition: item.h:5566
void print(const THD *thd, String *str, enum_query_type query_type) const override
This method is used for to:
Definition: item.cc:7176
bool check_partition_func_processor(uchar *) override
Check if a partition function is allowed.
Definition: item.h:5586
Item_hex_string(const POS &pos)
Definition: item.h:5550
my_decimal * val_decimal(my_decimal *dec) override
Definition: item.h:4149
const CHARSET_INFO * charset_for_protocol() override
Definition: item.h:4157
Item_ident_for_show(Field *par_field, const char *db_arg, const char *table_name_arg)
Definition: item.h:4140
bool get_date(MYSQL_TIME *ltime, my_time_flags_t fuzzydate) override
Definition: item.h:4152
const char * table_name
Definition: item.h:4138
enum Type type() const override
Definition: item.h:4144
bool get_time(MYSQL_TIME *ltime) override
Definition: item.h:4155
longlong val_int() override
Definition: item.h:4147
double val_real() override
Definition: item.h:4146
Field * field
Definition: item.h:4136
String * val_str(String *str) override
Definition: item.h:4148
bool fix_fields(THD *thd, Item **ref) override
Definition: item.cc:2681
void make_field(Send_field *tmp_field) override
Definition: item.cc:2668
const char * db_name
Definition: item.h:4137
bool m_alias_of_expr
if this Item's name is alias of SELECT expression
Definition: item.h:3944
virtual bool alias_name_used() const
Definition: item.h:4125
const char * original_db_name() const
Definition: item.h:4054
void set_alias_of_expr()
Marks that this Item's name is alias of SELECT expression.
Definition: item.h:4109
bool is_strong_side_column_not_in_fd(uchar *arg) override
Definition: item.cc:10825
Item_ident(Name_resolution_context *context_arg, const char *db_name_arg, const char *table_name_arg, const char *field_name_arg)
Definition: item.h:3999
bool is_alias_of_expr() const
Definition: item.h:4107
Item_ident(THD *thd, Item_ident *item)
Constructor used by Item_field & Item_*_ref (see Item comment)
Definition: item.h:4031
Query_block * depended_from
Definition: item.h:3997
void fix_after_pullout(Query_block *parent_query_block, Query_block *removed_query_block) override
Fix after tables have been moved from one query_block level to the parent level, e....
Definition: item.cc:3153
const char * m_orig_field_name
Names the field in the source base table.
Definition: item.h:3943
Table_ref * cached_table
Definition: item.h:3996
void set_original_field_name(const char *name_arg)
Definition: item.h:4051
const char * m_orig_table_name
Names the original table that is the source of the field.
Definition: item.h:3933
const char * original_table_name() const
Definition: item.h:4055
void print(const THD *thd, String *str, enum_query_type query_type) const override
This method is used for to:
Definition: item.h:4063
Item_ident(const POS &pos, const char *db_name_arg, const char *table_name_arg, const char *field_name_arg)
Definition: item.h:4014
bool update_depended_from(uchar *) override
Definition: item.cc:803
const char * table_name
If column is from a non-aliased base table or view, name of base table or view.
Definition: item.h:3973
Name_resolution_context * context
For regularly resolved column references, 'context' points to a name resolution context object belong...
Definition: item.h:3959
friend bool insert_fields(THD *thd, Name_resolution_context *context, const char *db_name, const char *table_name, mem_root_deque< Item * >::iterator *it, bool any_privileges)
bool itemize(Parse_context *pc, Item **res) override
The same as contextualize() but with additional parameter.
Definition: item.cc:783
const char * db_name
Schema name of the base table or view the column is part of.
Definition: item.h:3965
const char * full_name() const override
Definition: item.cc:2937
bool aggregate_check_group(uchar *arg) override
Definition: item.cc:10820
bool is_column_not_in_fd(uchar *arg) override
Definition: item.cc:10833
const char * field_name
If column is aliased, the column alias name.
Definition: item.h:3987
void set_orignal_db_name(const char *name_arg)
Definition: item.h:4047
const char * original_field_name() const
Definition: item.h:4056
bool change_context_processor(uchar *arg) override
Definition: item.h:4101
void set_original_table_name(const char *name_arg)
Definition: item.h:4048
Item super
Definition: item.h:3904
const char * m_orig_db_name
The fields m_orig_db_name, m_orig_table_name and m_orig_field_name are maintained so that we can prov...
Definition: item.h:3923
bool aggregate_check_distinct(uchar *arg) override
Definition: item.cc:10772
Bool3 local_column(const Query_block *sl) const override
Tells if this is a column of a table whose qualifying query block is 'sl'.
Definition: item.cc:10739
Representation of IN subquery predicates of the form "left_expr IN (SELECT ...)".
Definition: item_subselect.h:526
Item_insert_value(Name_resolution_context *context_arg, Item *a)
Constructs an Item_insert_value that represents a derived table that wraps a table value constructor.
Definition: item.h:6512
bool check_function_as_value_generator(uchar *args) override
Check if this item is allowed for a virtual column or inside a default expression.
Definition: item.h:6540
bool eq(const Item *item, bool binary_cmp) const override
Definition: item.cc:9014
bool itemize(Parse_context *pc, Item **res) override
The same as contextualize() but with additional parameter.
Definition: item.h:6517
bool fix_fields(THD *, Item **) override
Resolve the name of a column reference.
Definition: item.cc:9019
Item_insert_value(const POS &pos, Item *a)
Constructs an Item_insert_value that represents a call to the deprecated VALUES function.
Definition: item.h:6503
uchar * m_rowbuffer_saved
Pointer to row buffer that was used to calculate field value offset.
Definition: item.h:6551
const bool m_is_values_function
This flag is true if the item represents a call to the deprecated VALUES function.
Definition: item.h:6557
type_conversion_status save_in_field_inner(Field *field_arg, bool no_conversions) override
Helper function which does all of the work for save_in_field(Field*, bool), except some error checkin...
Definition: item.h:6493
Item * arg
The argument for this function.
Definition: item.h:6549
bool walk(Item_processor processor, enum_walk walk, uchar *args) override
Traverses a tree of Items in prefix and/or postfix order.
Definition: item.h:6535
table_map used_tables() const override
Definition: item.h:6533
enum Type type() const override
Definition: item.h:6522
void bind_fields() override
Bind objects from the current execution context to field objects in item trees.
Definition: item.cc:9101
void print(const THD *thd, String *str, enum_query_type query_type) const override
This method is used for to:
Definition: item.cc:9129
void cleanup() override
Called for every Item after use (preparation and execution).
Definition: item.cc:9123
Item_int with value==0 and length==1.
Definition: item.h:5026
Item_int_0()
Definition: item.h:5028
Item_int_0(const POS &pos)
Definition: item.h:5029
Item * clone_item() const override
Definition: item.cc:6879
type_conversion_status save_in_field_inner(Field *field, bool no_conversions) override
Store this item's int-value in a field.
Definition: item.h:6197
const Item * real_item() const override
Definition: item.h:6211
Item_int_with_ref(enum_field_types field_type, longlong i, Item *ref_arg, bool unsigned_arg)
Definition: item.h:6203
Item * ref
Definition: item.h:6196
Item * real_item() override
Definition: item.h:6210
Item_result result_type() const override
Definition: item.h:4993
Item_int(const POS &pos, const LEX_STRING &num, int dummy_error=0)
Definition: item.h:4976
void print(const THD *thd, String *str, enum_query_type query_type) const override
This method is used for to:
Definition: item.cc:3261
bool get_time(MYSQL_TIME *ltime) override
Definition: item.h:5007
Item_int(longlong i, uint length=MY_INT64_NUM_DECIMAL_DIGITS)
Definition: item.h:4935
my_decimal * val_decimal(my_decimal *) override
Definition: item.cc:3249
bool check_function_as_value_generator(uchar *) override
Check if this item is allowed for a virtual column or inside a default expression.
Definition: item.h:5020
bool get_date(MYSQL_TIME *ltime, my_time_flags_t fuzzydate) override
Definition: item.h:5004
double val_real() override
Definition: item.h:4998
Item_int(const POS &pos, const char *str_arg, uint length)
Definition: item.h:4971
Item * clone_item() const override
Definition: item.h:5008
bool check_partition_func_processor(uchar *) override
Check if a partition function is allowed.
Definition: item.h:5019
Item_int(const POS &pos, const Name_string &name_arg, longlong i, uint length)
Definition: item.h:4960
longlong value
Definition: item.h:4922
Item_int(int32 i, uint length=MY_INT32_NUM_DECIMAL_DIGITS)
Definition: item.h:4923
type_conversion_status save_in_field_inner(Field *field, bool no_conversions) override
Store this item's int-value in a field.
Definition: item.cc:6842
void init(const char *str_arg, uint length)
Init an item from a string we KNOW points to a valid longlong.
Definition: item.cc:3240
uint decimal_precision() const override
Definition: item.h:5015
bool eq(const Item *, bool) const override
Definition: item.cc:6866
Item_int(const POS &pos, int32 i, uint length=MY_INT32_NUM_DECIMAL_DIGITS)
Definition: item.h:4929
Item_int(const Item_int *item_arg)
Definition: item.h:4947
Item_int(const char *str_arg, uint length)
Definition: item.h:4967
void set_max_size(uint length)
Definition: item.h:4982
String * val_str(String *) override
Definition: item.cc:3254
Item_num super
Definition: item.h:4919
enum Type type() const override
Definition: item.h:4992
Item_int(ulonglong i, uint length=MY_INT64_NUM_DECIMAL_DIGITS)
Definition: item.h:4940
Item_int(const Name_string &name_arg, longlong i, uint length)
Definition: item.h:4954
Item_num * neg() override
Definition: item.h:5011
longlong val_int() override
Definition: item.h:4994
A class that represents a constant JSON value.
Definition: item.h:7177
unique_ptr_destroy_only< Json_wrapper > m_value
Definition: item.h:7178
longlong val_int() override
Definition: item.cc:7299
Item_result result_type() const override
Definition: item.h:7187
bool get_date(MYSQL_TIME *ltime, my_time_flags_t) override
Definition: item.cc:7313
bool get_time(MYSQL_TIME *ltime) override
Definition: item.cc:7317
void print(const THD *, String *str, enum_query_type) const override
This method is used for to:
Definition: item.cc:7279
Item * clone_item() const override
Definition: item.cc:7321
Item_json(unique_ptr_destroy_only< Json_wrapper > value, const Item_name_string &name)
Definition: item.cc:7270
my_decimal * val_decimal(my_decimal *buf) override
Definition: item.cc:7309
bool val_json(Json_wrapper *result) override
Get a JSON value from an Item.
Definition: item.cc:7285
double val_real() override
Definition: item.cc:7297
String * val_str(String *str) override
Definition: item.cc:7301
enum Type type() const override
Definition: item.h:7184
Item * value_item
Definition: item.h:3832
enum Type type() const override
Definition: item.cc:1995
type_conversion_status save_in_field_inner(Field *field, bool no_conversions) override
Helper function which does all of the work for save_in_field(Field*, bool), except some error checkin...
Definition: item.h:3861
Item * name_item
Definition: item.h:3833
Item_result result_type() const override
Definition: item.h:3853
bool fix_fields(THD *, Item **) override
Definition: item.cc:2028
bool itemize(Parse_context *pc, Item **res) override
The same as contextualize() but with additional parameter.
Definition: item.cc:1947
bool is_null() override
The method allows to determine nullness of a complex expression without fully evaluating it,...
Definition: item.cc:1940
bool valid_args
Definition: item.h:3834
my_decimal * val_decimal(my_decimal *) override
Definition: item.cc:1923
bool cache_const_expr_analyzer(uchar **) override
Check if an item is a constant one and can be cached.
Definition: item.h:3855
longlong val_int() override
Definition: item.cc:1909
double val_real() override
Definition: item.cc:1902
Item_name_const(const POS &pos, Item *name_arg, Item *val)
Definition: item.cc:1942
Item super
Definition: item.h:3830
void print(const THD *thd, String *str, enum_query_type query_type) const override
This method is used for to:
Definition: item.cc:2055
bool get_time(MYSQL_TIME *ltime) override
Definition: item.cc:1935
bool get_date(MYSQL_TIME *ltime, my_time_flags_t fuzzydate) override
Definition: item.cc:1930
String * val_str(String *sp) override
Definition: item.cc:1916
Storage for Item names.
Definition: item.h:356
void set_autogenerated(bool is_autogenerated)
Set m_is_autogenerated flag to the given value.
Definition: item.h:367
bool is_autogenerated() const
Return the auto-generated flag.
Definition: item.h:373
void copy(const char *str_arg, size_t length_arg, const CHARSET_INFO *cs_arg, bool is_autogenerated_arg)
Copy name together with autogenerated flag.
Definition: item.cc:1249
Item_name_string()
Definition: item.h:361
Item_name_string(const Name_string name)
Definition: item.h:362
bool m_is_autogenerated
Definition: item.h:358
type_conversion_status save_in_field_inner(Field *field, bool no_conversions) override
Store null in field.
Definition: item.cc:6640
Item_null()
Definition: item.h:4533
bool send(Protocol *protocol, String *str) override
Pack data in buffer for sending.
Definition: item.cc:7266
void print(const THD *, String *str, enum_query_type query_type) const override
This method is used for to:
Definition: item.h:4563
bool get_date(MYSQL_TIME *, my_time_flags_t) override
Definition: item.h:4555
Item_basic_constant super
Definition: item.h:4517
Item_result result_type() const override
Definition: item.h:4559
Item_null(const POS &pos)
Definition: item.h:4537
bool check_partition_func_processor(uchar *) override
Check if a partition function is allowed.
Definition: item.h:4569
Item * clone_item() const override
Definition: item.h:4560
longlong val_time_temporal() override
Return time value of item in packed longlong format.
Definition: item.h:4551
longlong val_date_temporal() override
Return date value of item in packed longlong format.
Definition: item.h:4552
bool is_null() override
The method allows to determine nullness of a complex expression without fully evaluating it,...
Definition: item.h:4561
bool get_time(MYSQL_TIME *) override
Definition: item.h:4556
double val_real() override
Definition: item.cc:3582
longlong val_int() override
Definition: item.cc:3588
Item * safe_charset_converter(THD *thd, const CHARSET_INFO *tocs) override
Definition: item.cc:3609
Item_null(const Name_string &name_par)
Definition: item.h:4542
bool val_json(Json_wrapper *wr) override
Get a JSON value from an Item.
Definition: item.cc:3604
String * val_str(String *str) override
Definition: item.cc:3595
my_decimal * val_decimal(my_decimal *) override
Definition: item.cc:3602
enum Type type() const override
Definition: item.h:4547
bool eq(const Item *item, bool binary_cmp) const override
Definition: item.cc:3578
void init()
Definition: item.h:4519
virtual Item_num * neg()=0
Item * safe_charset_converter(THD *thd, const CHARSET_INFO *tocs) override
Definition: item.cc:1301
Item_basic_constant super
Definition: item.h:3890
bool check_partition_func_processor(uchar *) override
Check if a partition function is allowed.
Definition: item.h:3898
Item_num()
Definition: item.h:3893
Item_num(const POS &pos)
Definition: item.h:3894
bool fix_fields(THD *, Item **) override
Prepare referenced outer field then call usual Item_ref::fix_fields.
Definition: item.cc:8616
Item * replace_outer_ref(uchar *) override
Definition: item.cc:8678
Query_block * qualifying
Qualifying query of this outer ref (i.e.
Definition: item.h:6100
bool found_in_select_list
Definition: item.h:6110
Ref_Type ref_type() const override
Definition: item.h:6142
Item * outer_ref
Definition: item.h:6103
Item_outer_ref(Name_resolution_context *context_arg, Item_ident *ident_arg, Query_block *qualifying)
Definition: item.h:6111
Item_ref super
Definition: item.h:6093
Item_outer_ref(Name_resolution_context *context_arg, Item **item, const char *db_name_arg, const char *table_name_arg, const char *field_name_arg, bool alias_of_expr_arg, Query_block *qualifying)
Definition: item.h:6124
table_map not_null_tables() const override
Return table map of tables that can't be NULL tables (tables that are used in a context where if they...
Definition: item.h:6140
table_map used_tables() const override
Definition: item.h:6137
void fix_after_pullout(Query_block *parent_query_block, Query_block *removed_query_block) override
Fix after tables have been moved from one query_block level to the parent level, e....
Definition: item.cc:8667
Item_sum * in_sum_func
Definition: item.h:6105
Dynamic parameters used as placeholders ('?') inside prepared statements.
Definition: item.h:4574
void set_data_type_actual(enum_field_types data_type, bool unsigned_val)
For use with all field types, especially integer types.
Definition: item.h:4800
enum_field_types data_type_source() const
Definition: item.h:4804
void reset()
Resets parameter after execution.
Definition: item.cc:4066
void set_null()
Definition: item.cc:3831
bool set_value(THD *, sp_rcontext *, Item **it) override
This operation is intended to store some item value in Item_param to be used later.
Definition: item.cc:4770
const String * query_val_str(const THD *thd, String *str) const
Return Param item values in string format, for generating the dynamic query used in update/binary log...
Definition: item.cc:4344
bool m_json_as_scalar
If true, when retrieving JSON data, attempt to interpret a string value as a scalar JSON value,...
Definition: item.h:4723
bool is_type_inherited() const
Definition: item.h:4752
my_decimal * val_decimal(my_decimal *) override
Definition: item.cc:4216
double real
Definition: item.h:4615
void set_param_state(enum enum_item_param_state state)
Definition: item.h:4593
bool is_type_pinned() const
Definition: item.h:4758
Mem_root_array< Item_param * > m_clones
If a query expression's text QT or text of a condition (CT) that is pushed down to a derived table,...
Definition: item.h:4915
type_conversion_status save_in_field_inner(Field *field, bool no_conversions) override
Helper function which does all of the work for save_in_field(Field*, bool), except some error checkin...
Definition: item.cc:4079
String * val_str(String *) override
Definition: item.cc:4245
void sync_clones()
This should be called after any modification done to this Item, to propagate the said modification to...
Definition: item.cc:3803
void set_collation_actual(const CHARSET_INFO *coll)
Definition: item.h:4767
bool val_json(Json_wrapper *result) override
Get a JSON value from an Item.
Definition: item.cc:4281
void set_out_param_info(Send_field *info) override
Setter of Item_param::m_out_param_info.
Definition: item.cc:4834
bool set_from_user_var(THD *thd, const user_var_entry *entry)
Set parameter value from user variable value.
Definition: item.cc:4004
Item_result m_result_type
Result type of parameter.
Definition: item.h:4708
uint pos_in_query
Definition: item.h:4739
bool is_unsigned_actual() const
Definition: item.h:4761
union Item_param::@51 value
void set_data_type_source(enum_field_types data_type, bool unsigned_val)
Definition: item.h:4791
bool add_clone(Item_param *i)
Definition: item.h:4866
bool is_null() override
The method allows to determine nullness of a complex expression without fully evaluating it,...
Definition: item.h:4836
longlong integer
Definition: item.h:4614
void pin_data_type() override
Pin the currently resolved data type for this parameter.
Definition: item.h:4755
const CHARSET_INFO * m_collation_source
The character set and collation of the source parameter value.
Definition: item.h:4698
bool is_non_const_over_literals(uchar *) override
Definition: item.h:4860
String str_value_ptr
Definition: item.h:4611
MYSQL_TIME time
Definition: item.h:4616
const Send_field * get_out_param_info() const override
Getter of Item_param::m_out_param_info.
Definition: item.cc:4853
Item * safe_charset_converter(THD *thd, const CHARSET_INFO *tocs) override
Definition: item.cc:1388
enum_field_types data_type_actual() const
Definition: item.h:4806
my_decimal decimal_value
Definition: item.h:4612
Settable_routine_parameter * get_settable_routine_parameter() override
Definition: item.h:4869
Item_result result_type() const override
Definition: item.h:4745
enum_field_types m_data_type_actual
The actual data type of the parameter value provided by the user.
Definition: item.h:4689
void set_decimal(const char *str, ulong length)
Set decimal parameter value from string.
Definition: item.cc:3875
void make_field(Send_field *field) override
Fill meta-data information for the corresponding column in a result set.
Definition: item.cc:4865
bool is_valid_for_pushdown(uchar *arg) override
Check if all the columns present in this expression are from the derived table.
Definition: item.h:4888
enum_item_param_state
Definition: item.h:4582
@ STRING_VALUE
Definition: item.h:4587
@ DECIMAL_VALUE
Definition: item.h:4590
@ NO_VALUE
Definition: item.h:4583
@ REAL_VALUE
Definition: item.h:4586
@ TIME_VALUE
holds TIME, DATE, DATETIME
Definition: item.h:4588
@ LONG_DATA_VALUE
Definition: item.h:4589
@ INT_VALUE
Definition: item.h:4585
@ NULL_VALUE
Definition: item.h:4584
bool get_date(MYSQL_TIME *tm, my_time_flags_t fuzzydate) override
Definition: item.cc:4125
enum_field_types m_data_type_source
Parameter objects have a rather complex handling of data type, in order to consistently handle requir...
Definition: item.h:4668
bool itemize(Parse_context *pc, Item **item) override
The same as contextualize() but with additional parameter.
Definition: item.cc:3623
enum Type type() const override
Definition: item.h:4746
enum_item_param_state m_param_state
m_param_state is used to indicate that no parameter value is available with NO_VALUE,...
Definition: item.h:4717
bool check_function_as_value_generator(uchar *args) override
Check if this item is allowed for a virtual column or inside a default expression.
Definition: item.h:4882
void set_int(longlong i)
Definition: item.cc:3840
void print(const THD *thd, String *str, enum_query_type query_type) const override
This method is used for to:
Definition: item.cc:4709
bool convert_value()
Convert value according to the following rules:
Definition: item.cc:4406
void set_data_type_inherited() override
Set the currently resolved data type for this parameter as inherited.
Definition: item.h:4749
const CHARSET_INFO * collation_actual() const
Definition: item.h:4775
bool fix_fields(THD *thd, Item **ref) override
Definition: item.cc:3675
bool get_time(MYSQL_TIME *tm) override
Definition: item.cc:4107
Send_field * m_out_param_info
Definition: item.h:4894
void set_collation_source(const CHARSET_INFO *coll)
Definition: item.h:4763
const CHARSET_INFO * collation_source() const
Definition: item.h:4772
longlong val_int() override
Definition: item.cc:4182
bool set_str(const char *str, size_t length)
Definition: item.cc:3935
bool m_unsigned_actual
Used when actual value is integer to indicate whether value is unsigned.
Definition: item.h:4691
bool m_type_inherited
True if type of parameter is inherited from parent object (like a typecast).
Definition: item.h:4626
double val_real() override
Definition: item.cc:4143
void set_time(MYSQL_TIME *tm, enum_mysql_timestamp_type type)
Set parameter value from MYSQL_TIME value.
Definition: item.cc:3903
enum_field_types actual_data_type() const override
Retrieve actual data type for an item.
Definition: item.h:4808
enum enum_item_param_state param_state() const
Definition: item.h:4597
Item * clone_item() const override
Definition: item.cc:4681
const CHARSET_INFO * m_collation_actual
The character set and collation of the value stored in str_value, possibly after being converted from...
Definition: item.h:4706
void set_param_type_and_swap_value(Item_param *from)
Preserve the original parameter types and values when re-preparing a prepared statement.
Definition: item.cc:4743
bool m_type_pinned
True if type of parameter has been pinned, attempt to use an incompatible actual type will cause erro...
Definition: item.h:4637
bool eq(const Item *item, bool binary_cmp) const override
Definition: item.cc:4705
bool propagate_type(THD *thd, const Type_properties &type) override
Propagate data type specifications into parameters and user variables.
Definition: item.cc:3729
void set_double(double i)
Definition: item.cc:3856
void mark_json_as_scalar() override
For Items with data type JSON, mark that a string argument is treated as a scalar JSON value.
Definition: item.h:4599
bool set_longdata(const char *str, ulong length)
Definition: item.cc:3963
void copy_param_actual_type(Item_param *from)
Definition: item.cc:4292
Item_param(const POS &pos, MEM_ROOT *root, uint pos_in_query_arg)
Definition: item.cc:3616
table_map used_tables() const override
Definition: item.h:4833
void set_data_type_actual(enum_field_types data_type)
Definition: item.h:4796
Item super
Definition: item.h:4575
Item_partition_func_safe_string(const Name_string name, size_t length, const CHARSET_INFO *cs=nullptr)
Definition: item.h:5489
my_decimal * val_decimal(my_decimal *) override
Definition: item.cc:4925
bool val_bool() override
Definition: item.cc:4931
String * val_str(String *s) override
Definition: item.cc:4937
bool get_date(MYSQL_TIME *ltime, my_time_flags_t fuzzydate) override
Definition: item.cc:4943
Item_in_subselect * owner
Definition: item.h:6160
Item_ref_null_helper(Name_resolution_context *context_arg, Item_in_subselect *master, Item **item)
Definition: item.h:6163
longlong val_date_temporal() override
Return date value of item in packed longlong format.
Definition: item.cc:4919
longlong val_time_temporal() override
Return time value of item in packed longlong format.
Definition: item.cc:4913
longlong val_int() override
Definition: item.cc:4907
void print(const THD *thd, String *str, enum_query_type query_type) const override
This method is used for to:
Definition: item.cc:8537
Item_ref super
Definition: item.h:6157
double val_real() override
Definition: item.cc:4901
table_map used_tables() const override
Definition: item.h:6179
Item * compile(Item_analyzer analyzer, uchar **arg_p, Item_transformer transformer, uchar *arg_t) override
Compile an Item_ref object with a processor and a transformer callback function.
Definition: item.cc:8386
void update_used_tables() override
Updates used tables, not null tables information and accumulates properties up the item tree,...
Definition: item.h:5806
bool created_by_in2exists() const override
Whether this Item was created by the IN->EXISTS subquery transformation.
Definition: item.h:5916
bool is_null() override
The method allows to determine nullness of a complex expression without fully evaluating it,...
Definition: item.cc:8473
bool collect_item_field_or_ref_processor(uchar *arg) override
Definition: item.cc:8548
bool is_result_field() const override
Definition: item.h:5827
void set_properties()
Definition: item.cc:8320
table_map used_tables() const override
Definition: item.h:5798
Item_field * field_for_view_update() override
Definition: item.h:5870
bool eq(const Item *item, bool binary_cmp) const override
Definition: item.h:5767
longlong val_time_temporal() override
Return time value of item in packed longlong format.
Definition: item.cc:8436
Item_ref(Name_resolution_context *context_arg, const char *db_name_arg, const char *table_name_arg, const char *field_name_arg)
Definition: item.h:5725
type_conversion_status save_in_field_inner(Field *field, bool no_conversions) override
Helper function which does all of the work for save_in_field(Field*, bool), except some error checkin...
Definition: item.cc:8493
Item_ref(THD *thd, Item_ref *item)
Definition: item.h:5753
Item ** addr(uint i) override
Definition: item.h:5884
void traverse_cond(Cond_traverser traverser, void *arg, traverse_order order) override
Definition: item.h:5850
Item * get_tmp_table_item(THD *thd) override
If an Item is materialized in a temporary table, a different Item may have to be used in the part of ...
Definition: item.cc:8517
bool clean_up_after_removal(uchar *arg) override
Clean up after removing the item from the item tree.
Definition: item.cc:7998
bool fix_fields(THD *, Item **) override
Resolve the name of a reference to a column reference.
Definition: item.cc:8081
bool check_function_as_value_generator(uchar *args) override
Check if this item is allowed for a virtual column or inside a default expression.
Definition: item.h:5922
bool is_valid_for_pushdown(uchar *arg) override
Check if all the columns present in this expression are from the derived table.
Definition: item.h:5931
Item_result result_type() const override
Definition: item.h:5789
void make_field(Send_field *field) override
Definition: item.cc:8501
void bring_value() override
Definition: item.h:5897
uint cols() const override
Definition: item.h:5876
Item ** ref_pointer() const
Definition: item.h:5762
bool val_json(Json_wrapper *result) override
Get a JSON value from an Item.
Definition: item.cc:8466
bool val_bool() override
Definition: item.cc:8452
bool is_outer_field() const override
Definition: item.h:5910
bool null_inside() override
Definition: item.h:5893
void set_result_field(Field *field) override
Definition: item.h:5826
bool get_time(MYSQL_TIME *ltime) override
Definition: item.h:5901
void print(const THD *thd, String *str, enum_query_type query_type) const override
This method is used for to:
Definition: item.cc:8403
Item * real_item() override
Definition: item.h:5829
longlong val_date_temporal() override
Return date value of item in packed longlong format.
Definition: item.cc:8444
Field * get_tmp_table_field() override
If this Item is being materialized into a temporary table, returns the field that is being materializ...
Definition: item.h:5793
Item_result cast_to_int_type() const override
Definition: item.h:5928
Ref_Type
Definition: item.h:5712
@ VIEW_REF
Definition: item.h:5712
@ REF
Definition: item.h:5712
@ AGGREGATE_REF
Definition: item.h:5712
@ OUTER_REF
Definition: item.h:5712
String * val_str(String *tmp) override
Definition: item.cc:8459
Field * result_field
Definition: item.h:5718
bool explain_subquery_checker(uchar **) override
Definition: item.h:5857
void link_referenced_item()
Definition: item.h:5764
bool check_column_in_window_functions(uchar *arg) override
Check if all the columns present in this expression are present in PARTITION clause of window functio...
Definition: item.h:5934
bool is_non_const_over_literals(uchar *) override
Definition: item.h:5921
void cleanup() override
Called for every Item after use (preparation and execution).
Definition: item.cc:8340
const Item * real_item() const override
Definition: item.h:5834
Item_ref(const POS &pos, const char *db_name_arg, const char *table_name_arg, const char *field_name_arg)
Definition: item.h:5728
Field * get_result_field() const override
Definition: item.h:5828
TYPELIB * get_typelib() const override
Get the typelib information for an item of type set or enum.
Definition: item.h:5791
bool walk(Item_processor processor, enum_walk walk, uchar *arg) override
Traverses a tree of Items in prefix and/or postfix order.
Definition: item.h:5840
enum Type type() const override
Definition: item.h:5766
bool send(Protocol *prot, String *tmp) override
This is only called from items that is not of type item_field.
Definition: item.cc:8418
bool pusheddown_depended_from
Definition: item.h:5715
bool check_column_in_group_by(uchar *arg) override
Check if all the columns present in this expression are present in GROUP BY clause of the derived tab...
Definition: item.h:5937
void fix_after_pullout(Query_block *parent_query_block, Query_block *removed_query_block) override
Fix after tables have been moved from one query_block level to the parent level, e....
Definition: item.cc:8684
virtual Ref_Type ref_type() const
Definition: item.h:5873
bool basic_const_item() const override
Returns true if this is a simple constant item like an integer, not a constant expression.
Definition: item.h:5908
Item * transform(Item_transformer, uchar *arg) override
Transform an Item_ref object with a transformer callback function.
Definition: item.cc:8356
bool repoint_const_outer_ref(uchar *arg) override
The aim here is to find a real_item() which is of type Item_field.
Definition: item.cc:10841
table_map not_null_tables() const override
Return table map of tables that can't be NULL tables (tables that are used in a context where if they...
Definition: item.h:5816
Item * element_index(uint i) override
Definition: item.h:5880
bool check_cols(uint c) override
Definition: item.h:5888
Item ** m_ref_item
Indirect pointer to the referenced item.
Definition: item.h:5722
longlong val_int() override
Definition: item.cc:8429
Item * ref_item() const
Definition: item.h:5759
my_decimal * val_decimal(my_decimal *) override
Definition: item.cc:8487
bool get_date(MYSQL_TIME *ltime, my_time_flags_t fuzzydate) override
Definition: item.cc:8480
double val_real() override
Definition: item.cc:8422
Item with result field.
Definition: item.h:5628
Item_result_field(const POS &pos)
Definition: item.h:5633
Field * tmp_table_field(TABLE *) override
Definition: item.h:5639
Field * result_field
Definition: item.h:5630
int raise_decimal_overflow()
Definition: item.h:5699
longlong raise_integer_overflow()
Definition: item.h:5694
Field * get_tmp_table_field() override
If this Item is being materialized into a temporary table, returns the field that is being materializ...
Definition: item.h:5638
Item_result_field(THD *thd, const Item_result_field *item)
Definition: item.h:5636
virtual bool resolve_type(THD *thd)=0
Resolve type-related information for this item, such as result field type, maximum size,...
longlong llrint_with_overflow_check(double realval)
Definition: item.h:5679
bool mark_field_in_map(uchar *arg) override
Mark underlying field in read or write map of a table.
Definition: item.h:5671
bool check_function_as_value_generator(uchar *) override
Check if this item is allowed for a virtual column or inside a default expression.
Definition: item.h:5670
void cleanup() override
Called for every Item after use (preparation and execution).
Definition: item.cc:10680
void raise_numeric_overflow(const char *type_name)
Definition: item.cc:10686
Item_result_field()=default
double raise_float_overflow()
Definition: item.h:5689
bool is_result_field() const override
Definition: item.h:5654
table_map used_tables() const override
Definition: item.h:5640
void set_result_field(Field *field) override
Definition: item.h:5653
virtual const char * func_name() const =0
Field * get_result_field() const override
Definition: item.h:5655
Item_return_int(const char *name_arg, uint length, enum_field_types field_type_arg, longlong value_arg=0)
Definition: item.h:5532
Definition: item_subselect.h:279
bool is_valid_for_pushdown(uchar *arg) override
Check if all the columns present in this expression are from the derived table.
Definition: item.h:3692
Item_sp_variable(const Name_string sp_var_name)
Definition: item.cc:1706
Name_string m_name
Definition: item.h:3659
bool get_date(MYSQL_TIME *ltime, my_time_flags_t fuzzydate) override
Definition: item.cc:1790
bool val_json(Json_wrapper *result) override
Get a JSON value from an Item.
Definition: item.cc:1782
String * val_str(String *sp) override
Definition: item.cc:1741
bool fix_fields(THD *thd, Item **) override
Definition: item.cc:1709
my_decimal * val_decimal(my_decimal *decimal_value) override
Definition: item.cc:1774
void make_field(Send_field *field) override
Definition: item.h:3706
type_conversion_status save_in_field_inner(Field *field, bool no_conversions) override
Helper function which does all of the work for save_in_field(Field*, bool), except some error checkin...
Definition: item.h:3712
double val_real() override
Definition: item.cc:1725
longlong val_int() override
Definition: item.cc:1733
table_map used_tables() const override
Definition: item.h:3673
bool get_time(MYSQL_TIME *ltime) override
Definition: item.cc:1796
bool send(Protocol *protocol, String *str) override
This is only called from items that is not of type item_field.
Definition: item.h:3687
sp_head * m_sp
Definition: item.h:3667
bool is_null() override
The method allows to determine nullness of a complex expression without fully evaluating it,...
Definition: item.cc:1802
bool limit_clause_param
Definition: item.h:3736
Item_result result_type() const override
Definition: item.h:3774
bool set_value(THD *thd, sp_rcontext *ctx, Item **it) override
Definition: item.cc:1861
uint len_in_query
Definition: item.h:3755
bool is_splocal() const override
Definition: item.h:3761
uint get_var_idx() const
Definition: item.h:3771
bool val_json(Json_wrapper *result) override
Get a JSON value from an Item.
Definition: item.cc:1842
uint m_var_idx
Definition: item.h:3724
Settable_routine_parameter * get_settable_routine_parameter() override
Definition: item.h:3781
enum Type type() const override
Definition: item.h:3773
uint pos_in_query
Definition: item.h:3747
Item * this_item() override
Definition: item.cc:1824
Item_splocal(const Name_string sp_var_name, uint sp_var_idx, enum_field_types sp_var_type, uint pos_in_q=0, uint len_in_q=0)
Definition: item.cc:1808
Item ** this_item_addr(THD *thd, Item **) override
Definition: item.cc:1836
void print(const THD *thd, String *str, enum_query_type query_type) const override
This method is used for to:
Definition: item.cc:1849
Type m_type
Definition: item.h:3726
Item_result m_result_type
Definition: item.h:3727
void print(const THD *, String *str, enum_query_type) const override
Definition: item.h:5473
Item_static_string_func(const Name_string &name_par, const char *str, size_t length, const CHARSET_INFO *cs, Derivation dv=DERIVATION_COERCIBLE)
Definition: item.h:5459
bool check_partition_func_processor(uchar *) override
Check if a partition function is allowed.
Definition: item.h:5477
bool check_function_as_value_generator(uchar *args) override
Check if this item is allowed for a virtual column or inside a default expression.
Definition: item.h:5478
Item * safe_charset_converter(THD *thd, const CHARSET_INFO *tocs) override
Definition: item.cc:1416
const Name_string func_name
Definition: item.h:5456
Item_static_string_func(const POS &pos, const Name_string &name_par, const char *str, size_t length, const CHARSET_INFO *cs, Derivation dv=DERIVATION_COERCIBLE)
Definition: item.h:5464
Item_string(const POS &pos, const char *str, size_t length, const CHARSET_INFO *cs, Derivation dv=DERIVATION_COERCIBLE, uint repertoire=MY_REPERTOIRE_UNICODE30)
Definition: item.h:5299
String * val_str(String *) override
Definition: item.h:5380
Item_string(const char *str, size_t length, const CHARSET_INFO *cs, Derivation dv=DERIVATION_COERCIBLE, uint repertoire=MY_REPERTOIRE_UNICODE30)
Definition: item.h:5293
void set_cs_specified(bool cs_specified)
Set the value of m_cs_specified attribute.
Definition: item.h:5439
bool eq(const Item *item, bool binary_cmp) const override
Definition: item.cc:1441
bool is_cs_specified() const
Return true if character-set-introducer was explicitly specified in the original query for this item ...
Definition: item.h:5427
Item_string(const CHARSET_INFO *cs, Derivation dv=DERIVATION_COERCIBLE)
Definition: item.h:5307
bool get_time(MYSQL_TIME *ltime) override
Definition: item.h:5388
Item_string(const POS &pos)
Definition: item.h:5261
void append(char *str, size_t length)
Definition: item.h:5399
void init(const char *str, size_t length, const CHARSET_INFO *cs, Derivation dv, uint repertoire)
Definition: item.h:5265
bool check_partition_func_processor(uchar *) override
Check if a partition function is allowed.
Definition: item.h:5406
Item * safe_charset_converter(THD *thd, const CHARSET_INFO *tocs) override
Definition: item.cc:1350
Item_string(const POS &pos, const Name_string name_par, const LEX_CSTRING &literal, const CHARSET_INFO *cs, Derivation dv=DERIVATION_COERCIBLE, uint repertoire=MY_REPERTOIRE_UNICODE30)
Definition: item.h:5346
void mark_result_as_const()
Definition: item.h:5443
type_conversion_status save_in_field_inner(Field *field, bool no_conversions) override
Helper function which does all of the work for save_in_field(Field*, bool), except some error checkin...
Definition: item.cc:6792
Item_result result_type() const override
Definition: item.h:5391
Item * clone_item() const override
Definition: item.h:5393
bool m_cs_specified
Definition: item.h:5446
void print(const THD *thd, String *str, enum_query_type query_type) const override
Definition: item.cc:3447
Item_string(const Name_string name_par, const char *str, size_t length, const CHARSET_INFO *cs, Derivation dv=DERIVATION_COERCIBLE, uint repertoire=MY_REPERTOIRE_UNICODE30)
Definition: item.h:5317
Item * charset_converter(THD *thd, const CHARSET_INFO *tocs, bool lossless)
Convert a string item into the requested character set.
Definition: item.cc:1363
Item_basic_constant super
Definition: item.h:5258
void set_str_with_copy(const char *str_arg, uint length_arg)
Definition: item.h:5366
double val_real() override
Definition: item.cc:3518
Item_string(const POS &pos, const Name_string name_par, const char *str, size_t length, const CHARSET_INFO *cs, Derivation dv=DERIVATION_COERCIBLE, uint repertoire=MY_REPERTOIRE_UNICODE30)
Definition: item.h:5330
void set_repertoire_from_value()
Definition: item.h:5373
longlong val_int() override
Definition: item.cc:3567
enum Type type() const override
Definition: item.h:5377
my_decimal * val_decimal(my_decimal *) override
Definition: item.cc:3574
bool get_date(MYSQL_TIME *ltime, my_time_flags_t fuzzydate) override
Definition: item.h:5385
Definition: item_subselect.h:80
Class Item_sum is the base class used for special expressions that SQL calls 'set functions'.
Definition: item_sum.h:399
Item_temporal_with_ref(enum_field_types field_type_arg, uint8 decimals_arg, longlong i, Item *ref_arg, bool unsigned_arg)
Definition: item.h:6219
void print(const THD *thd, String *str, enum_query_type query_type) const override
This method is used for to:
Definition: item.cc:6910
bool get_time(MYSQL_TIME *) override
Definition: item.h:6230
bool get_date(MYSQL_TIME *, my_time_flags_t) override
Definition: item.h:6226
type_conversion_status save_in_field_inner(Field *field, bool no_conversions) override
Store this item's int-value in a field.
Definition: item.cc:6848
bool get_time(MYSQL_TIME *) override
Definition: item.h:5072
bool get_date(MYSQL_TIME *, my_time_flags_t) override
Definition: item.h:5068
Item_temporal(enum_field_types field_type_arg, const Name_string &name_arg, longlong i, uint length)
Definition: item.h:5054
longlong val_time_temporal() override
Return time value of item in packed longlong format.
Definition: item.h:5066
Item * clone_item() const override
Definition: item.h:5063
Item_temporal(enum_field_types field_type_arg, longlong i)
Definition: item.h:5050
longlong val_date_temporal() override
Return date value of item in packed longlong format.
Definition: item.h:5067
longlong val_time_temporal() override
Return time value of item in packed longlong format.
Definition: item.h:6281
longlong val_date_temporal() override
Return date value of item in packed longlong format.
Definition: item.h:6282
Item_time_with_ref(uint8 decimals_arg, longlong i, Item *ref_arg)
Constructor for Item_time_with_ref.
Definition: item.h:6277
Item * clone_item() const override
Definition: item.cc:6890
Utility mixin class to be able to walk() only parts of item trees.
Definition: item.h:740
bool is_stopped(const Item *i)
Definition: item.h:757
const Item * stopped_at_item
Definition: item.h:778
void stop_at(const Item *i)
Stops walking children of this item.
Definition: item.h:748
Item_tree_walker(const Item_tree_walker &)=delete
Item_tree_walker()
Definition: item.h:742
Item_tree_walker & operator=(const Item_tree_walker &)=delete
~Item_tree_walker()
Definition: item.h:743
Represents NEW/OLD version of field of row which is changed/read in trigger.
Definition: item.h:6572
SQL_I_List< Item_trigger_field > * next_trig_field_list
Definition: item.h:6582
void print(const THD *thd, String *str, enum_query_type query_type) const override
This method is used for to:
Definition: item.cc:9274
void setup_field(Table_trigger_field_support *table_triggers, GRANT_INFO *table_grant_info)
Find index of Field object which will be appropriate for item representing field of row being changed...
Definition: item.cc:9158
uint field_idx
Definition: item.h:6584
GRANT_INFO * table_grants
Definition: item.h:6665
bool check_column_privileges(uchar *arg) override
Check privileges of base table column.
Definition: item.cc:9263
Item * get_tmp_table_item(THD *thd) override
If an Item is materialized in a temporary table, a different Item may have to be used in the part of ...
Definition: item.h:6621
Item_trigger_field(const POS &pos, enum_trigger_variable_type trigger_var_type_arg, const char *field_name_arg, Access_bitmask priv, const bool ro)
Definition: item.h:6599
bool set_value(THD *thd, sp_rcontext *ctx, Item **it) override
Definition: item.cc:9179
Item_trigger_field(Name_resolution_context *context_arg, enum_trigger_variable_type trigger_var_type_arg, const char *field_name_arg, Access_bitmask priv, const bool ro)
Definition: item.h:6588
bool set_value(THD *thd, Item **it)
Definition: item.h:6646
Settable_routine_parameter * get_settable_routine_parameter() override
Definition: item.h:6642
Item_trigger_field * next_trg_field
Definition: item.h:6577
void cleanup() override
Called for every Item after use (preparation and execution).
Definition: item.cc:9281
Access_bitmask want_privilege
Definition: item.h:6664
enum Type type() const override
Definition: item.h:6611
Item * copy_or_same(THD *) override
Definition: item.h:6620
Table_trigger_field_support * triggers
Definition: item.h:6586
Field * get_tmp_table_field() override
If this Item is being materialized into a temporary table, returns the field that is being materializ...
Definition: item.h:6619
enum_trigger_variable_type trigger_var_type
Definition: item.h:6575
table_map used_tables() const override
Definition: item.h:6618
bool fix_fields(THD *, Item **) override
Resolve the name of a column reference.
Definition: item.cc:9206
bool read_only
Definition: item.h:6670
void bind_fields() override
Bind objects from the current execution context to field objects in item trees.
Definition: item.cc:9242
bool check_function_as_value_generator(uchar *args) override
Check if this item is allowed for a virtual column or inside a default expression.
Definition: item.h:6627
bool eq(const Item *item, bool binary_cmp) const override
Definition: item.cc:9170
bool is_valid_for_pushdown(uchar *args) override
Check if all the columns present in this expression are from the derived table.
Definition: item.h:6634
void set_required_privilege(Access_bitmask privilege) override
Set required privileges for accessing the parameter.
Definition: item.h:6623
Item_type_holder stores an aggregation of name, type and type specification of UNIONS and derived tab...
Definition: item.h:7106
Item_aggregate_type super
Definition: item.h:7107
enum Type type() const override
Definition: item.h:7115
Item_type_holder(THD *thd, Item *item)
Definition: item.h:7113
String * val_str(String *) override
Definition: item.cc:10563
longlong val_int() override
Definition: item.cc:10553
bool get_date(MYSQL_TIME *, my_time_flags_t) override
Definition: item.cc:10568
bool get_time(MYSQL_TIME *) override
Definition: item.cc:10573
double val_real() override
Definition: item.cc:10548
my_decimal * val_decimal(my_decimal *) override
Definition: item.cc:10558
uint decimal_precision() const override
Definition: item.h:5109
Item * clone_item() const override
Definition: item.h:5103
Item_num * neg() override
Definition: item.cc:6921
Item_uint(const Name_string &name_arg, longlong i, uint length)
Definition: item.h:5093
void print(const THD *thd, String *str, enum_query_type query_type) const override
This method is used for to:
Definition: item.cc:3290
Item_uint(const POS &pos, const char *str_arg, uint length)
Definition: item.h:5087
type_conversion_status save_in_field_inner(Field *field, bool no_conversions) override
Store this item's int-value in a field.
Definition: item.cc:6798
double val_real() override
Definition: item.h:5097
String * val_str(String *) override
Definition: item.cc:3283
Item_uint(const char *str_arg, uint length)
Definition: item.h:5084
Item_uint(ulonglong i)
Definition: item.h:5092
Reference item that encapsulates both the type and the contained items of a single column of a VALUES...
Definition: item.h:7140
Item_values_column(THD *thd, Item *ref)
Definition: item.cc:10586
void set_value(Item *new_value)
Definition: item.h:7171
Item * m_value_ref
Definition: item.h:7144
table_map used_tables() const override
Definition: item.h:7172
Item_aggregate_type super
Definition: item.h:7141
longlong val_int() override
Definition: item.cc:10607
type_conversion_status save_in_field_inner(Field *field, bool no_conversions) override
Helper function which does all of the work for save_in_field(Field*, bool), except some error checkin...
Definition: item.cc:10578
my_decimal * val_decimal(my_decimal *) override
Definition: item.cc:10614
bool is_null() override
The method allows to determine nullness of a complex expression without fully evaluating it,...
Definition: item.cc:10646
bool val_json(Json_wrapper *result) override
Get a JSON value from an Item.
Definition: item.cc:10630
bool get_date(MYSQL_TIME *ltime, my_time_flags_t fuzzydate) override
Definition: item.cc:10662
enum Type type() const override
Definition: item.h:7170
bool eq(const Item *item, bool binary_cmp) const override
Definition: item.cc:10592
String * val_str(String *tmp) override
Definition: item.cc:10639
void add_used_tables(Item *value)
Definition: item.cc:10676
bool get_time(MYSQL_TIME *ltime) override
Definition: item.cc:10670
double val_real() override
Definition: item.cc:10600
bool val_bool() override
Definition: item.cc:10622
table_map m_aggregated_used_tables
Definition: item.h:7151
Class for fields from derived tables and views.
Definition: item.h:5948
Item_view_ref(Name_resolution_context *context_arg, Item **item, const char *db_name_arg, const char *alias_name_arg, const char *table_name_arg, const char *field_name_arg, Table_ref *tl)
Definition: item.h:5952
Ref_Type ref_type() const override
Definition: item.h:6040
Table_ref * first_inner_table
If this column belongs to a view that is an inner table of an outer join, then this field points to t...
Definition: item.h:6080
bool mark_field_in_map(uchar *arg) override
Mark underlying field in read or write map of a table.
Definition: item.h:6043
Item * get_tmp_table_item(THD *thd) override
If an Item is materialized in a temporary table, a different Item may have to be used in the part of ...
Definition: item.h:6034
bool is_null() override
The method allows to determine nullness of a complex expression without fully evaluating it,...
Definition: item.cc:8766
bool collect_item_field_or_view_ref_processor(uchar *arg) override
Collects fields and view references that have the qualifying table in the specified query block.
Definition: item.cc:8785
bool has_null_row() const
Definition: item.h:6072
type_conversion_status save_in_field_inner(Field *field, bool no_conversions) override
Helper function which does all of the work for save_in_field(Field*, bool), except some error checkin...
Definition: item.cc:8777
double val_real() override
Definition: item.cc:8726
bool send(Protocol *prot, String *tmp) override
This is only called from items that is not of type item_field.
Definition: item.cc:8772
bool fix_fields(THD *, Item **) override
Prepare referenced field then call usual Item_ref::fix_fields .
Definition: item.cc:8568
bool val_bool() override
Definition: item.cc:8750
Item * replace_item_view_ref(uchar *arg) override
Definition: item.cc:8809
longlong val_int() override
Definition: item.cc:8718
Item_ref super
Definition: item.h:5949
bool eq(const Item *item, bool) const override
Compare two view column references for equality.
Definition: item.cc:8707
bool subst_argument_checker(uchar **) override
Definition: item.h:5978
Table_ref * get_first_inner_table() const
Definition: item.h:6064
bool val_json(Json_wrapper *wr) override
Get a JSON value from an Item.
Definition: item.cc:8758
table_map used_tables() const override
Takes into account whether an Item in a derived table / view is part of an inner table of an outer jo...
Definition: item.h:5986
String * val_str(String *str) override
Definition: item.cc:8742
bool check_column_privileges(uchar *arg) override
Check privileges of view column.
Definition: item.cc:1185
Item * replace_view_refs_with_clone(uchar *arg) override
Assuming this expression is part of a condition that would be pushed to a materialized derived table,...
Definition: item.cc:8839
my_decimal * val_decimal(my_decimal *dec) override
Definition: item.cc:8734
Base class that is used to represent any kind of expression in a relational query.
Definition: item.h:853
void increment_ref_count()
Increment reference count.
Definition: item.h:3222
longlong val_temporal_by_field_type()
Return date or time value of item in packed longlong format, depending on item field type.
Definition: item.h:1749
virtual double val_real()=0
void set_data_type_bit()
Set the data type of the Item to be bit.
Definition: item.h:1622
uint32 max_char_length() const
Definition: item.h:3175
String * make_empty_result()
Sets the result value of the function an empty string, using the current character set.
Definition: item.h:865
virtual const CHARSET_INFO * compare_collation() const
Definition: item.h:2432
virtual float get_filtering_effect(THD *thd, table_map filter_for_table, table_map read_tables, const MY_BITMAP *fields_to_ignore, double rows_in_table)
Calculate the filter contribution that is relevant for table 'filter_for_table' for this item.
Definition: item.h:1957
virtual Field::geometry_type get_geometry_type() const
Definition: item.h:3145
String str_value
str_values's main purpose is to cache the value in save_in_field
Definition: item.h:3367
bool skip_itemize(Item **res)
Helper function to skip itemize() for grammar-allocated items.
Definition: item.h:1129
void set_nullable(bool nullable)
Definition: item.h:3472
virtual bool itemize(Parse_context *pc, Item **res)
The same as contextualize() but with additional parameter.
Definition: item.cc:631
virtual bool change_context_processor(uchar *)
Definition: item.h:2643
void set_data_type_date()
Set all type properties for Item of DATE type.
Definition: item.h:1548
virtual bool check_column_in_group_by(uchar *arg)
Check if all the columns present in this expression are present in GROUP BY clause of the derived tab...
Definition: item.h:2945
DTCollation collation
Character set and collation properties assigned for this Item.
Definition: item.h:3374
bool get_time_from_decimal(MYSQL_TIME *ltime)
Convert val_decimal() to time in MYSQL_TIME.
Definition: item.cc:1559
ulonglong val_uint()
Definition: item.h:1780
bool has_subquery() const
Definition: item.h:3253
virtual bool subst_argument_checker(uchar **arg)
Definition: item.h:2878
bool contextualize(Parse_context *) override
Definition: item.h:1115
void set_data_type_bool()
Definition: item.h:1405
longlong val_int_from_decimal()
Definition: item.cc:455
bool has_stored_program() const
Definition: item.h:3256
String * val_string_from_int(String *str)
Definition: item.cc:284
int error_int()
Get the value to return from val_int() in case of errors.
Definition: item.h:2039
virtual bool subq_opt_away_processor(uchar *)
Definition: item.h:3353
void set_data_type(enum_field_types data_type)
Set the data type of the current Item.
Definition: item.h:1394
bool error_date()
Get the value to return from get_date() in case of errors.
Definition: item.h:2063
virtual bool collect_item_field_or_view_ref_processor(uchar *)
Collects fields and view references that have the qualifying table in the specified query block.
Definition: item.h:2613
bool has_aggregation() const
Definition: item.h:3261
virtual bool find_field_processor(uchar *)
Is this an Item_field which references the given Field argument?
Definition: item.h:2649
longlong val_int_from_datetime()
Definition: item.cc:486
void aggregate_char_length(Item **args, uint nitems)
Set the maximum number of characters required by any of the items in args.
Definition: item.cc:7608
void set_data_type_string(ulonglong max_char_length_arg)
Set the Item to be variable length string.
Definition: item.h:1476
my_decimal * val_decimal_from_string(my_decimal *decimal_value)
Definition: item.cc:343
virtual void split_sum_func(THD *, Ref_item_array, mem_root_deque< Item * > *)
Definition: item.h:2350
bool is_nullable() const
Definition: item.h:3471
void set_data_type_geometry()
Set the data type of the Item to be GEOMETRY.
Definition: item.h:1594
double error_real()
Get the value to return from val_real() in case of errors.
Definition: item.h:2051
my_decimal * error_decimal(my_decimal *decimal_value)
Get the value to return from val_decimal() in case of errors.
Definition: item.h:2088
void save_in_field_no_error_check(Field *field, bool no_conversions)
A slightly faster value of save_in_field() that returns no error value (you will need to check thd->i...
Definition: item.h:1322
virtual enum_field_types actual_data_type() const
Retrieve actual data type for an item.
Definition: item.h:1370
bool get_time_from_string(MYSQL_TIME *ltime)
Convert val_str() to time in MYSQL_TIME.
Definition: item.cc:1540
static const CHARSET_INFO * default_charset()
Definition: item.cc:1652
void init_make_field(Send_field *tmp_field, enum enum_field_types type)
Definition: item.cc:6255
virtual bool propagate_type(THD *thd, const Type_properties &type)
Propagate data type specifications into parameters and user variables.
Definition: item.h:1210
String * val_string_from_date(String *str)
Definition: item.cc:309
bool is_non_deterministic() const
Definition: item.h:2299
static constexpr uint8 PROP_ROLLUP_EXPR
Set if the item or one or more of the underlying items contains a ROLLUP expression.
Definition: item.h:3531
void set_subquery()
Set the "has subquery" property.
Definition: item.h:3246
void fix_char_length(uint32 max_char_length_arg)
Definition: item.h:3196
void operator=(Item &)=delete
bool has_rollup_expr() const
Definition: item.h:3279
virtual bool is_bool_func() const
Definition: item.h:2403
void mark_subqueries_optimized_away()
Definition: item.h:3297
String * null_return_str()
Gets the value to return from val_str() when returning a NULL value.
Definition: item.h:2112
double val_real_from_decimal()
Definition: item.cc:437
virtual bool disable_constant_propagation(uchar *)
Definition: item.h:2887
virtual longlong val_time_temporal_at_utc()
Definition: item.h:2176
virtual bool get_time(MYSQL_TIME *ltime)=0
void aggregate_temporal_properties(Item **item, uint nitems)
Set fractional seconds precision for temporal functions.
Definition: item.cc:7681
Item()
Item constructor for general use.
Definition: item.cc:132
uint8 m_data_type
Data type assigned to Item.
Definition: item.h:3458
void set_data_type_float()
Set the data type of the Item to be single precision floating point.
Definition: item.h:1446
void reset_aggregation()
Reset the "has aggregation" property.
Definition: item.h:3267
virtual Item * this_item()
Definition: item.h:2983
bool is_temporal_with_date() const
Definition: item.h:3105
virtual bool strip_db_table_name_processor(uchar *)
Definition: item.h:3348
static Item_result type_to_result(enum_field_types type)
Definition: item.h:971
virtual table_map used_tables() const
Definition: item.h:2199
String * val_string_from_datetime(String *str)
Definition: item.cc:299
bool get_time_from_real(MYSQL_TIME *ltime)
Convert val_real() to time in MYSQL_TIME.
Definition: item.cc:1550
virtual bool equality_substitution_analyzer(uchar **)
Definition: item.h:2826
virtual bool find_item_in_field_list_processor(uchar *)
Definition: item.h:2642
virtual longlong val_date_temporal_at_utc()
Definition: item.h:2174
virtual bool created_by_in2exists() const
Whether this Item was created by the IN->EXISTS subquery transformation.
Definition: item.h:3295
static enum_field_types string_field_type(uint32 max_bytes)
Determine correct string field type, based on string length.
Definition: item.h:1647
bool error_json()
Get the value to return from val_json() in case of errors.
Definition: item.h:1976
virtual void cleanup()
Called for every Item after use (preparation and execution).
Definition: item.h:1171
virtual Item * real_item()
Definition: item.h:2416
virtual Item * equality_substitution_transformer(uchar *)
Definition: item.h:2828
void set_stored_program()
Set the "has stored program" property.
Definition: item.h:3249
virtual bool supports_partial_update(const Field_json *field) const
Check if this expression can be used for partial update of a given JSON column.
Definition: item.h:3551
bool get_date_from_decimal(MYSQL_TIME *ltime, my_time_flags_t flags)
Convert val_decimal() to date in MYSQL_TIME.
Definition: item.cc:1472
virtual enum_field_types default_data_type() const
Get the default data (output) type for the specific item.
Definition: item.h:1383
void set_data_type_string(uint32 max_l, const CHARSET_INFO *cs)
Set the Item to be variable length string.
Definition: item.h:1494
virtual bool explain_subquery_checker(uchar **)
Definition: item.h:2882
bool get_date_from_time(MYSQL_TIME *ltime)
Convert get_time() from time to date in MYSQL_TIME.
Definition: item.cc:1490
bool get_time_from_datetime(MYSQL_TIME *ltime)
Convert datetime to time.
Definition: item.cc:1585
void set_data_type_blob(uint32 max_l)
Set the Item to be of BLOB type.
Definition: item.h:1541
uint m_ref_count
Number of references to this item.
Definition: item.h:3454
virtual Field * make_string_field(TABLE *table) const
Create a field to hold a string value from an item.
Definition: item.cc:6383
virtual my_decimal * val_decimal(my_decimal *decimal_buffer)=0
void add_accum_properties(const Item *item)
Add more accumulated properties to an Item.
Definition: item.h:3241
virtual bool check_valid_arguments_processor(uchar *)
Definition: item.h:2894
longlong val_int_from_date()
Definition: item.cc:478
virtual Settable_routine_parameter * get_settable_routine_parameter()
Definition: item.h:3102
void split_sum_func2(THD *thd, Ref_item_array ref_item_array, mem_root_deque< Item * > *fields, Item **ref, bool skip_registered)
Definition: item.cc:2205
virtual Item * equal_fields_propagator(uchar *)
Definition: item.h:2885
bool error_bool()
Get the value to return from val_bool() in case of errors.
Definition: item.h:2027
virtual type_conversion_status save_in_field_inner(Field *field, bool no_conversions)
Helper function which does all of the work for save_in_field(Field*, bool), except some error checkin...
Definition: item.cc:6677
virtual bool remove_column_from_bitmap(uchar *arg)
Visitor interface for removing all column expressions (Item_field) in this expression tree from a bit...
Definition: item.h:2639
virtual bool update_depended_from(uchar *)
Definition: item.h:2810
void set_data_type_double()
Set the data type of the Item to be double precision floating point.
Definition: item.h:1438
my_decimal * val_decimal_from_int(my_decimal *decimal_value)
Definition: item.cc:336
void set_data_type_year()
Set the data type of the Item to be YEAR.
Definition: item.h:1613
virtual uint decimal_precision() const
Definition: item.cc:651
Item_result cmp_context
Comparison context.
Definition: item.h:3436
void aggregate_type(Bounds_checked_array< Item * > items)
Aggregates data types from array of items into current item.
Definition: item.cc:568
virtual void allow_array_cast()
A helper function to ensure proper usage of CAST(.
Definition: item.h:3564
virtual Item * truth_transformer(THD *thd, Bool_test test)
Informs an item that it is wrapped in a truth test, in case it wants to transforms itself to implemen...
Definition: item.h:3010
Item(const Item &)=delete
virtual Item * replace_equal_field(uchar *)
Definition: item.h:2888
virtual Item * element_index(uint)
Definition: item.h:2994
virtual bool check_function_as_value_generator(uchar *args)
Check if this item is allowed for a virtual column or inside a default expression.
Definition: item.cc:790
virtual void traverse_cond(Cond_traverser traverser, void *arg, traverse_order)
Definition: item.h:2553
virtual Item * safe_charset_converter(THD *thd, const CHARSET_INFO *tocs)
Definition: item.cc:1284
uint float_length(uint decimals_par) const
Definition: item.h:2235
Field * tmp_table_field_from_field_type(TABLE *table, bool fixed_length) const
Create a field based on field_type of argument.
Definition: item.cc:6419
bool get_time_from_date(MYSQL_TIME *ltime)
Convert date to time.
Definition: item.cc:1577
virtual Item * copy_andor_structure(THD *)
Definition: item.h:2410
virtual bool val_json(Json_wrapper *result)
Get a JSON value from an Item.
Definition: item.h:1929
virtual longlong val_int()=0
virtual Item_field * field_for_view_update()
Definition: item.h:3003
static constexpr uint8 PROP_GROUPING_FUNC
Set if the item or one or more of the underlying items is a GROUPING function.
Definition: item.h:3536
virtual void print(const THD *, String *str, enum_query_type) const
This method is used for to:
Definition: item.h:2323
enum_field_types data_type() const
Retrieve the derived data type of the Item.
Definition: item.h:1362
static constexpr uint8 PROP_SUBQUERY
Set of properties that are calculated by accumulation from underlying items.
Definition: item.h:3523
Item_name_string item_name
Name from query.
Definition: item.h:3375
void print_item_w_name(const THD *thd, String *, enum_query_type query_type) const
Definition: item.cc:709
virtual String * val_str_ascii(String *str)
Definition: item.cc:244
virtual Item * get_tmp_table_item(THD *thd)
If an Item is materialized in a temporary table, a different Item may have to be used in the part of ...
Definition: item.h:2429
virtual bool fix_fields(THD *, Item **)
Definition: item.cc:4892
virtual bool check_column_privileges(uchar *thd)
Check privileges.
Definition: item.h:2708
bool fixed
True if item has been resolved.
Definition: item.h:3460
static bool bit_func_returns_binary(const Item *a, const Item *b)
Definition: item_func.cc:3219
enum_const_item_cache
How to cache constant JSON data.
Definition: item.h:927
@ CACHE_NONE
Don't cache.
Definition: item.h:929
@ CACHE_JSON_VALUE
Source data is a JSON string, parse and cache result.
Definition: item.h:931
@ CACHE_JSON_ATOM
Source data is SQL scalar, convert and cache result.
Definition: item.h:933
virtual Item_result result_type() const
Definition: item.h:1332
virtual bool is_expensive()
Definition: item.h:3162
bool const_item() const
Returns true if item is constant, regardless of query evaluation state.
Definition: item.h:2260
longlong val_int_from_time()
Definition: item.cc:464
bool null_value
True if item is null.
Definition: item.h:3497
virtual longlong val_time_temporal()
Return time value of item in packed longlong format.
Definition: item.cc:380
Type
Definition: item.h:889
@ XPATH_NODESET
Definition: item.h:915
@ XPATH_NODESET_CMP
Definition: item.h:916
@ VARBIN_ITEM
Definition: item.h:898
@ VIEW_FIXER_ITEM
Definition: item.h:917
@ ROW_ITEM
Definition: item.h:909
@ INVALID_ITEM
Definition: item.h:890
@ INSERT_VALUE_ITEM
Definition: item.h:907
@ CACHE_ITEM
Definition: item.h:910
@ REAL_ITEM
Definition: item.h:896
@ TRIGGER_FIELD_ITEM
Definition: item.h:913
@ SUM_FUNC_ITEM
Definition: item.h:893
@ FIELD_VARIANCE_ITEM
Definition: item.h:906
@ SUBSELECT_ITEM
Definition: item.h:908
@ REF_ITEM
Definition: item.h:904
@ FIELD_AVG_ITEM
Definition: item.h:900
@ PROC_ITEM
Definition: item.h:902
@ FIELD_ITEM
Definition: item.h:891
@ INT_ITEM
Definition: item.h:895
@ FUNC_ITEM
Definition: item.h:892
@ COND_ITEM
Definition: item.h:903
@ PARAM_ITEM
Definition: item.h:912
@ DECIMAL_ITEM
Definition: item.h:914
@ FIELD_STD_ITEM
Definition: item.h:905
@ FIELD_BIT_ITEM
Definition: item.h:918
@ VALUES_COLUMN_ITEM
Definition: item.h:919
@ NULL_ITEM
Definition: item.h:897
@ DEFAULT_VALUE_ITEM
Definition: item.h:901
@ STRING_ITEM
Definition: item.h:894
@ TYPE_HOLDER
Definition: item.h:911
@ METADATA_COPY_ITEM
Definition: item.h:899
virtual bool collect_scalar_subqueries(uchar *)
Definition: item.h:2807
virtual Field * tmp_table_field(TABLE *)
Definition: item.h:2193
virtual bool check_cols(uint c)
Definition: item.cc:1211
const bool is_parser_item
true if allocated directly by parser
Definition: item.h:3456
bool is_temporal_with_time() const
Definition: item.h:3111
virtual bool visitor_processor(uchar *arg)
A processor to handle the select lex visitor framework.
Definition: item.cc:759
Parse_tree_node super
Definition: item.h:854
virtual Item * replace_item_view_ref(uchar *)
Definition: item.h:3072
bool cleanup_processor(uchar *)
cleanup() item if it is resolved ('fixed').
Definition: item.h:2568
void set_data_type_datetime(uint8 fsp)
Set all properties for Item of DATETIME type.
Definition: item.h:1572
bool aggregate_string_properties(const char *name, Item **item, uint nitems)
Aggregate string properties (character set, collation and maximum length) for string function.
Definition: item.cc:7736
virtual Item * replace_with_derived_expr_ref(uchar *arg)
Assuming this expression is part of a condition that would be pushed to the HAVING clause of a materi...
Definition: item.h:2966
virtual const CHARSET_INFO * charset_for_protocol()
Definition: item.h:2438
void set_aggregation()
Set the "has aggregation" property.
Definition: item.h:3264
bool get_time_from_non_temporal(MYSQL_TIME *ltime)
Convert a non-temporal type to time.
Definition: item.cc:1615
virtual uint time_precision()
TIME precision of the item: 0..6.
Definition: item.cc:676
void delete_self()
Delete this item.
Definition: item.h:3093
bool m_in_check_constraint_exec_ctx
True if item is a top most element in the expression being evaluated for a check constraint.
Definition: item.h:3513
virtual uint datetime_precision()
DATETIME precision of the item: 0..6.
Definition: item.cc:691
virtual bool send(Protocol *protocol, String *str)
This is only called from items that is not of type item_field.
Definition: item.cc:7333
bool has_compatible_context(Item *item) const
Check whether this and the given item has compatible comparison context.
Definition: item.h:3126
virtual Item * replace_view_refs_with_clone(uchar *arg)
Assuming this expression is part of a condition that would be pushed to a materialized derived table,...
Definition: item.h:2976
virtual void pin_data_type()
Pin the data type for the item.
Definition: item.h:1359
virtual bool cache_const_expr_analyzer(uchar **cache_item)
Check if an item is a constant one and can be cached.
Definition: item.cc:7509
virtual void apply_is_true()
Apply the IS TRUE truth property, meaning that an UNKNOWN result and a FALSE result are treated the s...
Definition: item.h:2394
void set_rollup_expr()
Set the property: this item (tree) contains a reference to a ROLLUP expr.
Definition: item.h:3282
Item * next_free
Intrusive list pointer for free list.
Definition: item.h:3363
virtual bool collect_item_field_or_ref_processor(uchar *)
Definition: item.h:2574
virtual bool val_bool()
Definition: item.cc:216
String * error_str()
Get the value to return from val_str() in case of errors.
Definition: item.h:2102
static enum_field_types type_for_variable(enum_field_types src_type)
Provide data type for a user or system variable, based on the type of the item that is assigned to th...
Definition: item.h:1028
uint8 m_accum_properties
Definition: item.h:3537
type_conversion_status save_str_value_in_field(Field *field, String *result)
Definition: item.cc:548
virtual bool check_column_in_window_functions(uchar *arg)
Check if all the columns present in this expression are present in PARTITION clause of window functio...
Definition: item.h:2937
bool get_date_from_numeric(MYSQL_TIME *ltime, my_time_flags_t fuzzydate)
Convert a numeric type to date.
Definition: item.cc:1500
virtual Item * update_value_transformer(uchar *)
Definition: item.h:3014
virtual Item * replace_outer_ref(uchar *)
Definition: item.h:3074
virtual bool reset_wf_state(uchar *arg)
Reset execution state for such window function types as determined by arg.
Definition: item.h:2684
void set_accum_properties(const Item *item)
Set accumulated properties for an Item.
Definition: item.h:3236
virtual bool repoint_const_outer_ref(uchar *arg)
This function applies only to Item_field objects referred to by an Item_ref object that has been mark...
Definition: item.h:3345
virtual bool cast_incompatible_args(uchar *)
Wrap incompatible arguments in CAST nodes to the expected data types.
Definition: item.h:2651
virtual longlong val_date_temporal()
Return date value of item in packed longlong format.
Definition: item.cc:386
bool visit_all_analyzer(uchar **)
Definition: item.h:2822
virtual table_map not_null_tables() const
Return table map of tables that can't be NULL tables (tables that are used in a context where if they...
Definition: item.h:2212
virtual Item_result numeric_context_result_type() const
Result type when an item appear in a numeric context.
Definition: item.h:1337
my_decimal * val_decimal_from_date(my_decimal *decimal_value)
Definition: item.cc:362
longlong val_temporal_with_round(enum_field_types type, uint8 dec)
Get date or time value in packed longlong format.
Definition: item.cc:398
virtual bool is_expensive_processor(uchar *)
Definition: item.h:857
bool can_be_substituted_for_gc(bool array=false) const
Check if this item is of a type that is eligible for GC substitution.
Definition: item.cc:7589
virtual Item * compile(Item_analyzer analyzer, uchar **arg_p, Item_transformer transformer, uchar *arg_t)
Perform a generic "compilation" of the Item tree, ie transform the Item tree by adding zero or more I...
Definition: item.h:2547
type_conversion_status save_in_field_no_warnings(Field *field, bool no_conversions)
Save the item into a field but do not emit any warnings.
Definition: item.cc:1664
bool error_time()
Get the value to return from get_time() in case of errors.
Definition: item.h:2075
virtual TYPELIB * get_typelib() const
Get the typelib information for an item of type set or enum.
Definition: item.h:1657
bool has_wf() const
Definition: item.h:3270
my_decimal * val_decimal_from_real(my_decimal *decimal_value)
Definition: item.cc:328
virtual bool collect_subqueries(uchar *)
Definition: item.h:2809
virtual void fix_after_pullout(Query_block *parent_query_block, Query_block *removed_query_block)
Fix after tables have been moved from one query_block level to the parent level, e....
Definition: item.h:1190
void set_data_type_char(uint32 max_l)
Set the Item to be fixed length string.
Definition: item.h:1517
void aggregate_decimal_properties(Item **item, uint nitems)
Set precision and decimals of function when this depends on arguments' values for these quantities.
Definition: item.cc:7663
virtual bool null_inside()
Definition: item.h:2998
void set_data_type_json()
Set the data type of the Item to be JSON.
Definition: item.h:1603
bool unsigned_flag
Definition: item.h:3498
virtual bool aggregate_check_group(uchar *)
Definition: item.h:2758
bool propagate_type(THD *thd, enum_field_types def=MYSQL_TYPE_VARCHAR, bool pin=false, bool inherit=false)
Wrapper for easier calling of propagate_type(const Type_properties &).
Definition: item.h:1224
virtual bool get_date(MYSQL_TIME *ltime, my_time_flags_t fuzzydate)=0
bool is_blob_field() const
Check if an item either is a blob field, or will be represented as a BLOB field if a field is created...
Definition: item.cc:1692
bool is_outer_reference() const
Definition: item.h:2306
virtual bool is_null()
The method allows to determine nullness of a complex expression without fully evaluating it,...
Definition: item.h:2375
bool const_for_execution() const
Returns true if item is constant during one query execution.
Definition: item.h:2272
longlong val_int_from_string()
Definition: item.cc:500
item_marker
< Values for member 'marker'
Definition: item.h:3394
@ MARKER_FUNC_DEP_NOT_NULL
When analyzing functional dependencies for only_full_group_by (says whether a nullable column can be ...
Definition: item.h:3407
@ MARKER_BIT
When creating an internal temporary table: says how to store BIT fields.
Definition: item.h:3404
@ MARKER_TRAVERSAL
Used during traversal to avoid deleting an item twice.
Definition: item.h:3415
@ MARKER_DISTINCT_GROUP
When we change DISTINCT to GROUP BY: used for book-keeping of fields.
Definition: item.h:3410
@ MARKER_IMPLICIT_NE_ZERO
When contextualization or itemization adds an implicit comparison '0<>' (see make_condition()),...
Definition: item.h:3399
@ MARKER_NONE
Definition: item.h:3395
@ MARKER_COND_DERIVED_TABLE
When pushing conditions down to derived table: it says a condition contains only derived table's colu...
Definition: item.h:3413
@ MARKER_CONST_PROPAG
When doing constant propagation (e.g.
Definition: item.h:3402
@ MARKER_ICP_COND_USES_INDEX_ONLY
When pushing index conditions: it says whether a condition uses only indexed columns.
Definition: item.h:3418
virtual bool is_valid_for_pushdown(uchar *arg)
Check if all the columns present in this expression are from the derived table.
Definition: item.h:2926
virtual Item * copy_or_same(THD *)
Definition: item.h:2409
Item_name_string orig_name
Original item name (if it was renamed)
Definition: item.h:3376
virtual bool collect_grouped_aggregates(uchar *)
Definition: item.h:2808
bool eq_by_collation(Item *item, bool binary_cmp, const CHARSET_INFO *cs)
Definition: item.cc:6355
virtual bool clean_up_after_removal(uchar *arg)
Clean up after removing the item from the item tree.
Definition: item.cc:7576
virtual cond_result eq_cmp_result() const
Definition: item.h:2234
uint32 max_char_length(const CHARSET_INFO *cs) const
Definition: item.h:3189
virtual Item * explain_subquery_propagator(uchar *)
Definition: item.h:2883
virtual void update_used_tables()
Updates used tables, not null tables information and accumulates properties up the item tree,...
Definition: item.h:2348
virtual bool aggregate_check_distinct(uchar *)
Definition: item.h:2756
bool evaluate(THD *thd, String *str)
Evaluate item, possibly using the supplied buffer.
Definition: item.cc:7433
bool get_date_from_string(MYSQL_TIME *ltime, my_time_flags_t flags)
Convert val_str() to date in MYSQL_TIME.
Definition: item.cc:1453
void set_wf()
Set the "has window function" property.
Definition: item.h:3273
virtual bool returns_array() const
Whether the item returns array of its data type.
Definition: item.h:3559
virtual void make_field(Send_field *field)
Definition: item.cc:6276
virtual Field * get_tmp_table_field()
If this Item is being materialized into a temporary table, returns the field that is being materializ...
Definition: item.h:2188
virtual bool is_outer_field() const
Definition: item.h:3204
void set_grouping_func()
Set the property: this item is a call to GROUPING.
Definition: item.h:3292
virtual void set_result_field(Field *)
Definition: item.h:2400
bool is_abandoned() const
Definition: item.h:3350
cond_result
Definition: item.h:922
@ COND_UNDEF
Definition: item.h:922
@ COND_TRUE
Definition: item.h:922
@ COND_FALSE
Definition: item.h:922
@ COND_OK
Definition: item.h:922
virtual bool walk(Item_processor processor, enum_walk walk, uchar *arg)
Traverses a tree of Items in prefix and/or postfix order.
Definition: item.h:2463
type_conversion_status save_time_in_field(Field *field)
Definition: item.cc:509
item_marker marker
This member has several successive meanings, depending on the phase we're in (.
Definition: item.h:3435
Item_result temporal_with_date_as_number_result_type() const
Similar to result_type() but makes DATE, DATETIME, TIMESTAMP pretend to be numbers rather than string...
Definition: item.h:1344
traverse_order
Definition: item.h:924
@ POSTFIX
Definition: item.h:924
@ PREFIX
Definition: item.h:924
virtual bool is_strong_side_column_not_in_fd(uchar *)
Definition: item.h:2760
virtual bool intro_version(uchar *)
Definition: item.h:2565
bool get_time_from_numeric(MYSQL_TIME *ltime)
Convert a numeric type to time.
Definition: item.cc:1592
bool m_abandoned
true if item has been fully de-referenced
Definition: item.h:3455
virtual bool inform_item_in_cond_of_tab(uchar *)
Definition: item.h:2711
static constexpr uint8 PROP_STORED_PROGRAM
Definition: item.h:3524
virtual const Item * real_item() const
Definition: item.h:2417
bool is_temporal() const
Definition: item.h:3114
bool is_temporal_with_date_and_time() const
Definition: item.h:3108
virtual const char * full_name() const
Definition: item.h:2194
auto walk_helper_thunk(uchar *arg)
Definition: item.h:2471
void set_data_type_null()
Definition: item.h:1398
uint8 decimals
Number of decimals in result when evaluating this item.
Definition: item.h:3469
virtual Item ** addr(uint)
Definition: item.h:2995
virtual Item * clone_item() const
Definition: item.h:2233
void set_data_type_string(uint32 max_l)
Set the Item to be variable length string.
Definition: item.h:1459
virtual void set_can_use_prefix_key()
Definition: item.h:1199
void set_data_type_timestamp(uint8 fsp)
Set all properties for Item of TIMESTAMP type.
Definition: item.h:1584
bool get_date_from_non_temporal(MYSQL_TIME *ltime, my_time_flags_t fuzzydate)
Convert a non-temporal type to date.
Definition: item.cc:1521
void set_data_type_string(uint32 max_l, const DTCollation &coll)
Set the Item to be variable length string.
Definition: item.h:1506
virtual std::optional< ContainedSubquery > get_contained_subquery(const Query_block *outer_query_block)
If this item represents a IN/ALL/ANY/comparison_operator subquery, return that (along with data on ho...
Definition: item.h:1262
uint decrement_ref_count()
Decrement reference count.
Definition: item.h:3228
virtual bool find_item_processor(uchar *arg)
Definition: item.h:2644
void aggregate_num_type(Item_result result_type, Item **item, uint nitems)
This function is used to resolve type for numeric result type of CASE, COALESCE, IF and LEAD/LAG.
Definition: item.cc:7781
virtual void no_rows_in_result()
Definition: item.h:2408
virtual bool add_field_to_set_processor(uchar *)
Item::walk function.
Definition: item.h:2621
virtual bool add_field_to_cond_set_processor(uchar *)
Item::walk function.
Definition: item.h:2630
virtual Item * replace_with_derived_expr(uchar *arg)
Assuming this expression is part of a condition that would be pushed to the WHERE clause of a materia...
Definition: item.h:2955
uint reference_count() const
Definition: item.h:3219
static enum_field_types result_to_type(Item_result result)
Definition: item.h:951
virtual Item * replace_scalar_subquery(uchar *)
When walking the item tree seeing an Item_singlerow_subselect matching a target, replace it with a su...
Definition: item.h:3063
type_conversion_status save_in_field(Field *field, bool no_conversions)
Save a temporal value in packed longlong format into a Field.
Definition: item.cc:6645
virtual bool check_gcol_depend_default_processor(uchar *args)
Check if a generated expression depends on DEFAULT function with specific column name as argument.
Definition: item.h:2917
virtual bool is_splocal() const
Definition: item.h:3096
Bool_test
< Modifier for result transformation
Definition: item.h:937
@ BOOL_NOT_FALSE
Definition: item.h:942
@ BOOL_IS_UNKNOWN
Definition: item.h:940
@ BOOL_NOT_TRUE
Definition: item.h:941
@ BOOL_IS_TRUE
Definition: item.h:938
@ BOOL_ALWAYS_FALSE
Definition: item.h:947
@ BOOL_NOT_UNKNOWN
Definition: item.h:943
@ BOOL_ALWAYS_TRUE
Definition: item.h:946
@ BOOL_IS_FALSE
Definition: item.h:939
@ BOOL_IDENTITY
Definition: item.h:944
@ BOOL_NEGATED
Definition: item.h:945
String * check_well_formed_result(String *str, bool send_error, bool truncate)
Verifies that the input string is well-formed according to its character set.
Definition: item.cc:6299
virtual bool replace_field_processor(uchar *)
A processor that replaces any Fields with a Create_field_wrapper.
Definition: item.h:3317
virtual bool update_aggr_refs(uchar *)
A walker processor overridden by Item_aggregate_ref, q.v.
Definition: item.h:3086
virtual void notify_removal()
Called when an item has been removed, can be used to notify external objects about the removal,...
Definition: item.h:1177
bool may_evaluate_const(const THD *thd) const
Return true if this is a const item that may be evaluated in the current phase of statement processin...
Definition: item.cc:1203
virtual Item * replace_aggregate(uchar *)
Definition: item.h:3073
virtual String * val_str(String *str)=0
bool m_nullable
True if this item may hold the NULL value(if null_value may be set to true).
Definition: item.h:3494
virtual Item * replace_item_field(uchar *)
Transform processor used by Query_block::transform_grouped_to_derived to replace fields which used to...
Definition: item.h:3071
virtual bool mark_field_in_map(uchar *arg)
Mark underlying field in read or write map of a table.
Definition: item.h:2657
virtual bool basic_const_item() const
Returns true if this is a simple constant item like an integer, not a constant expression.
Definition: item.h:2221
bool hidden
If the item is in a SELECT list (Query_block::fields) and hidden is true, the item wasn't actually in...
Definition: item.h:3508
bool get_date_from_int(MYSQL_TIME *ltime, my_time_flags_t flags)
Convert val_int() to date in MYSQL_TIME.
Definition: item.cc:1481
virtual bool get_timeval(my_timeval *tm, int *warnings)
Get timestamp in "struct timeval" format.
Definition: item.cc:1638
bool m_is_window_function
True if item represents window func.
Definition: item.h:3499
bool may_eval_const_item(const THD *thd) const
Definition: item.cc:207
void set_data_type_from_item(const Item *item)
Set data type properties of the item from the properties of another item.
Definition: item.h:1634
static bool mark_field_in_map(Mark_field *mark_field, Field *field)
Helper function for mark_field_in_map(uchar *arg).
Definition: item.h:2666
Item * cache_const_expr_transformer(uchar *item)
Cache item if needed.
Definition: item.cc:7811
String * val_string_from_time(String *str)
Definition: item.cc:319
virtual Item ** this_item_addr(THD *, Item **addr_arg)
Definition: item.h:2990
virtual bool is_result_field() const
Definition: item.h:2401
virtual const Item * this_item() const
Definition: item.h:2984
virtual Item * transform(Item_transformer transformer, uchar *arg)
Perform a generic transformation of the Item tree, by adding zero or more additional Item objects to ...
Definition: item.cc:779
virtual enum_monotonicity_info get_monotonicity_info() const
Definition: item.h:1669
virtual bool collect_item_field_processor(uchar *)
Definition: item.h:2573
virtual bool has_aggregate_ref_in_group_by(uchar *)
Check if an aggregate is referenced from within the GROUP BY clause of the query block in which it is...
Definition: item.h:2820
uint32 max_length
Maximum length of result of evaluating this item, in number of bytes.
Definition: item.h:3392
bool get_date_from_real(MYSQL_TIME *ltime, my_time_flags_t flags)
Convert val_real() to date in MYSQL_TIME.
Definition: item.cc:1463
void set_data_type_longlong()
Set the data type of the Item to be longlong.
Definition: item.h:1416
static constexpr uint8 PROP_WINDOW_FUNCTION
Definition: item.h:3526
auto analyze_helper_thunk(uchar **arg)
See CompileItem.
Definition: item.h:2477
double val_real_from_string()
Definition: item.cc:446
bool update_null_value()
Make sure the null_value member has a correct value.
Definition: item.cc:7418
virtual bool gc_subst_analyzer(uchar **)
Analyzer function for GC substitution.
Definition: item.h:3305
void rename(char *new_name)
rename item (used for views, cleanup() return original name).
Definition: item.cc:770
virtual bool is_column_not_in_fd(uchar *)
Definition: item.h:2762
virtual longlong val_int_endpoint(bool left_endp, bool *incl_endp)
Definition: item.h:1707
virtual enum Type type() const =0
virtual uint cols() const
Definition: item.h:2993
virtual Item * gc_subst_transformer(uchar *)
Transformer function for GC substitution.
Definition: item.h:3309
virtual bool eq(const Item *, bool binary_cmp) const
Definition: item.cc:1275
int8 is_expensive_cache
Cache of result of is_expensive()
Definition: item.h:3457
virtual Bool3 local_column(const Query_block *) const
Definition: item.h:2763
virtual void bring_value()
Definition: item.h:3000
void set_data_type_time(uint8 fsp)
Set all type properties for Item of TIME type.
Definition: item.h:1560
void set_data_type_decimal(uint8 precision, uint8 scale)
Set the data type of the Item to be decimal.
Definition: item.h:1429
void quick_fix_field()
Definition: item.h:1198
virtual bool used_tables_for_level(uchar *arg)
Return used table information for the specified query block (level).
Definition: item.h:2700
my_decimal * val_decimal_from_time(my_decimal *decimal_value)
Definition: item.cc:371
virtual Item_result cast_to_int_type() const
Definition: item.h:1659
void print_for_order(const THD *thd, String *str, enum_query_type query_type, bool used_alias) const
Prints the item when it's part of ORDER BY and GROUP BY.
Definition: item.cc:739
type_conversion_status save_date_in_field(Field *field)
Definition: item.cc:516
String * val_string_from_real(String *str)
Definition: item.cc:261
virtual bool is_non_const_over_literals(uchar *)
Definition: item.h:2645
virtual void mark_json_as_scalar()
For Items with data type JSON, mark that a string argument is treated as a scalar JSON value.
Definition: item.h:1251
void set_data_type_char(uint32 max_l, const CHARSET_INFO *cs)
Set the Item to be fixed length string.
Definition: item.h:1531
bool has_grouping_func() const
Definition: item.h:3287
virtual void save_org_in_field(Field *field)
Definition: item.h:1327
static constexpr uint8 PROP_AGGREGATION
Definition: item.h:3525
virtual Field * get_result_field() const
Definition: item.h:2402
longlong int_sort_key()
Produces a key suitable for filesort.
Definition: item.h:1763
bool get_time_from_int(MYSQL_TIME *ltime)
Convert val_int() to time in MYSQL_TIME.
Definition: item.cc:1568
void aggregate_float_properties(Item **item, uint nitems)
Set max_length and decimals of function if function is floating point and result length/precision dep...
Definition: item.cc:7631
int decimal_int_part() const
Definition: item.h:2240
virtual void set_data_type_inherited()
Set data type for item as inherited.
Definition: item.h:1353
String * val_string_from_decimal(String *str)
Definition: item.cc:291
virtual bool check_partition_func_processor(uchar *)
Check if a partition function is allowed.
Definition: item.h:2877
virtual void bind_fields()
Bind objects from the current execution context to field objects in item trees.
Definition: item.h:2717
Abstraction for accessing JSON values irrespective of whether they are (started out as) binary JSON v...
Definition: json_dom.h:1161
Definition: sql_list.h:434
Class used as argument to Item::walk() together with mark_field_in_map()
Definition: item.h:252
Mark_field(TABLE *table, enum_mark_columns mark)
Definition: item.h:254
Mark_field(enum_mark_columns mark)
Definition: item.h:255
TABLE *const table
If == NULL, update map of any table.
Definition: item.h:261
const enum_mark_columns mark
How to mark the map.
Definition: item.h:263
A typesafe replacement for DYNAMIC_ARRAY.
Definition: mem_root_array.h:426
Table_ref * save_next_local
Definition: item.h:525
void save_state(Name_resolution_context *context, Table_ref *table_list)
Definition: item.h:529
Table_ref * save_next_name_resolution_table
Definition: item.h:523
void update_next_local(Table_ref *table_list)
Definition: item.h:546
Table_ref * get_first_name_resolution_table()
Definition: item.h:550
Table_ref * save_table_list
Definition: item.h:521
bool save_resolve_in_select_list
Definition: item.h:524
Table_ref * save_first_name_resolution_table
Definition: item.h:522
void restore_state(Name_resolution_context *context, Table_ref *table_list)
Definition: item.h:538
Storage for name strings.
Definition: item.h:288
void copy(const char *str)
Definition: item.h:325
Name_string(const char *str, size_t length)
Definition: item.h:304
void copy(const LEX_STRING lex)
Definition: item.h:328
void set_or_copy(const char *str, size_t length, bool is_null_terminated)
Definition: item.h:290
bool eq_safe(const Name_string name) const
Definition: item.h:343
Name_string(const LEX_STRING str, bool is_null_terminated)
Definition: item.h:311
bool eq_safe(const char *str) const
Definition: item.h:338
Name_string(const LEX_STRING str)
Definition: item.h:305
Name_string()
Definition: item.h:298
bool eq(const char *str) const
Compare name to another name in C string, case insensitively.
Definition: item.h:334
void copy(const char *str, size_t length)
Variants for copy(), for various argument combinations.
Definition: item.h:322
Name_string(const LEX_CSTRING str)
Definition: item.h:306
Name_string(const char *str, size_t length, bool is_null_terminated)
Definition: item.h:307
void copy(const char *str, size_t length, const CHARSET_INFO *cs)
Allocate space using sql_strmake() or sql_strmake_with_convert().
Definition: item.cc:1221
bool eq(const Name_string name) const
Compare name to another name in Name_string, case insensitively.
Definition: item.h:342
void copy(const Name_string str)
Definition: item.h:330
void copy(const LEX_STRING *lex)
Definition: item.h:329
Base class for parse tree nodes (excluding the Parse_tree_root hierarchy)
Definition: parse_tree_node_base.h:139
Definition: protocol.h:33
This class represents a query block, aka a query specification, which is a query consisting of a SELE...
Definition: sql_lex.h:1156
Simple intrusive linked list.
Definition: sql_list.h:46
A set of THD members describing the current authenticated user.
Definition: sql_security_ctx.h:55
bool field
Definition: field.h:4650
virtual void set_out_param_info(Send_field *info)
Definition: item.h:698
virtual ~Settable_routine_parameter()=default
Settable_routine_parameter()=default
virtual void set_required_privilege(Access_bitmask privilege)
Set required privileges for accessing the parameter.
Definition: item.h:679
virtual bool set_value(THD *thd, sp_rcontext *ctx, Item **it)=0
virtual const Send_field * get_out_param_info() const
Definition: item.h:700
A wrapper class for null-terminated constant strings.
Definition: sql_string.h:75
const char * ptr() const
Return string buffer.
Definition: sql_string.h:106
bool is_set() const
Check if m_ptr is set.
Definition: sql_string.h:110
size_t length() const
Return name length.
Definition: sql_string.h:114
void set(const char *str_arg, size_t length_arg)
Initialize from a C string whose length is already known.
Definition: sql_string.h:84
Using this class is fraught with peril, and you need to be very careful when doing so.
Definition: sql_string.h:168
bool append(const String &s)
Definition: sql_string.cc:413
const CHARSET_INFO * charset() const
Definition: sql_string.h:241
const char * ptr() const
Definition: sql_string.h:250
bool set_or_copy_aligned(const char *s, size_t arg_length, const CHARSET_INFO *cs)
Definition: sql_string.cc:326
void mark_as_const()
Definition: sql_string.h:248
size_t length() const
Definition: sql_string.h:242
size_t numchars() const
Definition: sql_string.cc:532
bool copy()
Definition: sql_string.cc:192
void set(String &str, size_t offset, size_t arg_length)
Definition: sql_string.h:281
For each client connection we create a separate thread with THD serving as a thread/connection descri...
Definition: sql_lexer_thd.h:34
Table_ref * outer_join_nest() const
Returns the outer join nest that this Table_ref belongs to, if any.
Definition: table.h:3389
table_map map() const
Return table map derived from table number.
Definition: table.h:3883
bool is_view() const
Return true if this represents a named view.
Definition: table.h:3053
bool is_inner_table_of_outer_join() const
Return true if this table is an inner table of some outer join.
Definition: table.h:3404
bool outer_join
True if right argument of LEFT JOIN; false in other cases (i.e.
Definition: table.h:3716
Table_ref * next_local
Definition: table.h:3485
Table_ref * any_outer_leaf_table()
Return any leaf table that is not an inner table of an outer join.
Definition: table.h:3230
TABLE * table
Definition: table.h:3568
Table_ref * next_name_resolution_table
Definition: table.h:3565
This is an interface to be used from Item_trigger_field to access information about table trigger fie...
Definition: table_trigger_field_support.h:44
virtual TABLE * get_subject_table()=0
Type properties, used to collect type information for later assignment to an Item object.
Definition: item.h:627
const uint32 m_max_length
Definition: item.h:658
const bool m_unsigned_flag
Definition: item.h:657
const DTCollation m_collation
Definition: item.h:659
Type_properties(enum_field_types type_arg)
Constructor for any signed numeric type or date type Defaults are provided for attributes like signed...
Definition: item.h:631
Type_properties(enum_field_types type_arg, const CHARSET_INFO *charset)
Constructor for character type, with explicit character set.
Definition: item.h:649
Type_properties(enum_field_types type_arg, bool unsigned_arg)
Constructor for any numeric type, with explicit signedness.
Definition: item.h:639
const enum_field_types m_type
Definition: item.h:656
Class used as argument to Item::walk() together with used_tables_for_level()
Definition: item.h:269
Used_tables(Query_block *select)
Definition: item.h:271
table_map used_tables
Accumulated used tables data.
Definition: item.h:274
Query_block *const select
Level for which data is accumulated.
Definition: item.h:273
Definition: item_cmpfunc.h:1790
Definition: mem_root_deque.h:287
A (partial) implementation of std::deque allocating its blocks on a MEM_ROOT.
Definition: mem_root_deque.h:110
iterator begin()
Definition: mem_root_deque.h:438
iterator end()
Definition: mem_root_deque.h:439
my_decimal class limits 'decimal_t' type to what we need in MySQL.
Definition: my_decimal.h:94
uint precision() const
Definition: my_decimal.h:160
bool sign() const
Definition: my_decimal.h:158
sp_head represents one instance of a stored program.
Definition: sp_head.h:380
Definition: sp_rcontext.h:77
Definition: item_func.h:2953
static MEM_ROOT mem_root
Definition: client_plugin.cc:110
#define L
Definition: ctype-tis620.cc:76
#define U
Definition: ctype-tis620.cc:75
static constexpr int DECIMAL_NOT_SPECIFIED
Definition: decimal.h:154
#define E_DEC_OVERFLOW
Definition: decimal.h:144
enum_query_type
Query type constants (usable as bitmap flags).
Definition: enum_query_type.h:31
@ QT_NORMALIZED_FORMAT
Change all Item_basic_constant to ? (used by query rewrite to compute digest.) Un-resolved hints will...
Definition: enum_query_type.h:69
Fido Client Authentication nullptr
Definition: fido_client_plugin.cc:222
bool is_temporal_type_with_time(enum_field_types type)
Tests if field type is temporal and has time part, i.e.
Definition: field_common_properties.h:137
bool is_temporal_type(enum_field_types type)
Tests if field type is temporal, i.e.
Definition: field_common_properties.h:115
bool is_string_type(enum_field_types type)
Tests if field type is a string type.
Definition: field_common_properties.h:89
bool is_numeric_type(enum_field_types type)
Tests if field type is a numeric type.
Definition: field_common_properties.h:65
bool is_temporal_type_with_date(enum_field_types type)
Tests if field type is temporal and has date part, i.e.
Definition: field_common_properties.h:156
bool is_temporal_type_with_date_and_time(enum_field_types type)
Tests if field type is temporal and has date and time parts, i.e.
Definition: field_common_properties.h:177
This file contains the field type.
enum_field_types
Column types for MySQL.
Definition: field_types.h:53
@ MYSQL_TYPE_BOOL
Currently just a placeholder.
Definition: field_types.h:76
@ MYSQL_TYPE_TIME2
Internal to MySQL.
Definition: field_types.h:73
@ MYSQL_TYPE_VARCHAR
Definition: field_types.h:69
@ MYSQL_TYPE_LONGLONG
Definition: field_types.h:62
@ MYSQL_TYPE_LONG_BLOB
Definition: field_types.h:83
@ MYSQL_TYPE_VAR_STRING
Definition: field_types.h:85
@ MYSQL_TYPE_BLOB
Definition: field_types.h:84
@ MYSQL_TYPE_TINY
Definition: field_types.h:55
@ MYSQL_TYPE_TIME
Definition: field_types.h:65
@ MYSQL_TYPE_SET
Definition: field_types.h:80
@ MYSQL_TYPE_NEWDATE
Internal to MySQL.
Definition: field_types.h:68
@ MYSQL_TYPE_JSON
Definition: field_types.h:77
@ MYSQL_TYPE_STRING
Definition: field_types.h:86
@ MYSQL_TYPE_NULL
Definition: field_types.h:60
@ MYSQL_TYPE_ENUM
Definition: field_types.h:79
@ MYSQL_TYPE_TINY_BLOB
Definition: field_types.h:81
@ MYSQL_TYPE_LONG
Definition: field_types.h:57
@ MYSQL_TYPE_BIT
Definition: field_types.h:70
@ MYSQL_TYPE_INVALID
Definition: field_types.h:75
@ MYSQL_TYPE_GEOMETRY
Definition: field_types.h:87
@ MYSQL_TYPE_NEWDECIMAL
Definition: field_types.h:78
@ MYSQL_TYPE_DECIMAL
Definition: field_types.h:54
@ MYSQL_TYPE_TYPED_ARRAY
Used for replication only.
Definition: field_types.h:74
@ MYSQL_TYPE_DOUBLE
Definition: field_types.h:59
@ MYSQL_TYPE_MEDIUM_BLOB
Definition: field_types.h:82
@ MYSQL_TYPE_DATETIME2
Internal to MySQL.
Definition: field_types.h:72
@ MYSQL_TYPE_SHORT
Definition: field_types.h:56
@ MYSQL_TYPE_DATE
Definition: field_types.h:64
@ MYSQL_TYPE_FLOAT
Definition: field_types.h:58
@ MYSQL_TYPE_TIMESTAMP
Definition: field_types.h:61
@ MYSQL_TYPE_INT24
Definition: field_types.h:63
@ MYSQL_TYPE_DATETIME
Definition: field_types.h:66
@ MYSQL_TYPE_TIMESTAMP2
Definition: field_types.h:71
@ MYSQL_TYPE_YEAR
Definition: field_types.h:67
static const std::string dec("DECRYPTION")
void my_error(int nr, myf MyFlags,...)
Fill in and print a previously registered error message.
Definition: my_error.cc:216
static int flags[50]
Definition: hp_test1.cc:40
#define MY_COLL_ALLOW_SUPERSET_CONV
Definition: item.h:166
const Name_string null_name_string
monotonicity_info
Definition: item.h:581
@ NON_MONOTONIC
Definition: item.h:582
@ MONOTONIC_STRICT_INCREASING
Definition: item.h:585
@ MONOTONIC_INCREASING_NOT_NULL
Definition: item.h:584
@ MONOTONIC_INCREASING
Definition: item.h:583
@ MONOTONIC_STRICT_INCREASING_NOT_NULL
Definition: item.h:586
Item * GetNthVisibleField(const mem_root_deque< Item * > &fields, size_t index)
Definition: item.h:7219
longlong longlong_from_string_with_check(const CHARSET_INFO *cs, const char *cptr, const char *end, int unsigned_target)
Converts a string to a longlong integer, with warnings.
Definition: item.cc:3534
Bounds_checked_array< Item * > Ref_item_array
Definition: item.h:87
Item * TransformItem(Item *item, T &&transformer)
Same as WalkItem, but for Item::transform().
Definition: item.h:3618
bool agg_item_charsets_for_string_result(DTCollation &c, const char *name, Item **items, uint nitems, int item_sep=1)
Definition: item.h:3874
Item_result numeric_context_result_type(enum_field_types data_type, Item_result result_type, uint8 decimals)
Definition: item.h:139
bool WalkItem(Item *item, enum_walk walk, T &&functor)
A helper class to give in a functor to Item::walk().
Definition: item.h:3592
Cached_item * new_Cached_item(THD *thd, Item *item)
Create right type of Cached_item for an item.
Definition: item_buff.cc:55
bool agg_item_collations_for_comparison(DTCollation &c, const char *name, Item **items, uint nitems, uint flags)
Definition: item.cc:2548
Item * CompileItem(Item *item, T &&analyzer, U &&transformer)
Same as WalkItem, but for Item::compile().
Definition: item.h:3605
#define MY_COLL_DISALLOW_NONE
Definition: item.h:168
size_t CountHiddenFields(const mem_root_deque< Item * > &fields)
Definition: item.h:7214
static uint32 char_to_byte_length_safe(uint32 char_length_arg, uint32 mbmaxlen_arg)
Definition: item.h:133
void convert_and_print(const String *from_str, String *to_str, const CHARSET_INFO *to_cs)
Helper method: Convert string to the given charset, then print.
Definition: item.cc:10702
bool(Item::* Item_analyzer)(uchar **argp)
Definition: item.h:714
Item_field * FindEqualField(Item_field *item_field, table_map reachable_tables, bool replace, bool *found)
Definition: item.cc:10879
enum monotonicity_info enum_monotonicity_info
bool agg_item_set_converter(DTCollation &coll, const char *fname, Item **args, uint nargs, uint flags, int item_sep, bool only_consts)
Definition: item.cc:2554
void item_init(void)
Init all special items.
Definition: item.cc:127
size_t CountVisibleFields(const mem_root_deque< Item * > &fields)
Definition: item.h:7209
bool ItemsAreEqual(const Item *a, const Item *b, bool binary_cmp)
Returns true iff the two items are equal, as in a->eq(b), after unwrapping refs and Item_cache object...
Definition: item.cc:10951
Item_result item_cmp_type(Item_result a, Item_result b)
Definition: item.cc:9291
void(* Cond_traverser)(const Item *item, void *arg)
Definition: item.h:724
Item *(Item::* Item_transformer)(uchar *arg)
Type for transformers used by Item::transform and Item::compile.
Definition: item.h:723
#define NAME_STRING(x)
Definition: item.h:348
bool is_null_on_empty_table(THD *thd, Item_field *i)
Check if the column reference that is currently being resolved, will be set to NULL if its qualifying...
Definition: item.cc:5575
bool AllItemsAreEqual(const Item *const *a, const Item *const *b, int num_items, bool binary_cmp)
Returns true iff all items in the two arrays (which must be of the same size) are equal,...
Definition: item.cc:10955
std::string ItemToString(const Item *item)
Definition: item.cc:10867
const String my_null_string
double double_from_string_with_check(const CHARSET_INFO *cs, const char *cptr, const char *end)
Definition: item.cc:3502
#define COND_FILTER_ALLPASS
Default condition filtering (selectivity) values used by get_filtering_effect() and friends when bett...
Definition: item.h:102
#define MY_COLL_ALLOW_NUMERIC_CONV
Definition: item.h:169
bool agg_item_charsets_for_comparison(DTCollation &c, const char *name, Item **items, uint nitems, int item_sep=1)
Definition: item.h:3881
int stored_field_cmp_to_item(THD *thd, Field *field, Item *item)
Compare the value stored in field with the expression from the query.
Definition: item.cc:9450
#define MY_COLL_ALLOW_COERCIBLE_CONV
Definition: item.h:167
bool agg_item_charsets(DTCollation &c, const char *name, Item **items, uint nitems, uint flags, int item_sep, bool only_consts)
Definition: item.cc:2660
bool resolve_const_item(THD *thd, Item **ref, Item *cmp_item)
Substitute a const item with a simpler const item, if possible.
Definition: item.cc:9316
A better implementation of the UNIX ctype(3) library.
static constexpr uint32_t MY_CS_PUREASCII
Definition: m_ctype.h:142
#define MY_REPERTOIRE_UNICODE30
Definition: m_ctype.h:154
MYSQL_PLUGIN_IMPORT CHARSET_INFO * system_charset_info
Definition: mysqld.cc:1545
#define my_strcasecmp(s, a, b)
Definition: m_ctype.h:718
uint my_string_repertoire(const CHARSET_INFO *cs, const char *str, size_t len)
Definition: ctype.cc:775
CHARSET_INFO my_charset_utf8mb4_bin
Definition: ctype-utf8.cc:7794
MYSQL_PLUGIN_IMPORT CHARSET_INFO my_charset_bin
Definition: ctype-bin.cc:511
MYSQL_PLUGIN_IMPORT CHARSET_INFO my_charset_utf8mb3_general_ci
Definition: ctype-utf8.cc:5778
#define MY_REPERTOIRE_ASCII
Definition: m_ctype.h:152
#define NullS
Definition of the null string (a null pointer of type char *), used in some of our string handling co...
Definition: m_string.h:53
longlong my_strtoll10(const char *nptr, const char **endptr, int *error)
Definition: my_strtoll10.cc:87
Various macros useful for communicating with memory debuggers, such as Valgrind.
void TRASH(void *ptr, size_t length)
Put bad content in memory to be sure it will segfault if dereferenced.
Definition: memory_debugging.h:71
This file follows Google coding style, except for the name MEM_ROOT (which is kept for historical rea...
std::unique_ptr< T, Destroy_only< T > > unique_ptr_destroy_only
std::unique_ptr, but only destroying.
Definition: my_alloc.h:489
static void bitmap_set_bit(MY_BITMAP *map, uint bit)
Definition: my_bitmap.h:80
Header for compiler-dependent features.
#define DBUG_PRINT(keyword, arglist)
Definition: my_dbug.h:181
#define DBUG_FILE
Definition: my_dbug.h:194
#define DBUG_TRACE
Definition: my_dbug.h:146
It is interface module to fixed precision decimals library.
int my_decimal_int_part(uint precision, uint decimals)
Definition: my_decimal.h:82
void my_decimal_neg(decimal_t *arg)
Definition: my_decimal.h:364
int my_decimal_set_zero(my_decimal *d)
Definition: my_decimal.h:286
uint32 my_decimal_precision_to_length_no_truncation(uint precision, uint8 scale, bool unsigned_flag)
Definition: my_decimal.h:220
Utility functions for converting between ulonglong and double.
static constexpr double LLONG_MAX_DOUBLE
Definition: my_double2ulonglong.h:57
#define ulonglong2double(A)
Definition: my_double2ulonglong.h:46
Some integer typedefs for easier portability.
unsigned long long int ulonglong
Definition: my_inttypes.h:56
uint8_t uint8
Definition: my_inttypes.h:63
unsigned char uchar
Definition: my_inttypes.h:52
long long int longlong
Definition: my_inttypes.h:55
int8_t int8
Definition: my_inttypes.h:62
#define MY_INT32_NUM_DECIMAL_DIGITS
Definition: my_inttypes.h:100
#define MYF(v)
Definition: my_inttypes.h:97
int32_t int32
Definition: my_inttypes.h:66
uint16_t uint16
Definition: my_inttypes.h:65
#define MY_INT64_NUM_DECIMAL_DIGITS
Definition: my_inttypes.h:103
uint32_t uint32
Definition: my_inttypes.h:67
#define UINT_MAX32
Definition: my_inttypes.h:79
Common header for many mysys elements.
uint64_t table_map
Definition: my_table_map.h:30
Interface for low level time utilities.
unsigned int my_time_flags_t
Flags to str_to_datetime and number_to_datetime.
Definition: my_time.h:94
Common definition between mysql server & client.
#define MAX_BLOB_WIDTH
Default width for blob in bytes.
Definition: mysql_com.h:905
#define MAX_CHAR_WIDTH
Max width for a CHAR column, in number of characters.
Definition: mysql_com.h:903
Time declarations shared between the server and client API: you should not add anything to this heade...
enum_mysql_timestamp_type
Definition: mysql_time.h:45
static bool replace
Definition: mysqlimport.cc:66
std::string str(const mysqlrouter::ConfigGenerator::Options::Endpoint &ep)
Definition: config_generator.cc:1052
Definition: buf0block_hint.cc:30
const std::string charset("charset")
Definition: commit_order_queue.h:34
PT & ref(PT *tp)
Definition: tablespace_impl.cc:359
bool length(const dd::Spatial_reference_system *srs, const Geometry *g1, double *length, bool *null) noexcept
Computes the length of linestrings and multilinestrings.
Definition: length.cc:76
Cursor end()
A past-the-end Cursor.
Definition: rules_table_service.cc:192
std::map< Key, Value, Compare, ut::allocator< std::pair< const Key, Value > > > map
Specialization of map which uses ut_allocator.
Definition: ut0new.h:2893
struct result result
Definition: result.h:34
type_conversion_status
Status when storing a value in a field or converting from one datatype to another.
Definition: field.h:202
#define MY_REPERTOIRE_NUMERIC
Definition: field.h:258
enum_field_types real_type_to_type(enum_field_types real_type)
Convert temporal real types as returned by field->real_type() to field type as returned by field->typ...
Definition: field.h:393
Value_generator_source
Enum to indicate source for which value generator is used.
Definition: field.h:473
@ VGS_DEFAULT_EXPRESSION
Definition: field.h:475
@ VGS_GENERATED_COLUMN
Definition: field.h:474
#define my_charset_numeric
Definition: field.h:257
Derivation
For use.
Definition: field.h:179
@ DERIVATION_COERCIBLE
Definition: field.h:182
@ DERIVATION_SYSCONST
Definition: field.h:183
@ DERIVATION_EXPLICIT
Definition: field.h:186
@ DERIVATION_NONE
Definition: field.h:185
@ DERIVATION_NUMERIC
Definition: field.h:181
@ DERIVATION_IMPLICIT
Definition: field.h:184
@ DERIVATION_IGNORABLE
Definition: field.h:180
File containing constants that can be used throughout the server.
constexpr const table_map RAND_TABLE_BIT
Definition: sql_const.h:111
constexpr const int MAX_TIME_WIDTH
-838:59:59
Definition: sql_const.h:70
constexpr const int MAX_DATE_WIDTH
YYYY-MM-DD.
Definition: sql_const.h:68
constexpr const size_t STRING_BUFFER_USUAL_SIZE
Definition: sql_const.h:124
constexpr const table_map OUTER_REF_TABLE_BIT
Definition: sql_const.h:110
constexpr const int MAX_DOUBLE_STR_LENGTH
-[digits].E+###
Definition: sql_const.h:156
enum_walk
Enumeration for {Item,Query_block[_UNIT],Table_function}walk.
Definition: sql_const.h:286
bool(Item::*)(unsigned char *) Item_processor
Processor type for {Item,Query_block[_UNIT],Table_function}walk.
Definition: sql_const.h:304
constexpr const table_map INNER_TABLE_BIT
Definition: sql_const.h:109
constexpr const int MAX_DATETIME_WIDTH
YYYY-MM-DD HH:MM:SS.
Definition: sql_const.h:76
enum_mark_columns
Definition: sql_const.h:229
Our own string classes, used pervasively throughout the executor.
case opt name
Definition: sslopt-case.h:33
Access paths are a query planning structure that correspond 1:1 to iterators, in that an access path ...
Definition: access_path.h:193
Definition: m_ctype.h:385
uint mbmaxlen
Definition: m_ctype.h:409
Struct used to pass around arguments to/from check_function_as_value_generator.
Definition: item.h:488
int err_code
the error code found during check(if any)
Definition: item.h:495
int col_index
the order of the column in table
Definition: item.h:493
const char * banned_function_name
the name of the function which is not allowed
Definition: item.h:502
Value_generator_source source
Definition: item.h:500
int get_unnamed_function_error_code() const
Return the correct error code, based on whether or not if we are checking for disallowed functions in...
Definition: item.h:507
Check_function_as_value_generator_parameters(int default_error_code, Value_generator_source val_gen_src)
Definition: item.h:489
This class represents a subquery contained in some subclass of Item_subselect,.
Definition: item.h:785
Strategy strategy
The strategy for executing the subquery.
Definition: item.h:819
Strategy
The strategy for executing the subquery.
Definition: item.h:787
@ kMaterializable
An independent subquery that is materialized, e.g.
@ kIndependentSingleRow
An independent single-row subquery that is evaluated once, e.g.
@ kNonMaterializable
A subquery that is reevaluated for each row, e.g.
AccessPath * path
The root path of the subquery.
Definition: item.h:816
int row_width
The width (in bytes) of the subquery's rows.
Definition: item.h:825
The current state of the privilege checking process for the current user, SQL statement and SQL objec...
Definition: table.h:358
Aggregate_ref_update(Item_sum *target, Query_block *owner)
Definition: item.h:3079
Query_block * m_owner
Definition: item.h:3078
Item_sum * m_target
Definition: item.h:3077
Aggregate_replacement(Item_sum *target, Item_field *replacement)
Definition: item.h:3053
Item_field * m_replacement
Definition: item.h:3052
Item_sum * m_target
Definition: item.h:3051
Context struct used by walk method collect_scalar_subqueries to accumulate information about scalar s...
Definition: item.h:2794
Item * m_join_condition_context
Definition: item.h:2800
Location
Definition: item.h:2795
@ L_JOIN_COND
Definition: item.h:2795
@ L_HAVING
Definition: item.h:2795
@ L_SELECT
Definition: item.h:2795
@ L_WHERE
Definition: item.h:2795
bool m_collect_unconditionally
Definition: item.h:2801
int8 m_location
we are currently looking at this kind of clause, cf. enum Location
Definition: item.h:2799
Collect_scalar_subquery_info()=default
std::vector< Css_info > m_list
accumulated all scalar subqueries found
Definition: item.h:2797
Minion class under Collect_scalar_subquery_info.
Definition: item.h:2771
Item * m_join_condition
Where did we find item above? Used when m_location == L_JOIN_COND, nullptr for other locations.
Definition: item.h:2779
bool m_add_coalesce
If true, add a COALESCE around replaced subquery: used for implicitly grouped COUNT() in subquery sel...
Definition: item.h:2784
table_map m_correlation_map
Definition: item.h:2776
Item_singlerow_subselect * item
the scalar subquery
Definition: item.h:2775
int8 m_location
set of locations
Definition: item.h:2773
bool m_implicitly_grouped_and_no_union
If true, we can forego cardinality checking of the derived table.
Definition: item.h:2781
Mode m_default_value
Definition: item.h:3032
Field * m_target
The field to be replaced.
Definition: item.h:3025
Item_field_replacement(Field *target, Item_field *item, Query_block *select, Mode default_value=Mode::CONFLATE)
Definition: item.h:3033
Mode
Definition: item.h:3027
Item_field * m_item
The replacement field.
Definition: item.h:3026
Item_replacement(Query_block *transformed_block, Query_block *current_block)
Definition: item.h:3021
Query_block * m_curr_block
Transformed query block or a contained.
Definition: item.h:3018
Query_block * m_trans_block
Transformed query block.
Definition: item.h:3017
Item * m_target
The item identifying the view_ref to be replaced.
Definition: item.h:3042
Field * m_field
The replacement field.
Definition: item.h:3043
Item_view_ref_replacement(Item *target, Field *field, Query_block *select)
Definition: item.h:3046
< Argument object to change_context_processor
Definition: item.h:4097
Name_resolution_context * m_context
Definition: item.h:4098
Change_context(Name_resolution_context *context)
Definition: item.h:4099
Argument structure for walk processor Item::update_depended_from.
Definition: item.h:4114
Query_block * old_depended_from
Definition: item.h:4115
Query_block * new_depended_from
Definition: item.h:4116
The MEM_ROOT is a simple arena, where allocations are carved out of larger blocks.
Definition: my_alloc.h:83
void * Alloc(size_t length)
Allocate memory.
Definition: my_alloc.h:145
Definition: mysql_lex_string.h:40
const char * str
Definition: mysql_lex_string.h:41
size_t length
Definition: mysql_lex_string.h:42
Definition: mysql_lex_string.h:35
char * str
Definition: mysql_lex_string.h:36
size_t length
Definition: mysql_lex_string.h:37
Definition: mysql_time.h:82
Definition: my_bitmap.h:43
Name_resolution_context * next_context
Link to next name res context with the same query block as the base.
Definition: item.h:405
Name_resolution_context()
Definition: item.h:461
Table_ref * view_error_handler_arg
Definition: item.h:443
Name_resolution_context * outer_context
Definition: item.h:403
Security_context * security_ctx
Definition: item.h:459
Table_ref * first_name_resolution_table
Definition: item.h:423
void init()
Definition: item.h:471
Table_ref * last_name_resolution_table
Definition: item.h:428
Query_block * query_block
Definition: item.h:435
bool resolve_in_select_list
When true, items are resolved in this context against Query_block::item_list, SELECT_lex::group_list ...
Definition: item.h:453
bool view_error_handler
Definition: item.h:442
Table_ref * table_list
Definition: item.h:415
void resolve_in_table_list_only(Table_ref *tables)
Definition: item.h:478
Environment data for the contextualization phase.
Definition: parse_tree_node_base.h:121
const char * alias
alias or table name
Definition: table.h:1582
bool has_null_row() const
Definition: table.h:2093
MY_BITMAP * fields_set_during_insert
A pointer to the bitmap of table fields (columns), which are explicitly set in the INSERT INTO statem...
Definition: table.h:1661
bool alias_name_used
Definition: table.h:1787
bool is_nullable() const
Return whether table is nullable.
Definition: table.h:1995
void mark_column_used(Field *field, enum enum_mark_columns mark)
Mark column as either read or written (or none) according to mark_used.
Definition: table.cc:5421
Bison "location" class.
Definition: parse_location.h:43
Definition: completion_hash.h:35
Descriptor of what and how to cache for Item::cache_const_expr_transformer/analyzer.
Definition: item.h:3573
Item * cache_item
Item to cache. Used as a binary flag, but kept as Item* for assertion.
Definition: item.h:3578
List< Item > stack
Path from the expression's top to the current item in item tree used to track parent of current item ...
Definition: item.h:3576
Item::enum_const_item_cache cache_arg
How to cache JSON data.
Definition: item.h:3580
Replacement of system's struct timeval to ensure we can carry 64 bit values even on a platform which ...
Definition: my_time_t.h:45
This file defines all base public constants related to triggers in MySQL.
enum_trigger_variable_type
Enum constants to designate NEW and OLD trigger pseudo-variables.
Definition: trigger_def.h:73
unsigned int uint
Definition: uca9-dump.cc:75
Item_result
Type of the user defined function return slot and arguments.
Definition: udf_registration_types.h:39
@ STRING_RESULT
not valid for UDFs
Definition: udf_registration_types.h:41
@ DECIMAL_RESULT
not valid for UDFs
Definition: udf_registration_types.h:45
@ REAL_RESULT
char *
Definition: udf_registration_types.h:42
@ INT_RESULT
double
Definition: udf_registration_types.h:43
@ INVALID_RESULT
Definition: udf_registration_types.h:40
@ ROW_RESULT
long long
Definition: udf_registration_types.h:44