1#ifndef ITEM_FUNC_INCLUDED
2#define ITEM_FUNC_INCLUDED
51#include "mysqld_error.h"
119 if (
args ==
nullptr) {
527 bool eq(
const Item *item)
const override;
581 uint nitems,
int item_sep = 1) {
591 uint nitems,
int item_sep = 1) {
607 replace->stack.push_front(
this);
612 pointer_cast<Replace_equal *>(arg)->stack.pop();
800 const MY_BITMAP *fields_to_ignore)
const;
817 pointer_cast<Check_function_as_value_generator_parameters *>(
1089 const char *
func_name()
const override {
return "connection_id"; }
1095 pointer_cast<Check_function_as_value_generator_parameters *>(
1108 const char *
func_name()
const override {
return "cast_as_signed"; }
1121 const char *
func_name()
const override {
return "cast_as_unsigned"; }
1155 const char *
func_name()
const override {
return "cast_as_decimal"; }
1167 obj->
add_alias(
"is_double", create_dom_ptr<Json_boolean>(
1191 const char *
func_name()
const override {
return "cast_as_real"; }
1475 const char *
func_name()
const override {
return "ceiling"; }
1509 return truncate ?
"truncate" :
"round";
1550 pointer_cast<Check_function_as_value_generator_parameters *>(
1587 const char *
func_name()
const override {
return "degrees"; }
1595 const char *
func_name()
const override {
return "radians"; }
1688 const char *
func_name()
const override {
return "greatest"; }
1737 const char *
func_name()
const override {
return "rollup_group_item"; }
1802 const char *
func_name()
const override {
return "vector_dim"; }
1826 const char *
func_name()
const override {
return "bit_length"; }
1836 const char *
func_name()
const override {
return "char_length"; }
1849 const char *
func_name()
const override {
return "coercibility"; }
1888 return "validate_password_strength";
1945 const char *
func_name()
const override {
return "find_in_set"; }
2021 template <
class Char_func,
class Int_func>
2023 template <
class Int_func>
2040 return eval_str_op(
str, std::bit_or<char>(), std::bit_or<ulonglong>());
2053 return eval_str_op(
str, std::bit_and<char>(), std::bit_and<ulonglong>());
2066 return eval_str_op(
str, std::bit_xor<char>(), std::bit_xor<ulonglong>());
2074 const char *
func_name()
const override {
return "bit_count"; }
2091 template <
bool to_left>
2093 template <
bool to_left>
2152 const char *
func_name()
const override {
return "last_insert_id"; }
2165 pointer_cast<Check_function_as_value_generator_parameters *>(
2186 const char *
func_name()
const override {
return "benchmark"; }
2198 pointer_cast<Check_function_as_value_generator_parameters *>(
2227 pointer_cast<Check_function_as_value_generator_parameters *>(
2266 pointer_cast<Check_function_as_value_generator_parameters *>(
2363 const char *end_not_used;
2367 &end_not_used, &err_not_used)
2375 nullptr, &err_not_used)
2380 if (!res)
return nullptr;
2409 const char *
func_name()
const override {
return "get_lock"; }
2420 pointer_cast<Check_function_as_value_generator_parameters *>(
2437 const char *
func_name()
const override {
return "release_lock"; }
2447 pointer_cast<Check_function_as_value_generator_parameters *>(
2462 const char *
func_name()
const override {
return "release_all_locks"; }
2470 pointer_cast<Check_function_as_value_generator_parameters *>(
2493 const char *
func_name()
const override {
return "source_pos_wait"; }
2504 pointer_cast<Check_function_as_value_generator_parameters *>(
2532 const char *
func_name()
const override {
return "can_access_database"; }
2544 const char *
func_name()
const override {
return "can_access_table"; }
2556 const char *
func_name()
const override {
return "can_access_user"; }
2568 const char *
func_name()
const override {
return "can_access_trigger"; }
2581 const char *
func_name()
const override {
return "can_access_routine"; }
2593 const char *
func_name()
const override {
return "can_access_event"; }
2605 const char *
func_name()
const override {
return "can_access_resource_group"; }
2618 const char *
func_name()
const override {
return "can_access_view"; }
2630 const char *
func_name()
const override {
return "can_access_column"; }
2646 const char *
func_name()
const override {
return "is_visible_dd_object"; }
2660 const char *
func_name()
const override {
return "internal_table_rows"; }
2675 const char *
func_name()
const override {
return "internal_avg_row_length"; }
2690 const char *
func_name()
const override {
return "internal_data_length"; }
2705 const char *
func_name()
const override {
return "internal_max_data_length"; }
2720 const char *
func_name()
const override {
return "internal_index_length"; }
2735 const char *
func_name()
const override {
return "internal_data_free"; }
2750 const char *
func_name()
const override {
return "internal_auto_increment"; }
2765 const char *
func_name()
const override {
return "internal_checksum"; }
2778 const char *
func_name()
const override {
return "internal_keys_disabled"; }
2794 return "internal_index_column_cardinality";
2809 const char *
func_name()
const override {
return "internal_dd_char_length"; }
2825 return "internal_get_view_warning_or_error";
2846 return "get_dd_index_sub_part_length";
2857 const char *
func_name()
const override {
return "internal_tablespace_id"; }
2876 return "internal_tablespace_logfile_group_number";
2896 return "internal_tablespace_free_extents";
2916 return "internal_tablespace_total_extents";
2936 return "internal_tablespace_extent_size";
2956 return "internal_tablespace_initial_size";
2976 return "internal_tablespace_maximum_size";
2996 return "internal_tablespace_autoextend_size";
3016 return "internal_tablespace_version";
3036 return "internal_tablespace_data_free";
3070 pointer_cast<Check_function_as_value_generator_parameters *>(
3073 ? ER_CHECK_CONSTRAINT_VARIABLES
3074 : ER_DEFAULT_VAL_GENERATED_VARIABLES;
3274 double val_real(
bool *null_value)
const;
3323 bool check(
bool use_result_field);
3333 const char *
func_name()
const override {
return "set_user_var"; }
3336 bool can_use_result_field);
3347 bool no_conversions)
override {
3382 const char *
func_name()
const override {
return "get_user_var"; }
3438#define GET_SYS_VAR_CACHE_LONG 1
3439#define GET_SYS_VAR_CACHE_DOUBLE 2
3440#define GET_SYS_VAR_CACHE_STRING 4
3485 template <
typename T>
3512 const char *
func_name()
const override {
return "get_system_var"; }
3608 pointer_cast<Check_function_as_value_generator_parameters *>(
3666 double rows_in_table)
override;
3789 assert(tr && tr->
file);
3827 const char *
func_name()
const override {
return "is_free_lock"; }
3837 pointer_cast<Check_function_as_value_generator_parameters *>(
3854 const char *
func_name()
const override {
return "is_used_lock"; }
3864 pointer_cast<Check_function_as_value_generator_parameters *>(
3880 const char *
func_name()
const override {
return "row_count"; }
3887 pointer_cast<Check_function_as_value_generator_parameters *>(
3926 const LEX_STRING &fn_name,
bool use_explicit_name,
3958 pointer_cast<Item_ident::Change_context *>(arg)->m_context;
3971 pointer_cast<Check_function_as_value_generator_parameters *>(
3990 const char *
func_name()
const override {
return "found_rows"; }
3997 pointer_cast<Check_function_as_value_generator_parameters *>(
4013 const char *
func_name()
const override {
return "uuid_short"; }
4022 pointer_cast<Check_function_as_value_generator_parameters *>(
4054 return "internal_is_mandatory_role";
4069 return "internal_use_terminology_previous";
4088 const char *
func_name()
const override {
return "internal_is_enabled_role"; }
4120 bool unsafe_for_replication);
4124 bool unsafe_for_replication) {
4126 unsafe_for_replication);
4135 Field **found =
nullptr);
Kerberos Client Authentication nullptr
Definition: auth_kerberos_client_plugin.cc:251
int64 query_id_t
Definition: binlog.h:72
Class to log audit event EVENT_TRACKING_GLOBAL_VARIABLE_GET.
Definition: item_func.h:3445
Audit_global_variable_get_event(THD *thd, Item_func_get_system_var *item, uchar cache_type)
Definition: item_func.cc:7200
THD * m_thd
Definition: item_func.h:3453
~Audit_global_variable_get_event()
Definition: item_func.cc:7213
bool m_audit_event
Definition: item_func.h:3472
Item_func_get_system_var * m_item
Definition: item_func.h:3456
uchar m_val_type
Definition: item_func.h:3465
This class represents the cost of evaluating an Item.
Definition: item.h:791
void MarkExpensive()
Definition: item.h:800
void set_numeric()
Definition: item.h:221
const CHARSET_INFO * collation
Definition: item.h:187
Wrapper for struct ft_hints.
Definition: handler.h:4125
uint get_flags() const
Get Ft_hints flags.
Definition: handler.h:4188
enum ft_operation get_op_type() const
Get Ft_hints operation type.
Definition: handler.h:4181
void set_hint_op(enum ft_operation type, double value)
Set comparison operation type and and value for master MATCH function.
Definition: handler.h:4143
Definition: item_func.h:1342
Item_dec_func(const POS &pos, Item *a)
Definition: item_func.h:1345
Item_dec_func(const POS &pos, Item *a, Item *b)
Definition: item_func.h:1347
Item_dec_func(Item *a)
Definition: item_func.h:1344
bool resolve_type(THD *thd) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_func.cc:2828
Definition: item_func.h:1327
enum Functype functype() const override
Definition: item_func.h:1337
double real_op() override
Performs the operation that this functions implements when the result type is REAL.
Definition: item_func.cc:2797
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_func.h:1336
my_decimal * decimal_op(my_decimal *) override
Performs the operation that this functions implements when the result type is DECIMAL.
Definition: item_func.cc:2812
const char * func_name() const override
Definition: item_func.h:1333
bool check_partition_func_processor(uchar *) override
Check if a partition function is allowed.
Definition: item_func.h:1335
longlong int_op() override
Performs the operation that this functions implements when the result type is INT.
Definition: item_func.cc:2803
Item_func_abs(const POS &pos, Item *a)
Definition: item_func.h:1329
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_func.cc:2822
Definition: item_func.h:1407
const char * func_name() const override
Definition: item_func.h:1411
double val_real() override
Definition: item_func.cc:2926
enum Functype functype() const override
Definition: item_func.h:1412
Item_func_acos(const POS &pos, Item *a)
Definition: item_func.h:1409
Definition: item_func.h:1197
Item_func_additive_op(const POS &pos, Item *a, Item *b)
Definition: item_func.h:1200
Item_func_additive_op(Item *a, Item *b)
Definition: item_func.h:1199
void result_precision() override
Set precision of results for additive operations (+ and -)
Definition: item_func.cc:2209
bool check_partition_func_processor(uchar *) override
Check if a partition function is allowed.
Definition: item_func.h:1204
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_func.h:1205
Definition: item_func.h:1909
const char * func_name() const override
Definition: item_func.h:1915
longlong val_int() override
Definition: item_func.cc:4389
String value
Definition: item_func.h:1910
bool resolve_type(THD *thd) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_func.h:1916
Item_func_ascii(const POS &pos, Item *a)
Definition: item_func.h:1913
Definition: item_func.h:1415
double val_real() override
Definition: item_func.cc:2936
enum Functype functype() const override
Definition: item_func.h:1420
const char * func_name() const override
Definition: item_func.h:1419
Item_func_asin(const POS &pos, Item *a)
Definition: item_func.h:1417
Definition: item_func.h:1423
enum Functype functype() const override
Definition: item_func.h:1429
double val_real() override
Definition: item_func.cc:2944
Item_func_atan(const POS &pos, Item *a, Item *b)
Definition: item_func.h:1426
Item_func_atan(const POS &pos, Item *a)
Definition: item_func.h:1425
const char * func_name() const override
Definition: item_func.h:1428
Definition: item_func.h:2172
void print(const THD *thd, String *str, enum_query_type query_type) const override
This method is used for to:
Definition: item_func.cc:5878
bool resolve_type(THD *thd) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_func.h:2187
table_map get_initial_pseudo_tables() const override
Ensure that "benchmark()" is never optimized away.
Definition: item_func.h:2180
bool do_itemize(Parse_context *pc, Item **res) override
The core function that does the actual itemization.
Definition: item_func.cc:5819
bool check_function_as_value_generator(uchar *checker_args) override
Check if this item is allowed for a virtual column or inside a default expression.
Definition: item_func.h:2196
Item_int_func super
Definition: item_func.h:2173
Item_func_benchmark(const POS &pos, Item *count_expr, Item *expr)
Definition: item_func.h:2176
longlong val_int() override
Definition: item_func.cc:5828
const char * func_name() const override
Definition: item_func.h:2186
Definition: item_func.h:2044
longlong int_op() override
Performs the operation on integers to produce a result of type INT_RESULT.
Definition: item_func.h:2051
const char * func_name() const override
Definition: item_func.h:2048
Item_func_bit_and(const POS &pos, Item *a, Item *b)
Definition: item_func.h:2046
String * str_op(String *str) override
Performs the operation on binary strings to produce a result of type STRING_RESULT.
Definition: item_func.h:2052
Definition: item_func.h:2070
bool resolve_type(THD *thd) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_func.h:2075
longlong val_int() override
Definition: item_func.cc:4529
const char * func_name() const override
Definition: item_func.h:2074
Item_func_bit_count(const POS &pos, Item *a)
Definition: item_func.h:2072
Definition: item_func.h:1819
const char * func_name() const override
Definition: item_func.h:1826
longlong val_int() override
Definition: item_func.h:1822
Item_func_bit_length(const POS &pos, Item *a)
Definition: item_func.h:1821
Definition: item_func.h:2123
void print(const THD *thd, String *str, enum_query_type query_type) const override
This method is used for to:
Definition: item_func.h:2132
Item_func_bit_neg(const POS &pos, Item *a)
Definition: item_func.h:2130
longlong int_op() override
Performs the operation on integers to produce a result of type INT_RESULT.
Definition: item_func.cc:3178
bool binary_result_requires_binary_second_arg() const override
Definition: item_func.h:2125
String * str_op(String *str) override
Performs the operation on binary strings to produce a result of type STRING_RESULT.
Definition: item_func.cc:3186
const char * func_name() const override
Definition: item_func.h:2131
Definition: item_func.h:2031
const char * func_name() const override
Definition: item_func.h:2035
String * str_op(String *str) override
Performs the operation on binary strings to produce a result of type STRING_RESULT.
Definition: item_func.h:2039
longlong int_op() override
Performs the operation on integers to produce a result of type INT_RESULT.
Definition: item_func.h:2038
Item_func_bit_or(const POS &pos, Item *a, Item *b)
Definition: item_func.h:2033
Base class for all the bit functions that work with two binary arguments: '&', '|',...
Definition: item_func.h:2016
String * eval_str_op(String *, Char_func char_func, Int_func int_func)
Template function that evaluates the bitwise operation over binary arguments.
Definition: item_func.cc:3244
bool binary_result_requires_binary_second_arg() const override
Definition: item_func.h:2018
longlong eval_int_op(Int_func int_func)
Template function used to evaluate the bitwise operation over int arguments.
Definition: item_func.cc:3218
Item_func_bit_two_param(const POS &pos, Item *a, Item *b)
Definition: item_func.h:2027
Definition: item_func.h:2057
const char * func_name() const override
Definition: item_func.h:2061
Item_func_bit_xor(const POS &pos, Item *a, Item *b)
Definition: item_func.h:2059
longlong int_op() override
Performs the operation on integers to produce a result of type INT_RESULT.
Definition: item_func.h:2064
String * str_op(String *str) override
Performs the operation on binary strings to produce a result of type STRING_RESULT.
Definition: item_func.h:2065
Definition: item_func.h:1954
virtual longlong int_op()=0
Performs the operation on integers to produce a result of type INT_RESULT.
void print(const THD *thd, String *str, enum_query_type query_type) const override
This method is used for to:
Definition: item_func.h:1978
String tmp_value
Buffer storing the determined value.
Definition: item_func.h:1959
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_func.cc:2990
virtual bool binary_result_requires_binary_second_arg() const =0
my_decimal * val_decimal(my_decimal *decimal_value) override
Definition: item_func.cc:3051
double val_real() override
Definition: item_func.cc:3035
String * val_str(String *str) override
Definition: item_func.cc:3059
Item_result hybrid_type
Stores the Item's result type. Can only be INT_RESULT or STRING_RESULT.
Definition: item_func.h:1957
bool get_date(MYSQL_TIME *ltime, my_time_flags_t fuzzydate) override
Definition: item_func.h:1982
longlong val_int() override
Definition: item_func.cc:3019
Item_func_bit(const POS &pos, Item *a)
Definition: item_func.h:1968
virtual String * str_op(String *)=0
Performs the operation on binary strings to produce a result of type STRING_RESULT.
enum Item_result result_type() const override
Definition: item_func.h:1971
Item_func_bit(const POS &pos, Item *a, Item *b)
Definition: item_func.h:1967
bool get_time(MYSQL_TIME *ltime) override
Definition: item_func.h:1988
Definition: item_func.h:2625
const char * func_name() const override
Definition: item_func.h:2630
longlong val_int() override
INFORMATION_SCHEMA picks metadata from DD using system views.
Definition: item_func.cc:9127
Item_func_can_access_column(const POS &pos, Item *a, Item *b, Item *c)
Definition: item_func.h:2627
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_func.h:2631
Internal functions used by INFORMATION_SCHEMA implementation to check if user have access to given da...
Definition: item_func.h:2527
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_func.h:2533
Item_func_can_access_database(const POS &pos, Item *a)
Definition: item_func.h:2529
longlong val_int() override
INFORMATION_SCHEMA picks metadata from DD using system views.
Definition: item_func.cc:8719
const char * func_name() const override
Definition: item_func.h:2532
Definition: item_func.h:2589
Item_func_can_access_event(const POS &pos, Item *a)
Definition: item_func.h:2591
const char * func_name() const override
Definition: item_func.h:2593
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_func.h:2594
longlong val_int() override
INFORMATION_SCHEMA picks metadata from DD using system views.
Definition: item_func.cc:9012
Definition: item_func.h:2600
const char * func_name() const override
Definition: item_func.h:2605
Item_func_can_access_resource_group(const POS &pos, Item *a)
Definition: item_func.h:2602
longlong val_int() override
INFORMATION_SCHEMA picks metadata from DD using system views.
Definition: item_func.cc:9064
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_func.h:2606
Definition: item_func.h:2576
Item_func_can_access_routine(const POS &pos, PT_item_list *list)
Definition: item_func.h:2578
const char * func_name() const override
Definition: item_func.h:2581
longlong val_int() override
INFORMATION_SCHEMA picks metadata from DD using system views.
Definition: item_func.cc:8929
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_func.h:2582
Definition: item_func.h:2539
const char * func_name() const override
Definition: item_func.h:2544
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_func.h:2545
Item_func_can_access_table(const POS &pos, Item *a, Item *b)
Definition: item_func.h:2541
longlong val_int() override
INFORMATION_SCHEMA picks metadata from new DD using system views.
Definition: item_func.cc:8843
Definition: item_func.h:2563
Item_func_can_access_trigger(const POS &pos, Item *a, Item *b)
Definition: item_func.h:2565
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_func.h:2569
longlong val_int() override
INFORMATION_SCHEMA picks metadata from new DD using system views.
Definition: item_func.cc:8907
const char * func_name() const override
Definition: item_func.h:2568
Definition: item_func.h:2551
const char * func_name() const override
Definition: item_func.h:2556
Item_func_can_access_user(const POS &pos, Item *a, Item *b)
Definition: item_func.h:2553
longlong val_int() override
INFORMATION_SCHEMA picks metadata from new DD using system views.
Definition: item_func.cc:8866
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_func.h:2557
Definition: item_func.h:2613
longlong val_int() override
INFORMATION_SCHEMA picks metadata from DD using system views.
Definition: item_func.cc:9202
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_func.h:2619
Item_func_can_access_view(const POS &pos, Item *a, Item *b, Item *c, Item *d)
Definition: item_func.h:2615
const char * func_name() const override
Definition: item_func.h:2618
Definition: item_func.h:1471
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_func.h:1480
bool check_partition_func_processor(uchar *) override
Check if a partition function is allowed.
Definition: item_func.h:1479
const char * func_name() const override
Definition: item_func.h:1475
enum Functype functype() const override
Definition: item_func.h:1481
double real_op() override
Performs the operation that this functions implements when the result type is REAL.
Definition: item_func.cc:3407
my_decimal * decimal_op(my_decimal *) override
Performs the operation that this functions implements when the result type is DECIMAL.
Definition: item_func.cc:3413
Item_func_ceiling(const POS &pos, Item *a)
Definition: item_func.h:1474
longlong int_op() override
Performs the operation that this functions implements when the result type is INT.
Definition: item_func.cc:3386
Item_func_ceiling(Item *a)
Definition: item_func.h:1473
Definition: item_func.h:1829
Item_func_char_length(Item *a)
Definition: item_func.h:1833
Item_func_char_length(const POS &pos, Item *a)
Definition: item_func.h:1834
bool resolve_type(THD *thd) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_func.h:1837
longlong val_int() override
Definition: item_func.cc:4241
const char * func_name() const override
Definition: item_func.h:1836
String value
Definition: item_func.h:1830
Definition: item_func.h:1843
const char * func_name() const override
Definition: item_func.h:1849
bool resolve_type(THD *thd) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_func.h:1850
longlong val_int() override
Definition: item_func.cc:4252
Item_func_coercibility(const POS &pos, Item *a)
Definition: item_func.h:1845
Definition: item_func.h:1079
bool resolve_type(THD *thd) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_func.cc:1486
table_map get_initial_pseudo_tables() const override
Returns the pseudo tables depended upon in order to evaluate this function expression.
Definition: item_func.h:1085
Item_int_func super
Definition: item_func.h:1080
const char * func_name() const override
Definition: item_func.h:1089
bool check_function_as_value_generator(uchar *checker_args) override
Check if this item is allowed for a virtual column or inside a default expression.
Definition: item_func.h:1093
Item_func_connection_id(const POS &pos)
Definition: item_func.h:1083
longlong val_int() override
Definition: item_func.cc:1498
bool fix_fields(THD *thd, Item **ref) override
Definition: item_func.cc:1492
bool do_itemize(Parse_context *pc, Item **res) override
The core function that does the actual itemization.
Definition: item_func.cc:1479
Definition: item_func.h:1432
enum Functype functype() const override
Definition: item_func.h:1437
const char * func_name() const override
Definition: item_func.h:1436
double val_real() override
Definition: item_func.cc:2956
Item_func_cos(const POS &pos, Item *a)
Definition: item_func.h:1434
Definition: item_func.h:1456
const char * func_name() const override
Definition: item_func.h:1460
enum Functype functype() const override
Definition: item_func.h:1461
double val_real() override
Definition: item_func.cc:2977
Item_func_cot(const POS &pos, Item *a)
Definition: item_func.h:1458
Definition: item_func.h:1583
Item_func_degrees(const POS &pos, Item *a)
Definition: item_func.h:1585
const char * func_name() const override
Definition: item_func.h:1587
enum Functype functype() const override
Definition: item_func.h:1588
Definition: item_func.h:1256
Item_func_div_base(const POS &pos, Item *a, Item *b)
Definition: item_func.h:1258
Item_func_div_base(Item *a, Item *b)
Definition: item_func.h:1260
uint m_prec_increment
Definition: item_func.h:1267
my_decimal * decimal_op(my_decimal *) override
Performs the operation that this functions implements when the result type is DECIMAL.
Definition: item_func.cc:2465
double real_op() override
Performs the operation that this functions implements when the result type is REAL.
Definition: item_func.cc:2450
longlong int_op() override
Performs the operation that this functions implements when the result type is INT.
Definition: item_func.cc:2555
enum Functype functype() const override
Definition: item_func.h:1264
Definition: item_func.h:1279
bool resolve_type(THD *thd) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_func.cc:2617
void set_numeric_type() override
Check arguments to determine the data type for a numeric function of two arguments.
Definition: item_func.cc:2628
bool check_partition_func_processor(uchar *) override
Check if a partition function is allowed.
Definition: item_func.h:1291
Item_func_div_int(const POS &pos, Item *a, Item *b)
Definition: item_func.h:1282
enum_field_types default_data_type() const override
Get the default data (output) type for the specific item.
Definition: item_func.h:1285
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_func.h:1292
void result_precision() override
Definition: item_func.cc:2501
const char * func_name() const override
Definition: item_func.h:1284
Item_func_div_int(Item *a, Item *b)
Definition: item_func.h:1281
Definition: item_func.h:1270
void result_precision() override
Definition: item_func.cc:2484
Item_func_div(const POS &pos, Item *a, Item *b)
Definition: item_func.h:1272
const char * func_name() const override
Definition: item_func.h:1274
bool resolve_type(THD *thd) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_func.cc:2521
Definition: item_func.h:1351
double val_real() override
Definition: item_func.cc:2899
enum Functype functype() const override
Definition: item_func.h:1356
const char * func_name() const override
Definition: item_func.h:1355
Item_func_exp(const POS &pos, Item *a)
Definition: item_func.h:1353
Definition: item_func.h:1897
String value
Definition: item_func.h:1898
bool resolve_type(THD *thd) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_func.cc:4374
const char * func_name() const override
Definition: item_func.h:1905
String tmp
Definition: item_func.h:1898
Item_func_field(const POS &pos, PT_item_list *opt_list)
Definition: item_func.h:1902
longlong val_int() override
Definition: item_func.cc:4331
Item_result cmp_type
Definition: item_func.h:1899
Definition: item_func.h:1931
const CHARSET_INFO * compare_collation() const override
Definition: item_func.h:1947
const char * func_name() const override
Definition: item_func.h:1945
Item_func_find_in_set(const POS &pos, Item *a, Item *b)
Definition: item_func.h:1942
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_func.cc:4423
longlong val_int() override
Definition: item_func.cc:4451
String value2
Definition: item_func.h:1932
DTCollation cmp_collation
Definition: item_func.h:1939
uint m_enum_value
Definition: item_func.h:1938
String value
Definition: item_func.h:1932
Definition: item_func.h:1484
my_decimal * decimal_op(my_decimal *) override
Performs the operation that this functions implements when the result type is DECIMAL.
Definition: item_func.cc:3449
const char * func_name() const override
Definition: item_func.h:1488
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_func.h:1493
double real_op() override
Performs the operation that this functions implements when the result type is REAL.
Definition: item_func.cc:3443
bool check_partition_func_processor(uchar *) override
Check if a partition function is allowed.
Definition: item_func.h:1492
Item_func_floor(const POS &pos, Item *a)
Definition: item_func.h:1487
Item_func_floor(Item *a)
Definition: item_func.h:1486
longlong int_op() override
Performs the operation that this functions implements when the result type is INT.
Definition: item_func.cc:3422
enum Functype functype() const override
Definition: item_func.h:1494
Definition: item_func.h:3982
Item_func_found_rows(const POS &pos)
Definition: item_func.h:3986
longlong val_int() override
Definition: item_func.cc:8479
bool check_function_as_value_generator(uchar *checker_args) override
Check if this item is allowed for a virtual column or inside a default expression.
Definition: item_func.h:3995
bool do_itemize(Parse_context *pc, Item **res) override
The core function that does the actual itemization.
Definition: item_func.cc:8468
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_func.h:3991
Item_int_func super
Definition: item_func.h:3983
const char * func_name() const override
Definition: item_func.h:3990
Definition: item_func.h:2835
const char * func_name() const override
Definition: item_func.h:2845
longlong val_int() override
INFORMATION_SCHEMA picks metadata from DD using system views.
Definition: item_func.cc:10045
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_func.h:2840
Item_func_get_dd_index_sub_part_length(const POS &pos, PT_item_list *list)
Definition: item_func.h:2837
Definition: item_func.h:2398
bool check_function_as_value_generator(uchar *checker_args) override
Check if this item is allowed for a virtual column or inside a default expression.
Definition: item_func.h:2418
bool resolve_type(THD *thd) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_func.h:2410
Item_int_func super
Definition: item_func.h:2399
Item_func_get_lock(const POS &pos, Item *a, Item *b)
Definition: item_func.h:2404
bool do_itemize(Parse_context *pc, Item **res) override
The core function that does the actual itemization.
Definition: item_func.cc:5495
const char * func_name() const override
Definition: item_func.h:2409
String value
Definition: item_func.h:2401
bool is_non_const_over_literals(uchar *) override
Definition: item_func.h:2417
longlong val_int() override
Get a user level lock.
Definition: item_func.cc:5520
Definition: item_func.h:3475
const enum_var_type var_scope
Definition: item_func.h:3476
table_map get_initial_pseudo_tables() const override
Returns the pseudo tables depended upon in order to evaluate this function expression.
Definition: item_func.h:3494
longlong get_sys_var_safe(THD *thd, sys_var *var)
Definition: item_func.cc:7248
bool eq_specific(const Item *item) const override
Provide a more specific equality check for a function.
Definition: item_func.cc:7526
longlong cached_llval
Definition: item_func.h:3477
enum Functype functype() const override
Definition: item_func.h:3493
Item_func_get_system_var(const System_variable_tracker &, enum_var_type scope)
Definition: item_func.cc:7148
double val_real() override
Definition: item_func.cc:7439
String cached_strval
Definition: item_func.h:3479
const char * func_name() const override
Definition: item_func.h:3512
longlong val_int() override
Definition: item_func.cc:7263
const System_variable_tracker var_tracker
Definition: item_func.h:3483
query_id_t used_query_id
Definition: item_func.h:3481
bool is_valid_for_pushdown(uchar *arg) override
Check if all the columns present in this expression are from the derived table.
Definition: item_func.h:3514
bool cached_null_value
Definition: item_func.h:3480
uchar cache_present
Definition: item_func.h:3482
double cached_dval
Definition: item_func.h:3478
enum Item_result result_type() const override
Definition: item_func.h:3501
bool is_non_const_over_literals(uchar *) override
Definition: item_func.h:3500
String * val_str(String *) override
Definition: item_func.cc:7346
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_func.cc:7154
my_decimal * val_decimal(my_decimal *dec_buf) override
Definition: item_func.h:3508
void cleanup() override
Called for every Item after use (preparation and execution).
Definition: item_func.cc:7532
void print(const THD *thd, String *str, enum_query_type query_type) const override
This method is used for to:
Definition: item_func.cc:7195
Definition: item_func.h:3353
Name_string name
Definition: item_func.h:3358
enum Item_result result_type() const override
Definition: item_func.cc:7055
double val_real() override
Definition: item_func.cc:6705
const CHARSET_INFO * charset_for_protocol() override
Definition: item_func.cc:6739
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_func.cc:6903
Item_func_get_user_var(Name_string a)
Definition: item_func.h:3360
String * val_str(String *str) override
Definition: item_func.cc:6677
bool propagate_type(THD *thd, const Type_properties &type) override
Default implementation for all functions: Propagate base_item's type into all arguments.
Definition: item_func.cc:6962
enum Functype functype() const override
Definition: item_func.h:3365
void print(const THD *thd, String *str, enum_query_type query_type) const override
This method is used for to:
Definition: item_func.cc:7059
Settable_routine_parameter * get_settable_routine_parameter() override
Definition: item_func.h:3390
user_var_entry * var_entry
Definition: item_func.h:3354
void cleanup() override
Called for every Item after use (preparation and execution).
Definition: item_func.cc:7046
const char * func_name() const override
Definition: item_func.h:3382
bool set_value(THD *thd, sp_rcontext *ctx, Item **it) override
Definition: item_func.cc:7072
longlong val_int() override
Definition: item_func.cc:6725
Item_result m_cached_result_type
Definition: item_func.h:3355
my_decimal * val_decimal(my_decimal *) override
Definition: item_func.cc:6715
bool eq_specific(const Item *item) const override
Provide a more specific equality check for a function.
Definition: item_func.cc:7066
void update_used_tables() override
Updates used tables, not null tables information and accumulates properties up the item tree,...
Definition: item_func.h:3374
Item_func_get_user_var(const POS &pos, Name_string a)
Definition: item_func.h:3362
bool is_non_const_over_literals(uchar *) override
Definition: item_func.h:3383
Definition: item_func.h:1874
Item_func_instr(const POS &pos, Item *a, Item *b)
Definition: item_func.h:1876
const char * func_name() const override
Definition: item_func.h:1879
Definition: item_func.h:1464
bool resolve_type_inner(THD *thd) override
Resolve type of function after all arguments have had their data types resolved.
Definition: item_func.cc:3322
Item_func_int_val(const POS &pos, Item *a)
Definition: item_func.h:1467
Item_func_int_val(Item *a)
Definition: item_func.h:1466
Definition: item_func.h:2744
longlong val_int() override
Definition: item_func.cc:9552
Item_func_internal_auto_increment(const POS &pos, PT_item_list *list)
Definition: item_func.h:2746
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_func.h:2751
const char * func_name() const override
Definition: item_func.h:2750
enum Functype functype() const override
Definition: item_func.h:2748
Definition: item_func.h:2669
const char * func_name() const override
Definition: item_func.h:2675
Item_func_internal_avg_row_length(const POS &pos, PT_item_list *list)
Definition: item_func.h:2671
longlong val_int() override
Definition: item_func.cc:9503
enum Functype functype() const override
Definition: item_func.h:2673
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_func.h:2676
Definition: item_func.h:2759
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_func.h:2766
const char * func_name() const override
Definition: item_func.h:2765
Item_func_internal_checksum(const POS &pos, PT_item_list *list)
Definition: item_func.h:2761
longlong val_int() override
Definition: item_func.cc:9564
enum Functype functype() const override
Definition: item_func.h:2763
Definition: item_func.h:2729
enum Functype functype() const override
Definition: item_func.h:2733
const char * func_name() const override
Definition: item_func.h:2735
Item_func_internal_data_free(const POS &pos, PT_item_list *list)
Definition: item_func.h:2731
longlong val_int() override
Definition: item_func.cc:9540
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_func.h:2736
Definition: item_func.h:2684
longlong val_int() override
Definition: item_func.cc:9513
const char * func_name() const override
Definition: item_func.h:2690
Item_func_internal_data_length(const POS &pos, PT_item_list *list)
Definition: item_func.h:2686
enum Functype functype() const override
Definition: item_func.h:2688
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_func.h:2691
Definition: item_func.h:2803
longlong val_int() override
Definition: item_func.cc:9906
Item_func_internal_dd_char_length(const POS &pos, Item *a, Item *b, Item *c, Item *d)
Definition: item_func.h:2805
const char * func_name() const override
Definition: item_func.h:2809
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_func.h:2810
Definition: item_func.h:2818
Item_func_internal_get_view_warning_or_error(const POS &pos, PT_item_list *list)
Definition: item_func.h:2820
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_func.h:2827
longlong val_int() override
Definition: item_func.cc:9985
const char * func_name() const override
Definition: item_func.h:2824
Definition: item_func.h:2786
longlong val_int() override
INFORMATION_SCHEMA picks metadata from DD using system views.
Definition: item_func.cc:9639
Item_func_internal_index_column_cardinality(const POS &pos, PT_item_list *list)
Definition: item_func.h:2788
enum Functype functype() const override
Definition: item_func.h:2791
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_func.h:2796
const char * func_name() const override
Definition: item_func.h:2793
Definition: item_func.h:2714
Item_func_internal_index_length(const POS &pos, PT_item_list *list)
Definition: item_func.h:2716
longlong val_int() override
Definition: item_func.cc:9531
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_func.h:2721
enum Functype functype() const override
Definition: item_func.h:2718
const char * func_name() const override
Definition: item_func.h:2720
Internal function used by INFORMATION_SCHEMA implementation to check if a role is enabled.
Definition: item_func.h:4083
longlong val_int() override
Internal function used by INFORMATION_SCHEMA implementation to check if a role enabled.
Definition: item_func.cc:10165
enum Functype functype() const override
Definition: item_func.h:4089
Item_func_internal_is_enabled_role(const POS &pos, Item *a, Item *b)
Definition: item_func.h:4085
const char * func_name() const override
Definition: item_func.h:4088
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_func.h:4090
Internal function used by INFORMATION_SCHEMA implementation to check if a role is a mandatory role.
Definition: item_func.h:4048
longlong val_int() override
Internal function used by INFORMATION_SCHEMA implementation to check if a role is a mandatory role.
Definition: item_func.cc:10102
Item_func_internal_is_mandatory_role(const POS &pos, Item *a, Item *b)
Definition: item_func.h:4050
const char * func_name() const override
Definition: item_func.h:4053
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_func.h:4057
enum Functype functype() const override
Definition: item_func.h:4056
Definition: item_func.h:2773
Item_func_internal_keys_disabled(const POS &pos, Item *a)
Definition: item_func.h:2775
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_func.h:2779
longlong val_int() override
INFORMATION_SCHEMA picks metadata from DD using system views.
Definition: item_func.cc:9591
const char * func_name() const override
Definition: item_func.h:2778
Definition: item_func.h:2699
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_func.h:2706
const char * func_name() const override
Definition: item_func.h:2705
Item_func_internal_max_data_length(const POS &pos, PT_item_list *list)
Definition: item_func.h:2701
enum Functype functype() const override
Definition: item_func.h:2703
longlong val_int() override
Definition: item_func.cc:9522
Definition: item_func.h:2654
enum Functype functype() const override
Definition: item_func.h:2658
longlong val_int() override
Definition: item_func.cc:9491
Item_func_internal_table_rows(const POS &pos, PT_item_list *list)
Definition: item_func.h:2656
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_func.h:2661
const char * func_name() const override
Definition: item_func.h:2660
Definition: item_func.h:2986
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_func.h:2999
Item_func_internal_tablespace_autoextend_size(const POS &pos, Item *a, Item *b, Item *c, Item *d)
Definition: item_func.h:2988
longlong val_int() override
Definition: item_func.cc:9849
enum Functype functype() const override
Definition: item_func.h:2992
const char * func_name() const override
Definition: item_func.h:2995
Definition: item_func.h:3026
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_func.h:3039
Item_func_internal_tablespace_data_free(const POS &pos, Item *a, Item *b, Item *c, Item *d)
Definition: item_func.h:3028
longlong val_int() override
Definition: item_func.cc:9882
const char * func_name() const override
Definition: item_func.h:3035
enum Functype functype() const override
Definition: item_func.h:3032
Definition: item_func.h:2926
Item_func_internal_tablespace_extent_size(const POS &pos, Item *a, Item *b, Item *c, Item *d)
Definition: item_func.h:2928
enum Functype functype() const override
Definition: item_func.h:2932
longlong val_int() override
Definition: item_func.cc:9802
const char * func_name() const override
Definition: item_func.h:2935
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_func.h:2939
Definition: item_func.h:2886
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_func.h:2899
enum Functype functype() const override
Definition: item_func.h:2892
const char * func_name() const override
Definition: item_func.h:2895
Item_func_internal_tablespace_free_extents(const POS &pos, Item *a, Item *b, Item *c, Item *d)
Definition: item_func.h:2888
longlong val_int() override
Definition: item_func.cc:9772
Definition: item_func.h:2850
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_func.h:2858
enum Functype functype() const override
Definition: item_func.h:2855
Item_func_internal_tablespace_id(const POS &pos, Item *a, Item *b, Item *c, Item *d)
Definition: item_func.h:2852
longlong val_int() override
Definition: item_func.cc:9739
const char * func_name() const override
Definition: item_func.h:2857
Definition: item_func.h:2946
longlong val_int() override
Definition: item_func.cc:9817
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_func.h:2959
const char * func_name() const override
Definition: item_func.h:2955
Item_func_internal_tablespace_initial_size(const POS &pos, Item *a, Item *b, Item *c, Item *d)
Definition: item_func.h:2948
enum Functype functype() const override
Definition: item_func.h:2952
Definition: item_func.h:2866
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_func.h:2879
enum Functype functype() const override
Definition: item_func.h:2872
longlong val_int() override
Definition: item_func.cc:9754
Item_func_internal_tablespace_logfile_group_number(const POS &pos, Item *a, Item *b, Item *c, Item *d)
Definition: item_func.h:2868
const char * func_name() const override
Definition: item_func.h:2875
Definition: item_func.h:2966
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_func.h:2979
Item_func_internal_tablespace_maximum_size(const POS &pos, Item *a, Item *b, Item *c, Item *d)
Definition: item_func.h:2968
const char * func_name() const override
Definition: item_func.h:2975
longlong val_int() override
Definition: item_func.cc:9832
enum Functype functype() const override
Definition: item_func.h:2972
Definition: item_func.h:2906
longlong val_int() override
Definition: item_func.cc:9787
enum Functype functype() const override
Definition: item_func.h:2912
Item_func_internal_tablespace_total_extents(const POS &pos, Item *a, Item *b, Item *c, Item *d)
Definition: item_func.h:2908
const char * func_name() const override
Definition: item_func.h:2915
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_func.h:2919
Definition: item_func.h:3006
Item_func_internal_tablespace_version(const POS &pos, Item *a, Item *b, Item *c, Item *d)
Definition: item_func.h:3008
longlong val_int() override
Definition: item_func.cc:9865
const char * func_name() const override
Definition: item_func.h:3015
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_func.h:3019
enum Functype functype() const override
Definition: item_func.h:3012
Definition: item_func.h:4063
const char * func_name() const override
Definition: item_func.h:4068
longlong val_int() override
Definition: item_func.cc:10136
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_func.h:4072
Item_func_internal_use_terminology_previous(const POS &pos)
Definition: item_func.h:4065
enum Functype functype() const override
Definition: item_func.h:4071
Definition: item_func.h:3817
longlong val_int() override
Check if user level lock is free.
Definition: item_func.cc:5723
Item_func_is_free_lock(const POS &pos, Item *a)
Definition: item_func.h:3823
const char * func_name() const override
Definition: item_func.h:3827
Item_int_func super
Definition: item_func.h:3818
bool resolve_type(THD *thd) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_func.h:3828
bool is_non_const_over_literals(uchar *) override
Definition: item_func.h:3834
bool do_itemize(Parse_context *pc, Item **res) override
The core function that does the actual itemization.
Definition: item_func.cc:5699
bool check_function_as_value_generator(uchar *checker_args) override
Check if this item is allowed for a virtual column or inside a default expression.
Definition: item_func.h:3835
String value
Definition: item_func.h:3820
Definition: item_func.h:3844
bool resolve_type(THD *thd) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_func.h:3855
Item_func_is_used_lock(const POS &pos, Item *a)
Definition: item_func.h:3850
bool check_function_as_value_generator(uchar *checker_args) override
Check if this item is allowed for a virtual column or inside a default expression.
Definition: item_func.h:3862
Item_int_func super
Definition: item_func.h:3845
String value
Definition: item_func.h:3847
const char * func_name() const override
Definition: item_func.h:3854
longlong val_int() override
Check if user level lock is used and return connection id of owner.
Definition: item_func.cc:5766
bool is_non_const_over_literals(uchar *) override
Definition: item_func.h:3861
bool do_itemize(Parse_context *pc, Item **res) override
The core function that does the actual itemization.
Definition: item_func.cc:5745
Definition: item_func.h:2637
Item_func_is_visible_dd_object(const POS &pos, Item *a, Item *b)
Definition: item_func.h:2641
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_func.h:2647
Item_func_is_visible_dd_object(const POS &pos, Item *a, Item *b, Item *c)
Definition: item_func.h:2643
const char * func_name() const override
Definition: item_func.h:2646
longlong val_int() override
Skip hidden tables, columns, indexes and index elements.
Definition: item_func.cc:9335
Item_func_is_visible_dd_object(const POS &pos, Item *a)
Definition: item_func.h:2639
Definition: item_func.h:2142
bool resolve_type(THD *thd) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_func.h:2158
const char * func_name() const override
Definition: item_func.h:2152
Item_func_last_insert_id(const POS &pos, Item *a)
Definition: item_func.h:2148
Item_func_last_insert_id()
Definition: item_func.h:2146
table_map get_initial_pseudo_tables() const override
Returns the pseudo tables depended upon in order to evaluate this function expression.
Definition: item_func.h:2154
longlong val_int() override
Definition: item_func.cc:5798
bool check_function_as_value_generator(uchar *checker_args) override
Check if this item is allowed for a virtual column or inside a default expression.
Definition: item_func.h:2163
Item_int_func super
Definition: item_func.h:2143
Item_func_last_insert_id(const POS &pos)
Definition: item_func.h:2147
bool do_itemize(Parse_context *pc, Item **res) override
The core function that does the actual itemization.
Definition: item_func.cc:5790
Definition: item_func.h:1782
Item_func_length(const POS &pos, Item *a)
Definition: item_func.h:1786
String value
Definition: item_func.h:1783
const char * func_name() const override
Definition: item_func.h:1788
bool resolve_type(THD *thd) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_func.h:1789
longlong val_int() override
Definition: item_func.cc:4215
Definition: item_func.h:1359
double val_real() override
Gateway to natural LOG function.
Definition: item_func.cc:2839
enum Functype functype() const override
Definition: item_func.h:1364
const char * func_name() const override
Definition: item_func.h:1363
Item_func_ln(const POS &pos, Item *a)
Definition: item_func.h:1361
Definition: item_func.h:1857
String value1
Definition: item_func.h:1858
void print(const THD *thd, String *str, enum_query_type query_type) const override
This method is used for to:
Definition: item_func.cc:4310
longlong val_int() override
Definition: item_func.cc:4272
bool resolve_type(THD *thd) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_func.cc:4258
Item_func_locate(Item *a, Item *b)
Definition: item_func.h:1861
Item_func_locate(const POS &pos, Item *a, Item *b, Item *c)
Definition: item_func.h:1864
const char * func_name() const override
Definition: item_func.h:1867
Item_func_locate(const POS &pos, Item *a, Item *b)
Definition: item_func.h:1862
String value2
Definition: item_func.h:1858
Definition: item_func.h:1383
double val_real() override
Definition: item_func.cc:2888
enum Functype functype() const override
Definition: item_func.h:1388
const char * func_name() const override
Definition: item_func.h:1387
Item_func_log10(const POS &pos, Item *a)
Definition: item_func.h:1385
Definition: item_func.h:1376
double val_real() override
Definition: item_func.cc:2876
const char * func_name() const override
Definition: item_func.h:1380
Item_func_log2(const POS &pos, Item *a)
Definition: item_func.h:1378
Definition: item_func.h:1367
Item_func_log(const POS &pos, Item *a)
Definition: item_func.h:1369
double val_real() override
Extended but so slower LOG function.
Definition: item_func.cc:2856
Item_func_log(const POS &pos, Item *a, Item *b)
Definition: item_func.h:1370
const char * func_name() const override
Definition: item_func.h:1372
enum Functype functype() const override
Definition: item_func.h:1373
Definition: item_func.h:3526
uint flags
Definition: item_func.h:3534
FT_INFO * ft_handler
Definition: item_func.h:3540
DTCollation cmp_collation
Definition: item_func.h:3539
void update_used_tables() override
Updates used tables, not null tables information and accumulates properties up the item tree,...
Definition: item_func.cc:7795
bool fix_index(const THD *thd)
Definition: item_func.cc:7802
Item * key_item() const override
Definition: item_func.h:3589
uint key
Definition: item_func.h:3534
void print(const THD *thd, String *str, enum_query_type query_type) const override
This method is used for to:
Definition: item_func.cc:7934
bool check_function_as_value_generator(uchar *checker_args) override
Check if this item is allowed for a virtual column or inside a default expression.
Definition: item_func.h:3606
bool allows_search_on_non_indexed_columns(const TABLE *tr)
Check whether storage engine for given table, allows FTS Boolean search on non-indexed columns.
Definition: item_func.h:3785
void set_master(Item_func_match *item)
Set master MATCH function and adjust used_in_where_only value.
Definition: item_func.h:3683
longlong val_int() override
Definition: item_func.h:3596
Item_func_match * master
Master item means that if identical items are present in the statement, they use the same FT handler.
Definition: item_func.h:3548
Ft_hints * hints
Fulltext index hints, initialized for master MATCH function only.
Definition: item_func.h:3753
const char * func_name() const override
Definition: item_func.h:3591
bool docid_in_result()
Check whether FT result contains the document ID.
Definition: item_func.h:3653
Item * concat_ws
Definition: item_func.h:3549
bool can_skip_ranking()
Check if ranking is not needed.
Definition: item_func.h:3720
void cleanup() override
Called for every Item after use (preparation and execution).
Definition: item_func.h:3578
void set_hints_op(enum ft_operation type, double value_arg)
Set comparison operation type and and value for master MATCH function.
Definition: item_func.h:3704
Table_ref * table_ref
Definition: item_func.h:3541
bool ordered_result()
Check whether FT result is ordered on rank.
Definition: item_func.h:3635
bool init_search(THD *thd)
Initialize searching within full-text index.
Definition: item_func.cc:7566
String value
Definition: item_func.h:3550
enum Functype functype() const override
Definition: item_func.h:3590
void set_hints(JOIN *join, uint ft_flag, ha_rows ft_limit, bool no_cond)
Set FT hints.
Definition: item_func.cc:7966
Item_func_match(const POS &pos, PT_item_list *a, Item *against_arg, uint b)
Constructor for Item_func_match class.
Definition: item_func.h:3561
Item * against
Definition: item_func.h:3533
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 the filter contribution that is relevant for table 'filter_for_table' for this item.
Definition: item_func.cc:7642
bool fix_fields(THD *thd, Item **ref) override
Definition: item_func.cc:7671
bool do_itemize(Parse_context *pc, Item **res) override
The core function that does the actual itemization.
Definition: item_func.cc:7538
bool used_in_where_only
true if MATCH function is used in WHERE condition only.
Definition: item_func.h:3766
String search_value
Definition: item_func.h:3551
bool is_simple_expression()
Check if this MATCH function is a simple expression in WHERE condition.
Definition: item_func.h:3744
Ft_hints * get_hints()
Returns pointer to Ft_hints object belonging to master MATCH function.
Definition: item_func.h:3693
void add_json_info(Json_object *obj) override
Add all the node-specific json fields.
Definition: item_func.cc:7947
bool score_from_index_scan
True if we are doing a full-text index scan with this MATCH function as a predicate,...
Definition: item_func.h:3538
void set_simple_expression(bool val)
Set flag that the function is a simple expression.
Definition: item_func.h:3733
double val_real() override
Definition: item_func.cc:7902
bool simple_expression
Flag is true when MATCH function is used as a simple expression in WHERE condition,...
Definition: item_func.h:3759
Item_func_match * get_master()
Returns master MATCH function.
Definition: item_func.h:3673
bool eq_specific(const Item *item) const override
Provide a more specific equality check for a function.
Definition: item_func.cc:7885
Item_real_func super
Definition: item_func.h:3527
ulonglong get_count()
Get number of matching rows from FT handler.
Definition: item_func.h:3621
Definition: item_func.h:1684
Item_func_max(const POS &pos, PT_item_list *opt_list)
Definition: item_func.h:1686
const char * func_name() const override
Definition: item_func.h:1688
enum Functype functype() const override
Definition: item_func.h:1689
Definition: item_func.h:1598
bool compare_as_dates() const
Returns true if arguments to this function should be compared as dates.
Definition: item_func.cc:3906
longlong int_op() override
Performs the operation that this functions implements when the result type is INT.
Definition: item_func.cc:4043
bool resolve_type(THD *thd) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_func.cc:3792
TYPELIB * get_typelib() const override
Get the typelib information for an item of type set or enum.
Definition: item_func.cc:3804
my_decimal * val_decimal(my_decimal *) override
Definition: item_func.cc:4107
bool date_op(MYSQL_TIME *ltime, my_time_flags_t fuzzydate) override
Performs the operation that this functions implements when the result type is MYSQL_TYPE_DATE or MYSQ...
Definition: item_func.cc:4000
String * str_op(String *) override
Performs the operation that this functions implements when the result type is a string type.
Definition: item_func.cc:3943
uint8 fsp_for_string
Fractional seconds precision to use when converting a time or timestamp expression into a string.
Definition: item_func.h:1654
double val_real() override
Definition: item_func.cc:4093
longlong val_int() override
Definition: item_func.cc:4100
bool resolve_type_inner(THD *thd) override
Resolve type of function after all arguments have had their data types resolved.
Definition: item_func.cc:3838
Item_func_min_max(const POS &pos, PT_item_list *opt_list, bool is_least_func)
Definition: item_func.h:1600
bool has_temporal_arg() const
Returns true if at least one of the arguments was of temporal type.
Definition: item_func.h:1635
String m_string_buf
Definition: item_func.h:1640
double real_op() override
Performs the operation that this functions implements when the result type is REAL.
Definition: item_func.cc:4024
bool cmp_datetimes(longlong *value)
Compare arguments as datetime values.
Definition: item_func.cc:3911
Item * temporal_item
Definition: item_func.h:1648
enum Item_result result_type() const override
Definition: item_func.h:1620
bool cmp_times(longlong *value)
Compare arguments as time values.
Definition: item_func.cc:3932
const bool m_is_least_func
True if LEAST function, false if GREATEST.
Definition: item_func.h:1639
enum Item_result cast_to_int_type() const override
Make CAST(LEAST_OR_GREATEST(datetime_expr, varchar_expr)) return a number in format YYMMDDhhmmss.
Definition: item_func.h:1627
bool time_op(MYSQL_TIME *ltime) override
Definition: item_func.cc:4009
my_decimal * decimal_op(my_decimal *) override
Performs the operation that this functions implements when the result type is DECIMAL.
Definition: item_func.cc:4068
enum_field_types default_data_type() const override
Get the default data (output) type for the specific item.
Definition: item_func.h:1614
void set_numeric_type() override
Definition: item_func.h:1619
Definition: item_func.h:1676
enum Functype functype() const override
Definition: item_func.h:1681
const char * func_name() const override
Definition: item_func.h:1680
Item_func_min(const POS &pos, PT_item_list *opt_list)
Definition: item_func.h:1678
Definition: item_func.h:1224
enum Functype functype() const override
Definition: item_func.h:1238
my_decimal * decimal_op(my_decimal *) override
See Item_func_plus::decimal_op for comments.
Definition: item_func.cc:2298
longlong int_op() override SUPPRESS_UBSAN
Performs the operation that this functions implements when the result type is INT.
Definition: item_func.cc:2247
bool resolve_type(THD *thd) override
The following function is here to allow the user to force subtraction of UNSIGNED BIGINT/DECIMAL to r...
Definition: item_func.cc:2229
Item_func_minus(const POS &pos, Item *a, Item *b)
Definition: item_func.h:1227
Item_func_minus(Item *a, Item *b)
Definition: item_func.h:1226
double real_op() override
Performs the operation that this functions implements when the result type is REAL.
Definition: item_func.cc:2236
const char * func_name() const override
Definition: item_func.h:1230
Definition: item_func.h:1295
bool check_partition_func_processor(uchar *) override
Check if a partition function is allowed.
Definition: item_func.h:1306
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_func.h:1307
bool resolve_type(THD *thd) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_func.cc:2722
void result_precision() override
Definition: item_func.cc:2706
Item_func_mod(const POS &pos, Item *a, Item *b)
Definition: item_func.h:1298
const char * func_name() const override
Definition: item_func.h:1303
enum Functype functype() const override
Definition: item_func.h:1308
double real_op() override
Performs the operation that this functions implements when the result type is REAL.
Definition: item_func.cc:2669
Item_func_mod(Item *a, Item *b)
Definition: item_func.h:1297
my_decimal * decimal_op(my_decimal *) override
Performs the operation that this functions implements when the result type is DECIMAL.
Definition: item_func.cc:2684
longlong int_op() override
Performs the operation that this functions implements when the result type is INT.
Definition: item_func.cc:2634
Definition: item_func.h:1241
const char * func_name() const override
Definition: item_func.h:1246
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_func.h:1252
void result_precision() override
Definition: item_func.cc:2436
double real_op() override
Performs the operation that this functions implements when the result type is REAL.
Definition: item_func.cc:2323
bool check_partition_func_processor(uchar *) override
Check if a partition function is allowed.
Definition: item_func.h:1251
my_decimal * decimal_op(my_decimal *) override
See Item_func_plus::decimal_op for comments.
Definition: item_func.cc:2421
longlong int_op() override
Performs the operation that this functions implements when the result type is INT.
Definition: item_func.cc:2335
Item_func_mul(Item *a, Item *b)
Definition: item_func.h:1243
enum Functype functype() const override
Definition: item_func.h:1253
Item_func_mul(const POS &pos, Item *a, Item *b)
Definition: item_func.h:1244
Definition: item_func.h:1311
Item_func_neg(const POS &pos, Item *a)
Definition: item_func.h:1314
const char * func_name() const override
Definition: item_func.h:1319
enum Functype functype() const override
Definition: item_func.h:1320
bool resolve_type(THD *thd) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_func.cc:2767
double real_op() override
Performs the operation that this functions implements when the result type is REAL.
Definition: item_func.cc:2729
longlong int_op() override
Performs the operation that this functions implements when the result type is INT.
Definition: item_func.cc:2735
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_func.h:1324
my_decimal * decimal_op(my_decimal *) override
Performs the operation that this functions implements when the result type is DECIMAL.
Definition: item_func.cc:2750
void fix_num_length_and_dec() override
Definition: item_func.cc:2760
Item_func_neg(Item *a)
Definition: item_func.h:1313
bool check_partition_func_processor(uchar *) override
Check if a partition function is allowed.
Definition: item_func.h:1323
Definition: item_func.h:965
Item_func_num1(Item *a, Item *b)
Definition: item_func.h:970
Item_func_num1(const POS &pos, Item *a)
Definition: item_func.h:968
void fix_num_length_and_dec() override
Definition: item_func.cc:1581
String * str_op(String *) override
Performs the operation that this functions implements when the result type is a string type.
Definition: item_func.h:976
Item_func_num1(Item *a)
Definition: item_func.h:967
void set_numeric_type() override
Set data type for a numeric function with one argument (can be also used by a numeric function with m...
Definition: item_func.cc:1551
Item_func_num1(const POS &pos, Item *a, Item *b)
Definition: item_func.h:971
bool date_op(MYSQL_TIME *, my_time_flags_t) override
Performs the operation that this functions implements when the result type is MYSQL_TYPE_DATE or MYSQ...
Definition: item_func.h:980
bool time_op(MYSQL_TIME *) override
Definition: item_func.h:984
Definition: item_func.h:872
virtual void set_numeric_type()=0
longlong val_int() override
Definition: item_func.cc:1778
virtual longlong int_op()=0
Performs the operation that this functions implements when the result type is INT.
String * val_str(String *str) override
Definition: item_func.cc:1697
Item_func_numhybrid(const POS &pos, Item *a)
Definition: item_func.h:880
Item_func_numhybrid(mem_root_deque< Item * > *list)
Definition: item_func.h:894
enum_field_types default_data_type() const override
Get the default data (output) type for the specific item.
Definition: item_func.h:904
bool resolve_type_inner(THD *thd) override
Resolve type of function after all arguments have had their data types resolved.
Definition: item_func.cc:1689
bool is_null() override
The method allows to determine nullness of a complex expression without fully evaluating it,...
Definition: item_func.h:961
bool get_date(MYSQL_TIME *ltime, my_time_flags_t fuzzydate) override
Definition: item_func.cc:1861
virtual bool date_op(MYSQL_TIME *ltime, my_time_flags_t fuzzydate)=0
Performs the operation that this functions implements when the result type is MYSQL_TYPE_DATE or MYSQ...
Item_func_numhybrid(Item *a)
Definition: item_func.h:877
bool resolve_type(THD *thd) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_func.cc:1661
my_decimal * val_decimal(my_decimal *) override
Definition: item_func.cc:1819
enum Item_result result_type() const override
Definition: item_func.h:903
virtual bool time_op(MYSQL_TIME *ltime)=0
double val_real() override
Definition: item_func.cc:1739
Item_func_numhybrid(const POS &pos, PT_item_list *list)
Definition: item_func.h:898
void fix_num_length_and_dec() override
Definition: item_func.cc:875
Item_func_numhybrid(const POS &pos, Item *a, Item *b)
Definition: item_func.h:889
Item_result hybrid_type
Definition: item_func.h:874
virtual my_decimal * decimal_op(my_decimal *decimal_value)=0
Performs the operation that this functions implements when the result type is DECIMAL.
virtual double real_op()=0
Performs the operation that this functions implements when the result type is REAL.
bool get_time(MYSQL_TIME *ltime) override
Definition: item_func.cc:1878
virtual String * str_op(String *)=0
Performs the operation that this functions implements when the result type is a string type.
Item_func_numhybrid(Item *a, Item *b)
Definition: item_func.h:885
Definition: item_func.h:1922
const char * func_name() const override
Definition: item_func.h:1928
longlong val_int() override
Definition: item_func.cc:4400
String value
Definition: item_func.h:1923
Item_func_ord(const POS &pos, Item *a)
Definition: item_func.h:1926
Definition: item_func.h:1208
const char * func_name() const override
Definition: item_func.h:1214
Item_func_plus(const POS &pos, Item *a, Item *b)
Definition: item_func.h:1211
Item_func_plus(Item *a, Item *b)
Definition: item_func.h:1210
double real_op() override
Performs the operation that this functions implements when the result type is REAL.
Definition: item_func.cc:2124
longlong int_op() override SUPPRESS_UBSAN
Performs the operation that this functions implements when the result type is INT.
Definition: item_func.cc:2135
my_decimal * decimal_op(my_decimal *) override
Calculate plus of two decimals.
Definition: item_func.cc:2191
enum Functype functype() const override
Definition: item_func.h:1221
Definition: item_func.h:1399
double val_real() override
Definition: item_func.cc:2914
Item_func_pow(const POS &pos, Item *a, Item *b)
Definition: item_func.h:1401
const char * func_name() const override
Definition: item_func.h:1403
enum Functype functype() const override
Definition: item_func.h:1404
Definition: item_func.h:1591
Item_func_radians(const POS &pos, Item *a)
Definition: item_func.h:1593
const char * func_name() const override
Definition: item_func.h:1595
enum Functype functype() const override
Definition: item_func.h:1596
Definition: item_func.h:1520
bool do_itemize(Parse_context *pc, Item **res) override
The core function that does the actual itemization.
Definition: item_func.cc:3663
double val_real() override
Definition: item_func.cc:3728
void seed_random(Item *val)
Definition: item_func.cc:3680
bool fix_fields(THD *thd, Item **ref) override
Definition: item_func.cc:3698
const char * func_name() const override
Definition: item_func.h:1532
bool first_eval
Definition: item_func.h:1524
Item_real_func super
Definition: item_func.h:1521
bool check_function_as_value_generator(uchar *checker_args) override
Check if this item is allowed for a virtual column or inside a default expression.
Definition: item_func.h:1548
rand_struct * m_rand
Definition: item_func.h:1523
Item_func_rand()
Definition: item_func.h:1526
Item_func_rand(const POS &pos)
Definition: item_func.h:1528
table_map get_initial_pseudo_tables() const override
This function is non-deterministic and hence depends on the 'RAND' pseudo-table.
Definition: item_func.h:1539
Item_func_rand(const POS &pos, Item *a)
Definition: item_func.h:1527
bool resolve_type(THD *thd) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_func.cc:3690
void cleanup() override
Called for every Item after use (preparation and execution).
Definition: item_func.h:1544
Definition: item_func.h:2454
longlong val_int() override
Release all user level lock held by connection.
Definition: item_func.cc:5682
Item_int_func super
Definition: item_func.h:2455
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_func.h:2463
bool do_itemize(Parse_context *pc, Item **res) override
The core function that does the actual itemization.
Definition: item_func.cc:5668
bool check_function_as_value_generator(uchar *checker_args) override
Check if this item is allowed for a virtual column or inside a default expression.
Definition: item_func.h:2468
Item_func_release_all_locks(const POS &pos)
Definition: item_func.h:2458
const char * func_name() const override
Definition: item_func.h:2462
bool is_non_const_over_literals(uchar *) override
Definition: item_func.h:2467
Definition: item_func.h:2427
Item_int_func super
Definition: item_func.h:2428
bool do_itemize(Parse_context *pc, Item **res) override
The core function that does the actual itemization.
Definition: item_func.cc:5600
bool check_function_as_value_generator(uchar *checker_args) override
Check if this item is allowed for a virtual column or inside a default expression.
Definition: item_func.h:2445
bool resolve_type(THD *thd) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_func.h:2438
String value
Definition: item_func.h:2430
const char * func_name() const override
Definition: item_func.h:2437
longlong val_int() override
Release a user level lock.
Definition: item_func.cc:5624
bool is_non_const_over_literals(uchar *) override
Definition: item_func.h:2444
Item_func_release_lock(const POS &pos, Item *a)
Definition: item_func.h:2433
Definition: item_func.h:1499
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_func.cc:3458
my_decimal * decimal_op(my_decimal *) override
Performs the operation that this functions implements when the result type is DECIMAL.
Definition: item_func.cc:3648
bool truncate
Definition: item_func.h:1500
Item_func_round(Item *a, Item *b, bool trunc_arg)
Definition: item_func.h:1503
longlong int_op() override
Performs the operation that this functions implements when the result type is INT.
Definition: item_func.cc:3582
enum Functype functype() const override
Definition: item_func.h:1515
const char * func_name() const override
Definition: item_func.h:1508
Item_func_round(const POS &pos, Item *a, Item *b, bool trunc_arg)
Definition: item_func.h:1505
double real_op() override
Performs the operation that this functions implements when the result type is REAL.
Definition: item_func.cc:3554
Definition: item_func.h:3871
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_func.h:3881
Item_func_row_count(const POS &pos)
Definition: item_func.h:3875
bool do_itemize(Parse_context *pc, Item **res) override
The core function that does the actual itemization.
Definition: item_func.cc:8111
const char * func_name() const override
Definition: item_func.h:3880
Item_int_func super
Definition: item_func.h:3872
longlong val_int() override
Definition: item_func.cc:8121
bool check_function_as_value_generator(uchar *checker_args) override
Check if this item is allowed for a virtual column or inside a default expression.
Definition: item_func.h:3885
This class is used to implement operations like SET @variable or @variable:= expression.
Definition: item_func.h:3285
void cleanup() override
Called for every Item after use (preparation and execution).
Definition: item_func.cc:6026
union Item_func_set_user_var::@57 save_result
void print_assignment(const THD *thd, String *str, enum_query_type query_type) const
Definition: item_func.cc:6552
type_conversion_status save_in_field(Field *field, bool no_conversions, bool can_use_result_field)
Definition: item_func.cc:6628
enum Item_result result_type() const override
Definition: item_func.h:3326
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_func.cc:6082
Item_func_set_user_var(const POS &pos, Name_string a, Item *b)
Definition: item_func.h:3302
enum Item_result cached_result_type
Definition: item_func.h:3286
enum Functype functype() const override
Definition: item_func.h:3314
Item_func_set_user_var(Name_string a, Item *b)
Definition: item_func.h:3301
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_func.h:3346
void make_field(Send_field *tmp_field) override
Definition: item_func.cc:6580
String * val_str(String *str) override
Definition: item_func.cc:6537
void save_org_in_field(Field *field) override
Definition: item_func.h:3338
bool set_entry(THD *thd, bool create_if_not_exists)
Definition: item_func.cc:6040
bool fix_fields(THD *thd, Item **ref) override
Definition: item_func.cc:6068
bool null_item
Definition: item_func.h:3290
bool update()
Update user variable from value in save_result.
Definition: item_func.cc:6475
void save_item_result(Item *item)
Evaluate and store item's result.
Definition: item_func.cc:6444
bool update_hash(const void *ptr, uint length, enum Item_result type, const CHARSET_INFO *cs, Derivation dv, bool unsigned_arg)
Definition: item_func.cc:6228
longlong val_int() override
Definition: item_func.cc:6530
my_decimal * val_decimal(my_decimal *) override
Definition: item_func.cc:6544
double vreal
Definition: item_func.h:3293
my_decimal decimal_buff
Definition: item_func.h:3289
bool send(Protocol *protocol, String *str_arg) override
This is only called from items that is not of type item_field.
Definition: item_func.cc:6568
my_decimal * vdec
Definition: item_func.h:3295
String value
Definition: item_func.h:3288
double val_real() override
Definition: item_func.cc:6523
void print(const THD *thd, String *str, enum_query_type query_type) const override
This method is used for to:
Definition: item_func.cc:6561
bool check(bool use_result_field)
This functions is invoked on SET @variable or @variable:= expression.
Definition: item_func.cc:6400
const char * func_name() const override
Definition: item_func.h:3333
Name_string name
Definition: item_func.h:3299
Item_func_set_user_var(THD *thd, Item_func_set_user_var *item)
Definition: item_func.h:3305
String * vstr
Definition: item_func.h:3294
longlong vint
Definition: item_func.h:3292
Definition: item_func.h:2101
Item_func_shift_left(const POS &pos, Item *a, Item *b)
Definition: item_func.h:2103
const char * func_name() const override
Definition: item_func.h:2105
longlong int_op() override
Performs the operation on integers to produce a result of type INT_RESULT.
Definition: item_func.cc:3094
String * str_op(String *str) override
Performs the operation on binary strings to produce a result of type STRING_RESULT.
Definition: item_func.cc:3168
Definition: item_func.h:2112
String * str_op(String *str) override
Performs the operation on binary strings to produce a result of type STRING_RESULT.
Definition: item_func.cc:3172
Item_func_shift_right(const POS &pos, Item *a, Item *b)
Definition: item_func.h:2114
longlong int_op() override
Performs the operation on integers to produce a result of type INT_RESULT.
Definition: item_func.cc:3095
const char * func_name() const override
Definition: item_func.h:2116
Definition: item_func.h:2086
String * eval_str_op(String *str)
Template function that evaluates the bitwise shift operation over binary string arguments.
Definition: item_func.cc:3103
longlong eval_int_op()
Template function that evaluates the bitwise shift operation over integer arguments.
Definition: item_func.cc:3078
bool binary_result_requires_binary_second_arg() const override
Definition: item_func.h:2088
Item_func_shift(const POS &pos, Item *a, Item *b)
Definition: item_func.h:2097
Definition: item_func.h:1561
longlong val_int() override
Definition: item_func.cc:3769
Item_func_sign(const POS &pos, Item *a)
Definition: item_func.h:1563
enum Functype functype() const override
Definition: item_func.h:1565
const char * func_name() const override
Definition: item_func.h:1564
bool resolve_type(THD *thd) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_func.cc:3761
Definition: item_func.h:1440
Item_func_sin(const POS &pos, Item *a)
Definition: item_func.h:1442
double val_real() override
Definition: item_func.cc:2963
const char * func_name() const override
Definition: item_func.h:1444
enum Functype functype() const override
Definition: item_func.h:1445
Definition: item_func.h:2208
bool resolve_type(THD *thd) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_func.h:2232
Item_func_sleep(const POS &pos, Item *a)
Definition: item_func.h:2212
bool do_itemize(Parse_context *pc, Item **res) override
The core function that does the actual itemization.
Definition: item_func.cc:5927
bool check_function_as_value_generator(uchar *checker_args) override
Check if this item is allowed for a virtual column or inside a default expression.
Definition: item_func.h:2225
const char * func_name() const override
Definition: item_func.h:2215
table_map get_initial_pseudo_tables() const override
This function is non-deterministic and hence depends on the 'RAND' pseudo-table.
Definition: item_func.h:2222
Item_int_func super
Definition: item_func.h:2209
longlong val_int() override
This function is just used to create tests with time gaps.
Definition: item_func.cc:5937
Definition: item_func.h:3903
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_func.cc:8611
void compute_cost(CostOfItem *root_cost) const override
Compute the cost of evaluating this Item.
Definition: item_func.h:3977
double val_real() override
Definition: item_func.cc:8304
bool change_context_processor(uchar *arg) override
Definition: item_func.h:3956
longlong val_int() override
Definition: item_func.cc:8298
String * val_str(String *str) override
Definition: item_func.cc:8326
void cleanup() override
Called for every Item after use (preparation and execution).
Definition: item_func.cc:8168
my_decimal * val_decimal(my_decimal *dec_buf) override
Definition: item_func.cc:8320
bool m_deterministic
true when function execution is deterministic
Definition: item_func.h:3917
const char * func_name() const override
Definition: item_func.cc:8177
Field * sp_result_field
The result field of the concrete stored function.
Definition: item_func.h:3915
bool check_function_as_value_generator(uchar *checker_args) override
Check if this item is allowed for a virtual column or inside a default expression.
Definition: item_func.h:3969
bool init_result_field(THD *thd)
Initialize the result field by creating a temporary dummy table and assign it to a newly created fiel...
Definition: item_func.cc:8235
bool val_json(Json_wrapper *result) override
Get a JSON value from an Item.
Definition: item_func.cc:8341
Field * tmp_table_field(TABLE *t_arg) override
Definition: item_func.cc:8484
void update_used_tables() override
Updates used tables, not null tables information and accumulates properties up the item tree,...
Definition: item_func.cc:8604
bool get_time(MYSQL_TIME *ltime) override
Definition: item_func.cc:8315
Name_resolution_context * m_name_resolution_ctx
Holds the security definer context(if defined with SQL SECURITY DEFINER) and the error the handler.
Definition: item_func.h:3909
Item_result result_type() const override
Definition: item_func.cc:8461
Field * get_sp_result_field()
Definition: item_func.h:3968
Item_func_sp(const POS &pos, const LEX_STRING &db_name, const LEX_STRING &fn_name, bool use_explicit_name, PT_item_list *opt_list)
Definition: item_func.cc:8128
bool execute_impl(THD *thd)
Execute function and store the return value in the field.
Definition: item_func.cc:8409
bool resolve_type(THD *thd) override
Initialize local members with values from the Field interface.
Definition: item_func.cc:8284
Item_func super
Definition: item_func.h:3904
void make_field(Send_field *tmp_field) override
Definition: item_func.cc:8454
bool do_itemize(Parse_context *pc, Item **res) override
The core function that does the actual itemization.
Definition: item_func.cc:8144
bool execute()
Execute function & store value in field.
Definition: item_func.cc:8366
bool sp_check_access(THD *thd)
Checks if requested access to function can be granted to user.
Definition: item_func.cc:8505
enum Functype functype() const override
Definition: item_func.h:3963
sp_name * m_name
The name of the stored function.
Definition: item_func.h:3911
bool get_date(MYSQL_TIME *ltime, my_time_flags_t fuzzydate) override
Definition: item_func.cc:8310
table_map get_initial_pseudo_tables() const override
Must not be called before the procedure is resolved, i.e.
Definition: item_func.cc:8199
bool fix_fields(THD *thd, Item **ref) override
Definition: item_func.cc:8515
sp_head * m_sp
Pointer to actual function instance (null when not resolved or executing)
Definition: item_func.h:3913
Definition: item_func.h:1391
Item_func_sqrt(const POS &pos, Item *a)
Definition: item_func.h:1393
const char * func_name() const override
Definition: item_func.h:1395
double val_real() override
Definition: item_func.cc:2906
enum Functype functype() const override
Definition: item_func.h:1396
Definition: item_func.h:1448
enum Functype functype() const override
Definition: item_func.h:1453
double val_real() override
Definition: item_func.cc:2970
Item_func_tan(const POS &pos, Item *a)
Definition: item_func.h:1450
const char * func_name() const override
Definition: item_func.h:1452
Definition: item_func.h:2336
bool get_date(MYSQL_TIME *ltime, my_time_flags_t fuzzydate) override
Definition: item_func.h:2345
double val_real() override
Definition: item_func.cc:5144
Item_func_udf_decimal(const POS &pos, udf_func *udf_arg, PT_item_list *opt_list)
Definition: item_func.h:2338
longlong val_int() override
Definition: item_func.cc:5136
enum Item_result result_type() const override
Definition: item_func.h:2351
bool get_time(MYSQL_TIME *ltime) override
Definition: item_func.h:2348
String * val_str(String *str) override
Definition: item_func.cc:5157
bool resolve_type(THD *thd) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_func.cc:5167
my_decimal * val_decimal(my_decimal *) override
Definition: item_func.cc:5152
Definition: item_func.h:2287
bool get_date(MYSQL_TIME *ltime, my_time_flags_t fuzzydate) override
Definition: item_func.h:2303
Item_func_udf_float(const POS &pos, udf_func *udf_arg, PT_item_list *opt_list)
Definition: item_func.h:2289
my_decimal * val_decimal(my_decimal *dec_buf) override
Definition: item_func.h:2295
longlong val_int() override
Definition: item_func.h:2291
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_func.h:2309
bool get_time(MYSQL_TIME *ltime) override
Definition: item_func.h:2306
double val_real() override
Definition: item_func.cc:5106
String * val_str(String *str) override
Definition: item_func.cc:5114
Definition: item_func.h:2316
bool get_time(MYSQL_TIME *ltime) override
Definition: item_func.h:2328
enum Item_result result_type() const override
Definition: item_func.h:2329
String * val_str(String *str) override
Definition: item_func.cc:5128
Item_func_udf_int(const POS &pos, udf_func *udf_arg, PT_item_list *opt_list)
Definition: item_func.h:2318
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_func.h:2330
double val_real() override
Definition: item_func.h:2321
bool get_date(MYSQL_TIME *ltime, my_time_flags_t fuzzydate) override
Definition: item_func.h:2325
longlong val_int() override
Definition: item_func.cc:5122
Definition: item_func.h:2355
bool resolve_type(THD *thd) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_func.cc:5175
Item_func_udf_str(const POS &pos, udf_func *udf_arg, PT_item_list *opt_list)
Definition: item_func.h:2357
String * val_str(String *) override
Definition: item_func.cc:5184
bool get_time(MYSQL_TIME *ltime) override
Definition: item_func.h:2388
bool get_date(MYSQL_TIME *ltime, my_time_flags_t fuzzydate) override
Definition: item_func.h:2385
my_decimal * val_decimal(my_decimal *dec_buf) override
Definition: item_func.h:2378
enum Item_result result_type() const override
Definition: item_func.h:2391
longlong val_int() override
Definition: item_func.h:2370
double val_real() override
Definition: item_func.h:2361
Definition: item_func.h:1571
Item_func_units(const POS &pos, Item *a, double mul_arg, double add_arg)
Definition: item_func.h:1575
double add
Definition: item_func.h:1572
bool resolve_type(THD *thd) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_func.cc:3776
double val_real() override
Definition: item_func.cc:3785
double mul
Definition: item_func.h:1572
Definition: item_func.h:4006
table_map get_initial_pseudo_tables() const override
Returns the pseudo tables depended upon in order to evaluate this function expression.
Definition: item_func.h:4029
Item_int_func super
Definition: item_func.h:4007
longlong val_int() override
Definition: item_func.cc:8649
bool do_itemize(Parse_context *pc, Item **res) override
The core function that does the actual itemization.
Definition: item_func.cc:8641
Item_func_uuid_short(const POS &pos)
Definition: item_func.h:4010
bool check_function_as_value_generator(uchar *checker_args) override
Check if this item is allowed for a virtual column or inside a default expression.
Definition: item_func.h:4020
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_func.h:4015
bool check_partition_func_processor(uchar *) override
Check if a partition function is allowed.
Definition: item_func.h:4019
const char * func_name() const override
Definition: item_func.h:4013
Definition: item_func.h:1882
bool resolve_type(THD *thd) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_func.h:1890
const char * func_name() const override
Definition: item_func.h:1887
Item_func_validate_password_strength(const POS &pos, Item *a)
Definition: item_func.h:1884
longlong val_int() override
Definition: item_func.cc:4323
Definition: item_func.h:1796
const char * func_name() const override
Definition: item_func.h:1802
String value
Definition: item_func.h:1797
Item_func_vector_dim(const POS &pos, Item *a)
Definition: item_func.h:1800
longlong val_int() override
Definition: item_func.cc:4226
bool resolve_type(THD *thd) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_func.h:1803
Definition: item_func.h:4034
Item_static_string_func super
Definition: item_func.h:4035
bool do_itemize(Parse_context *pc, Item **res) override
The core function that does the actual itemization.
Definition: item_func.cc:8657
Item_func_version(const POS &pos)
Definition: item_func.cc:9897
Definition: item_func.h:100
bool agg_arg_charsets_for_string_result(DTCollation &c, Item **items, uint nitems, int item_sep=1)
Definition: item_func.h:580
bool param_type_is_rejected(uint start, uint end)
For arguments of this Item_func ("args" array), in range [start,end[ : sends error if they're a dynam...
Definition: item_func.cc:544
bool param_type_uses_non_param(THD *thd, enum_field_types def=MYSQL_TYPE_VARCHAR)
Definition: item_func.cc:617
Item_func(const POS &pos, Item *a, Item *b, Item *c)
Definition: item_func.h:403
int check_decimal_overflow(int error)
Throw an error if the error code of a DECIMAL operation is E_DEC_OVERFLOW.
Definition: item_func.h:656
Item_func()
Definition: item_func.h:365
my_decimal * val_decimal(my_decimal *) override
Definition: item_func.cc:835
bool replace_equal_field_checker(uchar **arg) override
Definition: item_func.h:605
virtual bool have_rev_func() const
Definition: item_func.h:534
Item ** args
Array of pointers to arguments.
Definition: item_func.h:107
virtual enum Functype functype() const
Definition: item_func.h:364
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_func.cc:1025
bool check_function_as_value_generator(uchar *checker_args) override
Check if this item is allowed for a virtual column or inside a default expression.
Definition: item_func.h:814
Item_func(const POS &pos)
Definition: item_func.h:367
bool reject_vector_args()
Definition: item_func.cc:1600
void update_used_tables() override
Updates used tables, not null tables information and accumulates properties up the item tree,...
Definition: item_func.cc:734
bool check_valid_arguments_processor(uchar *) override
Definition: item_func.h:710
Item_func(Item *a, Item *b)
Definition: item_func.h:379
bool fix_func_arg(THD *, Item **arg)
Definition: item_func.cc:438
bool alloc_args(MEM_ROOT *mem_root, unsigned num_args)
Allocates space for the given number of arguments, if needed.
Definition: item_func.h:114
virtual Item * get_arg(uint i)
Get the i'th argument of the function that this object represents.
Definition: item_func.h:492
bool split_sum_func(THD *thd, Ref_item_array ref_item_array, mem_root_deque< Item * > *fields) override
See comments in Item_cmp_func::split_sum_func()
Definition: item_func.cc:723
longlong val_int_from_real()
Definition: item_func.cc:2082
void traverse_cond(Cond_traverser traverser, void *arg, traverse_order order) override
Definition: item_func.cc:642
virtual table_map get_initial_pseudo_tables() const
Returns the pseudo tables depended upon in order to evaluate this function expression.
Definition: item_func.h:522
Item * compile(Item_analyzer analyzer, uchar **arg_p, Item_transformer transformer, uchar *arg_t) override
Compile Item_func object with a processor and a transformer callback functions.
Definition: item_func.cc:700
bool is_null() override
The method allows to determine nullness of a complex expression without fully evaluating it,...
Definition: item_func.h:561
Item_func(const POS &pos, Item *a)
Definition: item_func.h:374
Item * replace_equal_field(uchar *arg) override
Definition: item_func.h:611
Functype
Definition: item_func.h:209
@ DATEADD_FUNC
Definition: item_func.h:316
@ TRIG_COND_FUNC
Definition: item_func.h:253
@ JSON_VALUE_FUNC
Definition: item_func.h:353
@ SP_CROSSES_FUNC
Definition: item_func.h:237
@ ROLLUP_GROUP_ITEM_FUNC
Definition: item_func.h:264
@ JSON_STORAGE_SIZE_FUNC
Definition: item_func.h:351
@ NOT_ALL_FUNC
Definition: item_func.h:250
@ LIKE_FUNC
Definition: item_func.h:220
@ FALSE_FUNC
Definition: item_func.h:333
@ SP_EXTERIORRING
Definition: item_func.h:245
@ PLUS_FUNC
Definition: item_func.h:267
@ JSON_SEARCH_FUNC
Definition: item_func.h:354
@ SIGN_FUNC
Definition: item_func.h:277
@ JSON_STORAGE_FREE_FUNC
Definition: item_func.h:352
@ NULLIF_FUNC
Definition: item_func.h:294
@ YEAR_FUNC
Definition: item_func.h:296
@ NOT_FUNC
Definition: item_func.h:249
@ MINUS_FUNC
Definition: item_func.h:268
@ HOUR_FUNC
Definition: item_func.h:307
@ TIME_TO_SEC_FUNC
Definition: item_func.h:321
@ LOG_FUNC
Definition: item_func.h:279
@ PERIODDIFF_FUNC
Definition: item_func.h:337
@ XOR_FUNC
Definition: item_func.h:226
@ COND_OR_FUNC
Definition: item_func.h:225
@ JSON_CONTAINS
Definition: item_func.h:327
@ JSON_VALID_FUNC
Definition: item_func.h:346
@ JSON_UNQUOTE_FUNC
Definition: item_func.h:329
@ GREATEST_FUNC
Definition: item_func.h:324
@ SP_EQUALS_FUNC
Definition: item_func.h:232
@ LN_FUNC
Definition: item_func.h:280
@ FROM_UNIXTIME_FUNC
Definition: item_func.h:317
@ COND_AND_FUNC
Definition: item_func.h:224
@ EQ_FUNC
Definition: item_func.h:211
@ MAKETIME_FUNC
Definition: item_func.h:299
@ FUNC_SP
Definition: item_func.h:259
@ ROUND_FUNC
Definition: item_func.h:272
@ JSON_CONTAINS_PATH_FUNC
Definition: item_func.h:350
@ NOW_FUNC
Definition: item_func.h:251
@ FROM_DAYS_FUNC
Definition: item_func.h:252
@ TRUE_FUNC
Definition: item_func.h:332
@ LEAST_FUNC
Definition: item_func.h:326
@ IN_FUNC
Definition: item_func.h:228
@ CONVERT_TZ_FUNC
Definition: item_func.h:318
@ LE_FUNC
Definition: item_func.h:215
@ COLLATE_FUNC
Definition: item_func.h:256
@ GSYSVAR_FUNC
Definition: item_func.h:262
@ MATCH_FUNC
Definition: item_func.h:219
@ MULTI_EQ_FUNC
Definition: item_func.h:229
@ FT_FUNC
Definition: item_func.h:218
@ GUSERVAR_FUNC
Definition: item_func.h:255
@ LT_FUNC
Definition: item_func.h:214
@ MOD_FUNC
Definition: item_func.h:292
@ SP_COVEREDBY_FUNC
Definition: item_func.h:240
@ NEG_FUNC
Definition: item_func.h:261
@ DD_INTERNAL_FUNC
Definition: item_func.h:266
@ ISNULL_FUNC
Definition: item_func.h:221
@ JSON_ARRAY_FUNC
Definition: item_func.h:345
@ SP_TOUCHES_FUNC
Definition: item_func.h:236
@ SP_DISJOINT_FUNC
Definition: item_func.h:233
@ ISNOTNULLTEST_FUNC
Definition: item_func.h:231
@ DAY_FUNC
Definition: item_func.h:302
@ LOG10_FUNC
Definition: item_func.h:281
@ UDF_FUNC
Definition: item_func.h:260
@ MAKEDATE_FUNC
Definition: item_func.h:298
@ COT_FUNC
Definition: item_func.h:285
@ ISTRUTH_FUNC
Definition: item_func.h:223
@ SEC_TO_TIME_FUNC
Definition: item_func.h:338
@ DATE_FUNC
Definition: item_func.h:306
@ TIMESTAMPDIFF_FUNC
Definition: item_func.h:322
@ SECOND_FUNC
Definition: item_func.h:309
@ EXP_FUNC
Definition: item_func.h:288
@ SP_STARTPOINT
Definition: item_func.h:243
@ JSON_DEPTH_FUNC
Definition: item_func.h:342
@ JSON_QUOTE_FUNC
Definition: item_func.h:349
@ PERIODADD_FUNC
Definition: item_func.h:336
@ SP_POINTN
Definition: item_func.h:246
@ EXTRACT_FUNC
Definition: item_func.h:257
@ MONTH_FUNC
Definition: item_func.h:300
@ TO_SECONDS_FUNC
Definition: item_func.h:305
@ ABS_FUNC
Definition: item_func.h:275
@ BETWEEN
Definition: item_func.h:227
@ IF_FUNC
Definition: item_func.h:293
@ JSON_OBJECT_FUNC
Definition: item_func.h:344
@ JSON_TYPE_FUNC
Definition: item_func.h:347
@ MICROSECOND_FUNC
Definition: item_func.h:310
@ ANY_VALUE_FUNC
Definition: item_func.h:340
@ STRCMP_FUNC
Definition: item_func.h:331
@ JSON_PRETTY_FUNC
Definition: item_func.h:348
@ QUARTER_FUNC
Definition: item_func.h:313
@ NE_FUNC
Definition: item_func.h:213
@ TIMEDIFF_FUNC
Definition: item_func.h:335
@ JSON_EXTRACT_FUNC
Definition: item_func.h:343
@ TABLE_FUNC
Definition: item_func.h:265
@ MEMBER_OF_FUNC
Definition: item_func.h:330
@ POW_FUNC
Definition: item_func.h:276
@ GE_FUNC
Definition: item_func.h:216
@ SP_GEOMETRYN
Definition: item_func.h:247
@ SYSDATE_FUNC
Definition: item_func.h:334
@ MONTHNAME_FUNC
Definition: item_func.h:301
@ TYPECAST_FUNC
Definition: item_func.h:258
@ SUSERVAR_FUNC
Definition: item_func.h:254
@ EQUAL_FUNC
Definition: item_func.h:212
@ GT_FUNC
Definition: item_func.h:217
@ RADIANS_FUNC
Definition: item_func.h:287
@ UNKNOWN_FUNC
Definition: item_func.h:210
@ SP_DISTANCE_FUNC
Definition: item_func.h:234
@ SP_WITHIN_FUNC
Definition: item_func.h:238
@ SP_INTERIORRINGN
Definition: item_func.h:248
@ SIN_FUNC
Definition: item_func.h:282
@ SP_INTERSECTS_FUNC
Definition: item_func.h:235
@ LAST_DAY_FUNC
Definition: item_func.h:319
@ WEEKDAY_FUNC
Definition: item_func.h:315
@ ADDTIME_FUNC
Definition: item_func.h:312
@ DEGREES_FUNC
Definition: item_func.h:286
@ JSON_OVERLAPS
Definition: item_func.h:328
@ DAYOFYEAR_FUNC
Definition: item_func.h:311
@ SQRT_FUNC
Definition: item_func.h:274
@ GROUPING_FUNC
Definition: item_func.h:263
@ ISNOTNULL_FUNC
Definition: item_func.h:222
@ ASIN_FUNC
Definition: item_func.h:289
@ TRUNCATE_FUNC
Definition: item_func.h:273
@ TAN_FUNC
Definition: item_func.h:283
@ GET_FORMAT_FUNC
Definition: item_func.h:339
@ ATAN_FUNC
Definition: item_func.h:290
@ JSON_LENGTH_FUNC
Definition: item_func.h:341
@ DAYNAME_FUNC
Definition: item_func.h:303
@ DATETIME_LITERAL
Definition: item_func.h:323
@ MINUTE_FUNC
Definition: item_func.h:308
@ ACOS_FUNC
Definition: item_func.h:291
@ COS_FUNC
Definition: item_func.h:284
@ INTERVAL_FUNC
Definition: item_func.h:230
@ MUL_FUNC
Definition: item_func.h:269
@ SP_COVERS_FUNC
Definition: item_func.h:241
@ CEILING_FUNC
Definition: item_func.h:271
@ TO_DAYS_FUNC
Definition: item_func.h:304
@ WEEK_FUNC
Definition: item_func.h:314
@ YEARWEEK_FUNC
Definition: item_func.h:297
@ SP_CONTAINS_FUNC
Definition: item_func.h:239
@ FLOOR_FUNC
Definition: item_func.h:278
@ CASE_FUNC
Definition: item_func.h:295
@ COALESCE_FUNC
Definition: item_func.h:325
@ SP_ENDPOINT
Definition: item_func.h:244
@ DIV_FUNC
Definition: item_func.h:270
@ SP_OVERLAPS_FUNC
Definition: item_func.h:242
@ UNIX_TIMESTAMP_FUNC
Definition: item_func.h:320
Item * m_embedded_arguments[2]
Definition: item_func.h:110
virtual uint argument_count() const
Definition: item_func.h:131
longlong check_integer_overflow(longlong value, bool val_unsigned)
Throw an error if the input BIGINT value represented by the (longlong value, bool unsigned flag) pair...
Definition: item_func.h:646
Item * replace_func_call(uchar *) override
Definition: item_func.cc:622
void print_op(const THD *thd, String *str, enum_query_type query_type) const
Definition: item_func.cc:764
virtual bool eq_specific(const Item *) const
Provide a more specific equality check for a function.
Definition: item_func.h:532
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_func.cc:1043
Item_func(const POS &pos, Item *a, Item *b, Item *c, Item *d, Item *e)
Definition: item_func.h:446
virtual enum_const_item_cache can_cache_json_arg(Item *arg)
Whether an arg of a JSON function can be cached to avoid repetitive string->JSON conversion.
Definition: item_func.h:733
Item * gc_subst_transformer(uchar *arg) override
Transformer function for GC substitution.
Definition: item_func.cc:1331
table_map used_tables_cache
Value used in calculation of result of used_tables()
Definition: item_func.h:193
bool param_type_is_default(THD *thd, uint start, uint end, enum_field_types def=MYSQL_TYPE_VARCHAR)
Definition: item_func.h:169
optimize_type
Definition: item_func.h:356
@ OPTIMIZE_NONE
Definition: item_func.h:357
@ OPTIMIZE_EQUAL
Definition: item_func.h:361
@ OPTIMIZE_NULL
Definition: item_func.h:360
@ OPTIMIZE_KEY
Definition: item_func.h:358
@ OPTIMIZE_OP
Definition: item_func.h:359
void set_used_tables(table_map map)
Definition: item_func.h:526
bool do_itemize(Parse_context *pc, Item **res) override
The core function that does the actual itemization.
Definition: item_func.cc:361
bool resolve_type(THD *thd) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_func.h:716
virtual const char * func_name() const =0
const Item_field * contributes_to_filter(THD *thd, table_map read_tables, table_map filter_for_table, const MY_BITMAP *fields_to_ignore) const
Whether or not an item should contribute to the filtering effect (.
Definition: item_func.cc:915
bool has_timestamp_args()
Definition: item_func.h:660
bool agg_arg_charsets(DTCollation &c, Item **items, uint nitems, uint flags, int item_sep)
Definition: item_func.h:570
virtual bool is_deprecated() const
Definition: item_func.h:554
Item_func(const POS &pos, Item *a, Item *b, Item *c, Item *d, Item *e, Item *f)
Definition: item_func.h:471
enum Type type() const override
Definition: item_func.h:363
virtual Item * key_item() const
Definition: item_func.h:535
bool param_type_is_default(THD *thd, uint start, uint end, uint step, enum_field_types def)
For arguments of this Item_func ("args" array), in range [start, start+step, start+2*step,...
Definition: item_func.cc:528
Item_func(const POS &pos, Item *a, Item *b, Item *c, Item *d)
Definition: item_func.h:424
virtual bool may_have_named_parameters() const
Named parameters are allowed in a parameter list.
Definition: item_func.h:811
bool is_valid_for_pushdown(uchar *arg) override
Check if all the columns present in this expression are from the derived table.
Definition: item_func.cc:1017
uint num_vector_args()
Definition: item_func.cc:1586
bool propagate_type(THD *thd, const Type_properties &type) override
Default implementation for all functions: Propagate base_item's type into all arguments.
Definition: item_func.cc:504
void print(const THD *thd, String *str, enum_query_type query_type) const override
This method is used for to:
Definition: item_func.cc:748
bool get_arg0_date(MYSQL_TIME *ltime, my_time_flags_t fuzzy_date)
Definition: item_func.h:555
Item_func(Item *a, Item *b, Item *c, Item *d)
Definition: item_func.h:411
bool reject_geometry_args()
Definition: item_func.cc:1612
bool fix_fields(THD *, Item **ref) override
Definition: item_func.cc:406
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_func.cc:460
bool set_arguments(mem_root_deque< Item * > *list, bool context_free)
Copy arguments from list to args array.
Definition: item_func.cc:329
virtual bool allow_replacement(Item_field *const original, Item *const subst)
Check whether a function allows replacement of a field with another item: In particular,...
Definition: item_func.h:629
Item_func(const POS &pos, Item *a, Item *b)
Definition: item_func.h:386
virtual optimize_type select_optimize(const THD *)
Definition: item_func.h:533
bool has_date_args()
Definition: item_func.h:670
virtual const Item * get_arg(uint i) const
Get the i'th argument of the function that this object represents.
Definition: item_func.h:495
uint arg_count
How many arguments in 'args'.
Definition: item_func.h:130
Item_func(Item *a, Item *b, Item *c, Item *d, Item *e)
Definition: item_func.h:432
Item ** arguments() const
Definition: item_func.h:132
Field * tmp_table_field(TABLE *t_arg) override
Definition: item_func.cc:793
bool is_null_on_null() const
Definition: item_func.h:198
bool has_time_args()
Definition: item_func.h:681
bool eq(const Item *item) const override
Compare this item with another item for equality.
Definition: item_func.cc:777
bool is_non_const_over_literals(uchar *) override
Definition: item_func.h:812
bool agg_arg_charsets_for_comparison(DTCollation &c, Item **items, uint nitems, int item_sep=1)
Definition: item_func.h:590
virtual void fix_num_length_and_dec()
Definition: item_func.cc:861
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_func.cc:893
void signal_invalid_argument_for_log()
Definition: item_func.cc:885
bool has_datetime_args()
Definition: item_func.h:692
void signal_divide_by_null()
Definition: item_func.cc:877
double check_float_overflow(double value)
Throw an error if the input double number is not finite, i.e.
Definition: item_func.h:638
bool get_arg0_time(MYSQL_TIME *ltime)
Definition: item_func.h:558
Item_func(Item *a)
Definition: item_func.h:370
Item_func(mem_root_deque< Item * > *list)
Definition: item_func.h:482
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_func.h:524
table_map not_null_tables_cache
Value used in calculation of result of not_null_tables()
Definition: item_func.h:195
virtual Item * set_arg(THD *, uint, Item *)
Definition: item_func.h:496
bool null_on_null
Affects how to determine that NULL argument implies a NULL function return.
Definition: item_func.h:186
void print_args(const THD *thd, String *str, uint from, enum_query_type query_type) const
Definition: item_func.cc:756
Item_func(Item *a, Item *b, Item *c, Item *d, Item *e, Item *f)
Definition: item_func.h:455
table_map used_tables() const override
Definition: item_func.h:523
virtual bool contains_only_equi_join_condition() const
Whether this Item is an equi-join condition.
Definition: item_func.h:743
bool walk(Item_processor processor, enum_walk walk, uchar *arg) override
Traverses a tree of Items in prefix and/or postfix order.
Definition: item_func.cc:631
Item * transform(Item_transformer transformer, uchar *arg) override
Transform an Item_func object with a transformer callback function.
Definition: item_func.cc:675
virtual bool resolve_type_inner(THD *)
Resolve type of function after all arguments have had their data types resolved.
Definition: item_func.h:512
Item_func(Item *a, Item *b, Item *c)
Definition: item_func.h:392
uint allowed_arg_cols
Definition: item_func.h:191
Definition: item_func.h:1019
String * val_str(String *str) override
Definition: item_func.cc:1471
Item_int_func(const POS &pos, Item *a)
Definition: item_func.h:1027
Item_int_func(Item *a, Item *b, Item *c)
Definition: item_func.h:1038
Item_int_func(const POS &pos)
Definition: item_func.h:1022
Item_int_func(Item *a, Item *b)
Definition: item_func.h:1031
Item_int_func(const POS &pos, PT_item_list *opt_list)
Definition: item_func.h:1057
bool get_date(MYSQL_TIME *ltime, my_time_flags_t fuzzydate) override
Definition: item_func.h:1067
double val_real() override
Definition: item_func.cc:1465
Item_int_func(const POS &pos, Item *a, Item *b, Item *c)
Definition: item_func.h:1041
Item_int_func()
Definition: item_func.h:1021
Item_int_func(const POS &pos, Item *a, Item *b)
Definition: item_func.h:1034
Item_int_func(Item *a)
Definition: item_func.h:1026
Item_int_func(mem_root_deque< Item * > *list)
Definition: item_func.h:1054
Item_int_func(const POS &pos, Item *a, Item *b, Item *c, Item *d)
Definition: item_func.h:1049
enum Item_result result_type() const override
Definition: item_func.h:1071
Item_int_func(Item *a, Item *b, Item *c, Item *d)
Definition: item_func.h:1046
Item_int_func(THD *thd, Item_int_func *item)
Definition: item_func.h:1062
bool get_time(MYSQL_TIME *ltime) override
Definition: item_func.h:1070
Definition: item_func.h:2511
Item_master_pos_wait(const POS &pos, Item *a, Item *b)
Definition: item_func.h:2513
Item_master_pos_wait(const POS &pos, Item *a, Item *b, Item *c)
Definition: item_func.h:2515
Item_master_pos_wait(const POS &pos, Item *a, Item *b, Item *c, Item *d)
Definition: item_func.h:2517
longlong val_int() override
Wait until we are at or past the given position in the master binlog on the slave.
Definition: item_func.cc:5263
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:1425
Definition: item_func.h:991
String * str_op(String *) override
Performs the operation that this functions implements when the result type is a string type.
Definition: item_func.h:1005
Item_num_op(const POS &pos, Item *a, Item *b)
Definition: item_func.h:994
virtual void result_precision()=0
void print(const THD *thd, String *str, enum_query_type query_type) const override
This method is used for to:
Definition: item_func.h:999
bool date_op(MYSQL_TIME *, my_time_flags_t) override
Performs the operation that this functions implements when the result type is MYSQL_TYPE_DATE or MYSQ...
Definition: item_func.h:1009
Item_num_op(Item *a, Item *b)
Definition: item_func.h:993
void set_numeric_type() override
Check arguments to determine the data type for a numeric function of two arguments.
Definition: item_func.cc:1508
bool time_op(MYSQL_TIME *) override
Definition: item_func.h:1013
Definition: item_func.h:831
bool get_date(MYSQL_TIME *ltime, my_time_flags_t fuzzydate) override
Definition: item_func.h:863
longlong val_int() override
Definition: item_func.h:859
my_decimal * val_decimal(my_decimal *decimal_value) override
Definition: item_func.cc:853
bool get_time(MYSQL_TIME *ltime) override
Definition: item_func.h:866
Item_real_func(Item *a, Item *b)
Definition: item_func.h:843
String * val_str(String *str) override
Definition: item_func.cc:844
Item_real_func(mem_root_deque< Item * > *list)
Definition: item_func.h:849
Item_real_func(const POS &pos)
Definition: item_func.h:834
Item_real_func(const POS &pos, Item *a)
Definition: item_func.h:839
enum Item_result result_type() const override
Definition: item_func.h:869
Item_real_func()
Definition: item_func.h:833
Item_real_func(const POS &pos, PT_item_list *list)
Definition: item_func.h:853
Item_real_func(Item *a)
Definition: item_func.h:838
Item_real_func(const POS &pos, Item *a, Item *b)
Definition: item_func.h:845
Item with result field.
Definition: item.h:5832
int raise_decimal_overflow()
Definition: item.h:5891
longlong raise_integer_overflow()
Definition: item.h:5886
longlong llrint_with_overflow_check(double realval)
Definition: item.h:5871
void cleanup() override
Called for every Item after use (preparation and execution).
Definition: item.cc:10910
double raise_float_overflow()
Definition: item.h:5881
A wrapper Item that normally returns its parameter, but becomes NULL when processing rows for rollup.
Definition: item_func.h:1717
const char * func_name() const override
Definition: item_func.h:1737
bool rollup_null() const
Definition: item_func.h:1762
void print(const THD *thd, String *str, enum_query_type query_type) const override
This method is used for to:
Definition: item_func.cc:4189
table_map used_tables() const override
Definition: item_func.h:1738
TYPELIB * get_typelib() const override
Get the typelib information for an item of type set or enum.
Definition: item_func.cc:4211
String * val_str(String *str) override
Definition: item_func.cc:4156
bool val_json(Json_wrapper *result) override
Get a JSON value from an Item.
Definition: item_func.cc:4178
const int m_min_rollup_level
Definition: item_func.h:1778
bool eq_specific(const Item *item) const override
Provide a more specific equality check for a function.
Definition: item_func.cc:4206
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_func.h:1752
my_decimal * val_decimal(my_decimal *dec) override
Definition: item_func.cc:4167
Item_result result_type() const override
Definition: item_func.h:1751
Item_rollup_group_item(int min_rollup_level, Item *inner_item)
Definition: item_func.h:1719
void set_current_rollup_level(int level)
Definition: item_func.h:1772
int min_rollup_level() const
Definition: item_func.h:1775
int m_current_rollup_level
Definition: item_func.h:1779
longlong val_int() override
Definition: item_func.cc:4145
Item * inner_item()
Definition: item_func.h:1760
const Item * inner_item() const
Definition: item_func.h:1761
bool get_date(MYSQL_TIME *ltime, my_time_flags_t fuzzydate) override
Definition: item_func.cc:4115
bool get_time(MYSQL_TIME *ltime) override
Definition: item_func.cc:4125
enum Functype functype() const override
Definition: item_func.h:1765
void update_used_tables() override
Updates used tables, not null tables information and accumulates properties up the item tree,...
Definition: item_func.h:1747
double val_real() override
Definition: item_func.cc:4134
Definition: item_func.h:2479
const char * func_name() const override
Definition: item_func.h:2493
bool check_function_as_value_generator(uchar *checker_args) override
Check if this item is allowed for a virtual column or inside a default expression.
Definition: item_func.h:2502
Item_source_pos_wait(const POS &pos, Item *a, Item *b, Item *c, Item *d)
Definition: item_func.h:2488
Item_source_pos_wait(const POS &pos, Item *a, Item *b, Item *c)
Definition: item_func.h:2486
bool resolve_type(THD *thd) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_func.h:2494
longlong val_int() override
Wait until we are at or past the given position in the master binlog on the slave.
Definition: item_func.cc:5205
String value
Definition: item_func.h:2481
bool do_itemize(Parse_context *pc, Item **res) override
The core function that does the actual itemization.
Definition: item_func.cc:5192
Item_int_func super
Definition: item_func.h:2480
Item_source_pos_wait(const POS &pos, Item *a, Item *b)
Definition: item_func.h:2484
Utility mixin class to be able to walk() only parts of item trees.
Definition: item.h:738
Definition: item_func.h:1129
Item_typecast_decimal(const POS &pos, Item *a, int len, int dec)
Definition: item_func.h:1134
longlong val_int() override
Definition: item_func.cc:2005
void print(const THD *thd, String *str, enum_query_type query_type) const override
This method is used for to:
Definition: item_func.cc:2043
const char * func_name() const override
Definition: item_func.h:1155
enum Item_result result_type() const override
Definition: item_func.h:1148
void add_json_info(Json_object *obj) override
Add all the node-specific json fields.
Definition: item_func.cc:2057
String * val_str(String *str) override
Definition: item_func.cc:1990
my_decimal * val_decimal(my_decimal *) override
Definition: item_func.cc:2013
bool get_time(MYSQL_TIME *ltime) override
Definition: item_func.h:1144
double val_real() override
Definition: item_func.cc:1997
bool get_date(MYSQL_TIME *ltime, my_time_flags_t fuzzydate) override
Definition: item_func.h:1141
enum Functype functype() const override
Definition: item_func.h:1156
bool resolve_type(THD *thd) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_func.h:1149
Class used to implement CAST to floating-point data types.
Definition: item_func.h:1164
void print(const THD *thd, String *str, enum_query_type query_type) const override
This method is used for to:
Definition: item_func.cc:2116
void add_json_info(Json_object *obj) override
Add all the node-specific json fields.
Definition: item_func.h:1166
enum Item_result result_type() const override
Definition: item_func.h:1186
Item_typecast_real(const POS &pos, Item *a, bool as_double)
Definition: item_func.h:1172
bool resolve_type(THD *thd) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_func.h:1187
Item_typecast_real(Item *a)
Definition: item_func.h:1179
String * val_str(String *str) override
Definition: item_func.cc:2064
double val_real() override
Definition: item_func.cc:2068
longlong val_int() override
Definition: item_func.h:1182
const char * func_name() const override
Definition: item_func.h:1191
bool get_date(MYSQL_TIME *ltime, my_time_flags_t fuzzydate) override
Definition: item_func.cc:2099
bool get_time(MYSQL_TIME *ltime) override
Definition: item_func.cc:2104
enum Functype functype() const override
Definition: item_func.h:1192
my_decimal * val_decimal(my_decimal *decimal_value) override
Definition: item_func.cc:2108
Definition: item_func.h:1103
const char * func_name() const override
Definition: item_func.h:1108
Item_typecast_signed(const POS &pos, Item *a)
Definition: item_func.h:1105
void print(const THD *thd, String *str, enum_query_type query_type) const override
This method is used for to:
Definition: item_func.cc:1895
longlong val_int() override
Definition: item_func.cc:1926
bool resolve_type(THD *thd) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_func.cc:1902
enum Functype functype() const override
Definition: item_func.h:1113
Definition: item_func.h:1116
void print(const THD *thd, String *str, enum_query_type query_type) const override
This method is used for to:
Definition: item_func.cc:1954
bool resolve_type(THD *thd) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_func.cc:1961
Item_typecast_unsigned(const POS &pos, Item *a)
Definition: item_func.h:1118
longlong val_int() override
Definition: item_func.cc:1967
const char * func_name() const override
Definition: item_func.h:1121
enum Functype functype() const override
Definition: item_func.h:1126
Definition: item_func.h:2239
Item_func super
Definition: item_func.h:2240
Item_udf_func(const POS &pos, udf_func *udf_arg, PT_item_list *opt_list)
Definition: item_func.h:2246
const char * func_name() const override
Definition: item_func.h:2253
bool may_have_named_parameters() const override
Named parameters are allowed in a parameter list.
Definition: item_func.h:2277
bool check_function_as_value_generator(uchar *checker_args) override
Check if this item is allowed for a virtual column or inside a default expression.
Definition: item_func.h:2264
void print(const THD *thd, String *str, enum_query_type query_type) const override
This method is used for to:
Definition: item_func.cc:5077
bool fix_fields(THD *thd, Item **ref) override
Definition: item_func.cc:4608
void cleanup() override
Called for every Item after use (preparation and execution).
Definition: item_func.cc:5071
table_map get_initial_pseudo_tables() const override
Returns the pseudo tables depended upon in order to evaluate this function expression.
Definition: item_func.h:2255
~Item_udf_func() override=default
Item_result result_type() const override
Definition: item_func.h:2260
udf_handler udf
Definition: item_func.h:2243
bool do_itemize(Parse_context *pc, Item **res) override
The core function that does the actual itemization.
Definition: item_func.cc:5062
enum Functype functype() const override
Definition: item_func.h:2254
void compute_cost(CostOfItem *root_cost) const override
Compute the cost of evaluating this Item.
Definition: item_func.h:2272
bool m_non_deterministic
This member is set during resolving and is used by update_used_tables() and fix_after_pullout() to pr...
Definition: item_func.h:2284
Definition: item_func.h:3404
bool get_date(MYSQL_TIME *, my_time_flags_t) override
Definition: item_func.h:3419
double val_real() override
Definition: item_func.cc:7122
void set_value(const char *str, size_t length, const CHARSET_INFO *cs)
Definition: item_func.cc:7114
longlong val_int() override
Definition: item_func.cc:7127
bool fix_fields(THD *thd, Item **ref) override
Definition: item_func.cc:7083
String * val_str(String *str) override
Definition: item_func.cc:7132
Name_string name
Definition: item_func.h:3405
Item_user_var_as_out_param(const POS &pos, Name_string a)
Definition: item_func.h:3409
enum Type type() const override
Definition: item_func.h:3414
void print(const THD *thd, String *str, enum_query_type query_type) const override
This method is used for to:
Definition: item_func.cc:7142
bool get_time(MYSQL_TIME *) override
Definition: item_func.h:3423
void set_null_value(const CHARSET_INFO *cs)
Definition: item_func.cc:7108
my_decimal * val_decimal(my_decimal *decimal_buffer) override
Definition: item_func.cc:7137
user_var_entry * entry
Definition: item_func.h:3406
Common class for: Item_func_get_system_var Item_func_get_user_var Item_func_set_user_var.
Definition: item_func.h:3052
Item_var_func(const POS &pos, Item *a)
Definition: item_func.h:3060
bool get_time(MYSQL_TIME *ltime) override
Definition: item_func.h:3065
bool get_date(MYSQL_TIME *ltime, my_time_flags_t fuzzydate) override
Definition: item_func.h:3062
Item_var_func()
Definition: item_func.h:3054
bool check_function_as_value_generator(uchar *checker_args) override
Check if this item is allowed for a virtual column or inside a default expression.
Definition: item_func.h:3068
Item_var_func(THD *thd, Item_var_func *item)
Definition: item_func.h:3057
Item_var_func(Item *a)
Definition: item_func.h:3059
Item_var_func(const POS &pos)
Definition: item_func.h:3055
Base class that is used to represent any kind of expression in a relational query.
Definition: item.h:930
virtual double val_real()=0
String str_value
str_values's main purpose is to cache the value in save_in_field
Definition: item.h:3561
void set_nullable(bool nullable)
Definition: item.h:3670
DTCollation collation
Character set and collation properties assigned for this Item.
Definition: item.h:3568
bool get_time_from_decimal(MYSQL_TIME *ltime)
Convert val_decimal() to time in MYSQL_TIME.
Definition: item.cc:1758
bool is_nullable() const
Definition: item.h:3669
bool get_time_from_string(MYSQL_TIME *ltime)
Convert val_str() to time in MYSQL_TIME.
Definition: item.cc:1739
virtual bool propagate_type(THD *thd, const Type_properties &type)
Propagate data type specifications into parameters and user variables.
Definition: item.h:1313
virtual bool get_time(MYSQL_TIME *ltime)=0
void set_data_type_float()
Set the data type of the Item to be single precision floating point.
Definition: item.h:1587
static Item_result type_to_result(enum_field_types type)
Definition: item.h:1041
virtual table_map used_tables() const
Definition: item.h:2361
bool get_time_from_real(MYSQL_TIME *ltime)
Convert val_real() to time in MYSQL_TIME.
Definition: item.cc:1749
bool get_date_from_decimal(MYSQL_TIME *ltime, my_time_flags_t flags)
Convert val_decimal() to date in MYSQL_TIME.
Definition: item.cc:1671
void add_accum_properties(const Item *item)
Add more accumulated properties to an Item.
Definition: item.h:3419
void set_data_type_double()
Set the data type of the Item to be double precision floating point.
Definition: item.h:1579
enum_field_types data_type() const
Retrieve the derived data type of the Item.
Definition: item.h:1481
Item_name_string item_name
Name from query.
Definition: item.h:3569
bool fixed
True if item has been resolved.
Definition: item.h:3658
enum_const_item_cache
How to cache constant JSON data.
Definition: item.h:998
@ CACHE_NONE
Don't cache.
Definition: item.h:1000
virtual Item_result result_type() const
Definition: item.h:1451
bool null_value
True if item is null.
Definition: item.h:3695
Type
Definition: item.h:965
@ FIELD_ITEM
A reference to a field (column) in a table.
Definition: item.h:967
@ FUNC_ITEM
A function call reference.
Definition: item.h:968
@ STRING_ITEM
A string literal value.
Definition: item.h:971
bool get_time_from_non_temporal(MYSQL_TIME *ltime)
Convert a non-temporal type to time.
Definition: item.cc:1814
uint8 m_accum_properties
Definition: item.h:3736
void set_accum_properties(const Item *item)
Set accumulated properties for an Item.
Definition: item.h:3414
my_decimal * val_decimal_from_real(my_decimal *decimal_value)
Definition: item.cc:350
void set_group_by_modifier()
Set the property: this item (tree) contains a reference to a GROUP BY modifier (such as ROLLUP)
Definition: item.h:3465
bool unsigned_flag
Definition: item.h:3696
virtual bool get_date(MYSQL_TIME *ltime, my_time_flags_t fuzzydate)=0
virtual bool is_null()
The method allows to determine nullness of a complex expression without fully evaluating it,...
Definition: item.h:2539
bool const_for_execution() const
Returns true if item is constant during one query execution.
Definition: item.h:2434
bool get_date_from_string(MYSQL_TIME *ltime, my_time_flags_t flags)
Convert val_str() to date in MYSQL_TIME.
Definition: item.cc:1652
traverse_order
Definition: item.h:995
bool get_date_from_non_temporal(MYSQL_TIME *ltime, my_time_flags_t fuzzydate)
Convert a non-temporal type to date.
Definition: item.cc:1720
virtual String * val_str(String *str)=0
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:3706
bool get_date_from_int(MYSQL_TIME *ltime, my_time_flags_t flags)
Convert val_int() to date in MYSQL_TIME.
Definition: item.cc:1680
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:1796
uint32 max_length
Maximum length of result of evaluating this item, in number of bytes.
Definition: item.h:3586
bool get_date_from_real(MYSQL_TIME *ltime, my_time_flags_t flags)
Convert val_real() to date in MYSQL_TIME.
Definition: item.cc:1662
void set_data_type_longlong()
Set the data type of the Item to be longlong.
Definition: item.h:1555
bool update_null_value()
Make sure the null_value member has a correct value.
Definition: item.cc:7634
void set_data_type_decimal(uint8 precision, uint8 scale)
Set the data type of the Item to be decimal.
Definition: item.h:1569
bool get_time_from_int(MYSQL_TIME *ltime)
Convert val_int() to time in MYSQL_TIME.
Definition: item.cc:1767
Definition: sql_optimizer.h:133
Represents a JSON container value of type "object" (ECMA), type J_OBJECT here.
Definition: json_dom.h:369
bool add_alias(const std::string &key, Json_dom *value)
Insert the value into the object.
Definition: json_dom.h:411
Abstraction for accessing JSON values irrespective of whether they are (started out as) binary JSON v...
Definition: json_dom.h:1153
Definition: sql_list.h:467
Storage for name strings.
Definition: item.h:298
A visitor that calls the specified function on every non-aggregated full-text search function (Item_f...
Definition: item_func.h:3807
std::function< bool(Item_func_match *)> m_func
Definition: item_func.h:3814
bool operator()(Item *item)
Definition: item_func.cc:8000
NonAggregatedFullTextSearchVisitor(std::function< bool(Item_func_match *)> func)
Definition: item_func.cc:7996
Wrapper class for an Item list head, used to allocate Item lists in the parser in a context-independe...
Definition: parse_tree_helpers.h:105
void error(Context *pc, const POS &pos) const
syntax_error() function replacement for deferred reporting of syntax errors
Definition: parse_tree_node_base.h:344
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:1175
A wrapper class for null-terminated constant strings.
Definition: sql_string.h:74
Using this class is fraught with peril, and you need to be very careful when doing so.
Definition: sql_string.h:167
const CHARSET_INFO * charset() const
Definition: sql_string.h:240
const char * ptr() const
Definition: sql_string.h:249
size_t length() const
Definition: sql_string.h:241
Wrapper interface for all kinds of system variables.
Definition: set_var.h:580
For each client connection we create a separate thread with THD serving as a thread/connection descri...
Definition: sql_lexer_thd.h:36
TABLE * table
Definition: table.h:3648
Type properties, used to collect type information for later assignment to an Item object.
Definition: item.h:627
Table_flags ha_table_flags() const
The cached_table_flags is set at ha_open and ha_external_lock.
Definition: handler.h:4920
A (partial) implementation of std::deque allocating its blocks on a MEM_ROOT.
Definition: mem_root_deque.h:111
my_decimal class limits 'decimal_t' type to what we need in MySQL.
Definition: my_decimal.h:95
sp_head represents one instance of a stored program.
Definition: sp_head.h:383
Definition: sp_head.h:123
Definition: sp_rcontext.h:77
A class representing one system variable - that is something that can be accessed as @global....
Definition: set_var.h:107
Item_result result_type() const
Definition: sql_udf.h:119
const char * name() const
Definition: sql_udf.h:118
Definition: item_func.h:3082
char * internal_buffer_ptr()
Position inside a user_var_entry where small values are stored: double values, longlong values and st...
Definition: item_func.h:3099
static const size_t extra_size
Definition: item_func.h:3171
Simple_cstring entry_name
Definition: item_func.h:3196
Item_result m_type
Value type.
Definition: item_func.h:3174
size_t m_length
Value length.
Definition: item_func.h:3173
longlong val_int(bool *null_value) const
Get the value of a variable as an integer.
Definition: item_func.cc:6288
bool unsigned_flag
Definition: item_func.h:3198
THD * m_owner
Definition: item_func.h:3175
size_t length() const
Definition: item_func.h:3270
query_id_t used_query_id() const
Definition: item_func.h:3240
THD * owner_session() const
Definition: item_func.h:3194
static user_var_entry * create(THD *thd, const Name_string &name, const CHARSET_INFO *cs)
Allocates and initializes a user variable instance.
Definition: item_func.cc:6131
void set_value(char *value, size_t length)
Definition: item_func.h:3087
String * val_str(bool *null_value, String *str, uint decimals) const
Get the value of a variable as a string.
Definition: item_func.cc:6327
const char * ptr() const
Definition: item_func.h:3269
void free_value()
Free the external value buffer, if it's allocated.
Definition: item_func.h:3127
bool store(const void *from, size_t length, Item_result type)
Store a value of the given type into a user_var_entry instance.
Definition: item_func.cc:6178
void init(THD *thd, const Simple_cstring &name, const CHARSET_INFO *cs)
Initialize all members.
Definition: item_func.cc:6166
Item_result type() const
The data type of this variable.
Definition: item_func.h:3272
void destroy()
Free all memory used by a user_var_entry instance previously created by create().
Definition: item_func.h:3259
bool alloced()
Check if m_ptr points to an external buffer previously allocated by realloc().
Definition: item_func.h:3122
void lock()
Definition: item_func.cc:6218
void unlock()
Definition: item_func.cc:6223
void set_null_value(Item_result type)
Set value to NULL.
Definition: item_func.h:3232
void copy_name(const Simple_cstring &name)
Copy the array of characters from the given name into the internal name buffer and initialize entry_n...
Definition: item_func.h:3135
DTCollation collation
Definition: item_func.h:3197
void set_type(Item_result type)
Set type of to the given value.
Definition: item_func.h:3223
char * m_ptr
Value.
Definition: item_func.h:3172
query_id_t m_used_query_id
Set to the id of the most recent query that has used the variable.
Definition: item_func.h:3189
void assert_locked() const
Assert the user variable is locked.
Definition: item_func.cc:6203
void reset_value()
Definition: item_func.h:3083
char * name_ptr()
Position inside a user_var_entry where a null-terminates array of characters representing the variabl...
Definition: item_func.h:3107
double val_real(bool *null_value) const
Get the value of a variable as a double.
Definition: item_func.cc:6259
my_decimal * val_decimal(bool *null_value, my_decimal *result) const
Get the value of a variable as a decimal.
Definition: item_func.cc:6359
bool mem_realloc(size_t length)
Initialize m_ptr to the internal buffer (if the value is small enough), or allocate a separate buffer...
Definition: item_func.cc:6148
void set_used_query_id(query_id_t query_id)
Definition: item_func.h:3239
static MEM_ROOT mem_root
Definition: client_plugin.cc:114
#define E_DEC_FATAL_ERROR
Definition: decimal.h:155
#define E_DEC_OVERFLOW
Definition: decimal.h:150
enum_query_type
Query type constants (usable as bitmap flags).
Definition: enum_query_type.h:31
type_conversion_status
Status when storing a value in a field or converting from one datatype to another.
Definition: field.h:204
@ VGS_CHECK_CONSTRAINT
Definition: field.h:478
@ VGS_GENERATED_COLUMN
Definition: field.h:476
Derivation
For use.
Definition: field.h:181
This file contains the field type.
enum_field_types
Column types for MySQL Note: Keep include/mysql/components/services/bits/stored_program_bits....
Definition: field_types.h:55
@ MYSQL_TYPE_VARCHAR
Definition: field_types.h:71
@ MYSQL_TYPE_LONGLONG
Definition: field_types.h:64
@ MYSQL_TYPE_TIME
Definition: field_types.h:67
@ MYSQL_TYPE_VECTOR
Definition: field_types.h:77
@ MYSQL_TYPE_INVALID
Definition: field_types.h:78
@ MYSQL_TYPE_NEWDECIMAL
Definition: field_types.h:81
@ MYSQL_TYPE_DOUBLE
Definition: field_types.h:61
@ MYSQL_TYPE_DATE
Definition: field_types.h:66
@ MYSQL_TYPE_TIMESTAMP
Definition: field_types.h:63
@ MYSQL_TYPE_DATETIME
Definition: field_types.h:68
static const std::string dec("DECRYPTION")
Some definitions for full-text indices.
ft_operation
Operation types, used in FT_HINTS.
Definition: ft_global.h:99
@ FT_OP_NO
Operation undefined, use of hints is impossible.
Definition: ft_global.h:101
#define FTS_DOCID_IN_RESULT
Definition: ft_global.h:66
#define FT_SORTED
Definition: ft_global.h:108
#define FTS_ORDERED_RESULT
Definition: ft_global.h:65
#define FT_BOOL
Definition: ft_global.h:107
cache_type
Definition: my_sys.h:287
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
static void start(mysql_harness::PluginFuncEnv *env)
Definition: http_auth_backend_plugin.cc:180
bool agg_item_charsets(DTCollation &coll, const char *fname, Item **args, uint nargs, uint flags, int item_sep, bool only_consts)
Definition: item.cc:2846
bool agg_item_charsets_for_string_result(DTCollation &c, const char *name, Item **items, uint nitems, int item_sep=1)
Definition: item.h:4079
bool(Item::* Item_analyzer)(uchar **argp)
Definition: item.h:712
void(* Cond_traverser)(const Item *item, void *arg)
Definition: item.h:722
Item *(Item::* Item_transformer)(uchar *arg)
Type for transformers used by Item::transform and Item::compile.
Definition: item.h:721
bool agg_item_charsets_for_comparison(DTCollation &c, const char *name, Item **items, uint nitems, int item_sep=1)
Definition: item.h:4086
bool check_reserved_words(const char *name)
Definition: item_func.cc:166
void report_conversion_error(const CHARSET_INFO *to_cs, const char *from, size_t from_length, const CHARSET_INFO *from_cs)
Definition: item_func.cc:174
Item_field * get_gc_for_expr(const Item *func, Field *fld, Item_result type, Field **found=nullptr)
Return new Item_field if given expression matches GC.
Definition: item_func.cc:1073
bool is_function_of_type(const Item *item, Item_func::Functype type)
Checks if "item" is a function of the specified type.
Definition: item_func.cc:1047
bool simplify_string_args(THD *thd, const DTCollation &c, Item **items, uint nitems)
Simplify the string arguments to a function, if possible.
Definition: item_func.cc:198
void unsupported_json_comparison(size_t arg_count, Item **args, const char *msg)
Go through the arguments of a function and check if any of them are JSON.
Definition: item_func.cc:1648
bool eval_const_cond(THD *thd, Item *cond, bool *value)
Evaluate a constant condition, represented by an Item tree.
Definition: item_func.cc:315
enum_field_types agg_field_type(Item **items, uint nitems)
Aggregates field types from the array of items.
Definition: item_cmpfunc.cc:181
void item_func_sleep_free()
Definition: item_func.cc:5920
void mysql_ull_set_explicit_lock_duration(THD *thd)
Set explicit duration for metadata locks corresponding to user level locks to protect them from being...
Definition: item_func.cc:5388
double my_double_round(double value, longlong dec, bool dec_unsigned, bool truncate)
Definition: item_func.cc:3529
String * eval_string_arg_noinline(const CHARSET_INFO *to_cs, Item *arg, String *buffer)
Evaluate an argument string and return it in the desired character set.
Definition: item_func.cc:265
String * eval_string_arg(const CHARSET_INFO *to_cs, Item *arg, String *buffer)
Definition: item_func.h:93
void item_func_sleep_init()
Definition: item_func.cc:5910
void mysql_ull_cleanup(THD *thd)
Release all user level locks for this THD.
Definition: item_func.cc:5370
void retrieve_tablespace_statistics(THD *thd, Item **args, bool *null_value)
Retrieve tablespace statistics from SE.
Definition: item_func.cc:9706
bool volatile mqh_used
Definition: mysqld.cc:1306
Item * get_system_variable(Parse_context *pc, enum_var_type scope, const LEX_CSTRING &prefix, const LEX_CSTRING &suffix, bool unsafe_for_replication)
Create new Item_func_get_system_var object.
Definition: item_func.cc:8067
bool contains_function_of_type(Item *item, Item_func::Functype type)
Checks if "item" contains a function of the specified type.
Definition: item_func.cc:1052
void uuid_short_init()
Definition: item_func.cc:8636
A better implementation of the UNIX ctype(3) library.
MYSQL_STRINGS_EXPORT CHARSET_INFO my_charset_bin
Definition: ctype-bin.cc:500
int64_t my_strntoll(const CHARSET_INFO *cs, const char *str, size_t length, int base, const char **end, int *err)
Definition: m_ctype.h:747
double my_strntod(const CHARSET_INFO *cs, const char *str, size_t length, const char **end, int *err)
Definition: m_ctype.h:759
bool my_charset_same(const CHARSET_INFO *cs1, const CHARSET_INFO *cs2)
Definition: m_ctype.h:514
This file follows Google coding style, except for the name MEM_ROOT (which is kept for historical rea...
This file includes constants used by all storage engines.
my_off_t ha_rows
Definition: my_base.h:1141
Header for compiler-dependent features.
#define SUPPRESS_UBSAN
Definition: my_compiler.h:123
#define DBUG_TRACE
Definition: my_dbug.h:146
int str2my_decimal(uint mask, const char *from, size_t length, const CHARSET_INFO *charset, my_decimal *decimal_value)
Definition: my_decimal.cc:258
It is interface module to fixed precision decimals library.
int double2my_decimal(uint mask, double val, my_decimal *d)
Definition: my_decimal.h:354
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
#define MYF(v)
Definition: my_inttypes.h:97
void my_free(void *ptr)
Frees the memory pointed by the ptr.
Definition: my_memory.cc:81
Some macros for dealing with pointer arithmetic, e.g., aligning of buffers to a given size.
#define ALIGN_SIZE(A)
Definition: my_pointer_arithmetic.h:36
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
#define MAX_BIGINT_WIDTH
Max width for a LONGLONG.
Definition: mysql_com.h:902
Time declarations shared between the server and client API: you should not add anything to this heade...
thread_local MEM_ROOT ** THR_MALLOC
Definition: mysqld.cc:1559
static bool replace
Definition: mysqlimport.cc:70
std::string str(const mysqlrouter::ConfigGenerator::Options::Endpoint &ep)
Definition: config_generator.cc:1081
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
std::string join(Container cont, const std::string &delim)
join elements of an container into a string separated by a delimiter.
Definition: string.h:151
mutable_buffer buffer(void *p, size_t n) noexcept
Definition: buffer.h:418
Cursor end()
A past-the-end Cursor.
Definition: rules_table_service.cc:192
const char * db_name
Definition: rules_table_service.cc:55
std::map< Key, Value, Compare, ut::allocator< std::pair< const Key, Value > > > map
Specialization of map which uses ut_allocator.
Definition: ut0new.h:2893
std::list< T, ut::allocator< T > > list
Specialization of list which uses ut_allocator.
Definition: ut0new.h:2879
required string type
Definition: replication_group_member_actions.proto:34
"public" interface to sys_var - server configuration variables.
enum_var_type
Definition: set_var.h:92
#define HA_CAN_FULLTEXT_EXT
Definition: handler.h:424
File containing constants that can be used throughout the server.
constexpr const table_map RAND_TABLE_BIT
Definition: sql_const.h:112
enum_walk
Enumeration for {Item,Query_block[_UNIT],Table_function}walk.
Definition: sql_const.h:288
bool(Item::*)(unsigned char *) Item_processor
Processor type for {Item,Query_block[_UNIT],Table_function}walk.
Definition: sql_const.h:306
constexpr const table_map INNER_TABLE_BIT
Definition: sql_const.h:110
Our own string classes, used pervasively throughout the executor.
case opt name
Definition: sslopt-case.h:29
Definition: m_ctype.h:421
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
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
Definition: ft_global.h:77
Definition: ft_global.h:72
struct _ft_vft * please
Definition: ft_global.h:73
The MEM_ROOT is a simple arena, where allocations are carved out of larger blocks.
Definition: my_alloc.h:83
T * ArrayAlloc(size_t num, Args... args)
Allocate 'num' objects of type T, and initialize them to a default value that is created by passing t...
Definition: my_alloc.h:180
Definition: mysql_lex_string.h:40
Definition: mysql_lex_string.h:35
Definition: mysql_time.h:82
Definition: my_bitmap.h:43
Bison "location" class.
Definition: parse_location.h:43
Instances of Name_resolution_context store the information necessary for name resolution of Items and...
Definition: item.h:415
Environment data for the contextualization phase.
Definition: parse_tree_node_base.h:420
handler * file
Definition: table.h:1409
Definition: completion_hash.h:35
void(* close_search)(FT_INFO *)
Definition: ft_global.h:51
Definition: mysql_com.h:1109
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
#define array_elements(A)
Definition: validate_password_imp.cc:48