1#ifndef ITEM_FUNC_INCLUDED
2#define ITEM_FUNC_INCLUDED
51#include "mysqld_error.h"
119 if (
args ==
nullptr) {
529 bool eq(
const Item *item)
const override;
582 uint nitems,
int item_sep = 1) {
592 uint nitems,
int item_sep = 1) {
608 replace->stack.push_front(
this);
613 pointer_cast<Replace_equal *>(arg)->stack.pop();
801 const MY_BITMAP *fields_to_ignore)
const;
818 pointer_cast<Check_function_as_value_generator_parameters *>(
1090 const char *
func_name()
const override {
return "connection_id"; }
1096 pointer_cast<Check_function_as_value_generator_parameters *>(
1109 const char *
func_name()
const override {
return "cast_as_signed"; }
1122 const char *
func_name()
const override {
return "cast_as_unsigned"; }
1156 const char *
func_name()
const override {
return "cast_as_decimal"; }
1168 obj->
add_alias(
"is_double", create_dom_ptr<Json_boolean>(
1192 const char *
func_name()
const override {
return "cast_as_real"; }
1476 const char *
func_name()
const override {
return "ceiling"; }
1510 return truncate ?
"truncate" :
"round";
1551 pointer_cast<Check_function_as_value_generator_parameters *>(
1588 const char *
func_name()
const override {
return "degrees"; }
1596 const char *
func_name()
const override {
return "radians"; }
1689 const char *
func_name()
const override {
return "greatest"; }
1738 const char *
func_name()
const override {
return "rollup_group_item"; }
1803 const char *
func_name()
const override {
return "vector_dim"; }
1827 const char *
func_name()
const override {
return "bit_length"; }
1837 const char *
func_name()
const override {
return "char_length"; }
1850 const char *
func_name()
const override {
return "coercibility"; }
1889 return "validate_password_strength";
1946 const char *
func_name()
const override {
return "find_in_set"; }
2022 template <
class Char_func,
class Int_func>
2024 template <
class Int_func>
2041 return eval_str_op(
str, std::bit_or<char>(), std::bit_or<ulonglong>());
2054 return eval_str_op(
str, std::bit_and<char>(), std::bit_and<ulonglong>());
2067 return eval_str_op(
str, std::bit_xor<char>(), std::bit_xor<ulonglong>());
2075 const char *
func_name()
const override {
return "bit_count"; }
2092 template <
bool to_left>
2094 template <
bool to_left>
2153 const char *
func_name()
const override {
return "last_insert_id"; }
2166 pointer_cast<Check_function_as_value_generator_parameters *>(
2187 const char *
func_name()
const override {
return "benchmark"; }
2199 pointer_cast<Check_function_as_value_generator_parameters *>(
2228 pointer_cast<Check_function_as_value_generator_parameters *>(
2267 pointer_cast<Check_function_as_value_generator_parameters *>(
2364 const char *end_not_used;
2368 &end_not_used, &err_not_used)
2376 nullptr, &err_not_used)
2381 if (!res)
return nullptr;
2410 const char *
func_name()
const override {
return "get_lock"; }
2424 pointer_cast<Check_function_as_value_generator_parameters *>(
2441 const char *
func_name()
const override {
return "release_lock"; }
2454 pointer_cast<Check_function_as_value_generator_parameters *>(
2469 const char *
func_name()
const override {
return "release_all_locks"; }
2480 pointer_cast<Check_function_as_value_generator_parameters *>(
2503 const char *
func_name()
const override {
return "source_pos_wait"; }
2517 pointer_cast<Check_function_as_value_generator_parameters *>(
2545 const char *
func_name()
const override {
return "can_access_database"; }
2557 const char *
func_name()
const override {
return "can_access_table"; }
2569 const char *
func_name()
const override {
return "can_access_user"; }
2581 const char *
func_name()
const override {
return "can_access_trigger"; }
2594 const char *
func_name()
const override {
return "can_access_routine"; }
2606 const char *
func_name()
const override {
return "can_access_event"; }
2618 const char *
func_name()
const override {
return "can_access_resource_group"; }
2631 const char *
func_name()
const override {
return "can_access_view"; }
2643 const char *
func_name()
const override {
return "can_access_column"; }
2659 const char *
func_name()
const override {
return "is_visible_dd_object"; }
2673 const char *
func_name()
const override {
return "internal_table_rows"; }
2688 const char *
func_name()
const override {
return "internal_avg_row_length"; }
2703 const char *
func_name()
const override {
return "internal_data_length"; }
2718 const char *
func_name()
const override {
return "internal_max_data_length"; }
2733 const char *
func_name()
const override {
return "internal_index_length"; }
2748 const char *
func_name()
const override {
return "internal_data_free"; }
2763 const char *
func_name()
const override {
return "internal_auto_increment"; }
2778 const char *
func_name()
const override {
return "internal_checksum"; }
2791 const char *
func_name()
const override {
return "internal_keys_disabled"; }
2807 return "internal_index_column_cardinality";
2822 const char *
func_name()
const override {
return "internal_dd_char_length"; }
2838 return "internal_get_view_warning_or_error";
2859 return "get_dd_index_sub_part_length";
2870 const char *
func_name()
const override {
return "internal_tablespace_id"; }
2889 return "internal_tablespace_logfile_group_number";
2909 return "internal_tablespace_free_extents";
2929 return "internal_tablespace_total_extents";
2949 return "internal_tablespace_extent_size";
2969 return "internal_tablespace_initial_size";
2989 return "internal_tablespace_maximum_size";
3009 return "internal_tablespace_autoextend_size";
3029 return "internal_tablespace_version";
3049 return "internal_tablespace_data_free";
3083 pointer_cast<Check_function_as_value_generator_parameters *>(
3086 ? ER_CHECK_CONSTRAINT_VARIABLES
3087 : ER_DEFAULT_VAL_GENERATED_VARIABLES;
3287 double val_real(
bool *null_value)
const;
3336 bool check(
bool use_result_field);
3346 const char *
func_name()
const override {
return "set_user_var"; }
3349 bool can_use_result_field);
3360 bool no_conversions)
override {
3395 const char *
func_name()
const override {
return "get_user_var"; }
3451#define GET_SYS_VAR_CACHE_LONG 1
3452#define GET_SYS_VAR_CACHE_DOUBLE 2
3453#define GET_SYS_VAR_CACHE_STRING 4
3498 template <
typename T>
3525 const char *
func_name()
const override {
return "get_system_var"; }
3621 pointer_cast<Check_function_as_value_generator_parameters *>(
3679 double rows_in_table)
override;
3802 assert(tr && tr->
file);
3840 const char *
func_name()
const override {
return "is_free_lock"; }
3853 pointer_cast<Check_function_as_value_generator_parameters *>(
3870 const char *
func_name()
const override {
return "is_used_lock"; }
3883 pointer_cast<Check_function_as_value_generator_parameters *>(
3899 const char *
func_name()
const override {
return "row_count"; }
3906 pointer_cast<Check_function_as_value_generator_parameters *>(
3945 const LEX_STRING &fn_name,
bool use_explicit_name,
3977 pointer_cast<Item_ident::Change_context *>(arg)->m_context;
3990 pointer_cast<Check_function_as_value_generator_parameters *>(
4009 const char *
func_name()
const override {
return "found_rows"; }
4016 pointer_cast<Check_function_as_value_generator_parameters *>(
4032 const char *
func_name()
const override {
return "uuid_short"; }
4041 pointer_cast<Check_function_as_value_generator_parameters *>(
4073 return "internal_is_mandatory_role";
4088 return "internal_use_terminology_previous";
4107 const char *
func_name()
const override {
return "internal_is_enabled_role"; }
4139 bool unsafe_for_replication);
4143 bool unsafe_for_replication) {
4145 unsafe_for_replication);
4154 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:3458
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:3466
~Audit_global_variable_get_event()
Definition: item_func.cc:7213
bool m_audit_event
Definition: item_func.h:3485
Item_func_get_system_var * m_item
Definition: item_func.h:3469
uchar m_val_type
Definition: item_func.h:3478
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:4137
uint get_flags() const
Get Ft_hints flags.
Definition: handler.h:4200
enum ft_operation get_op_type() const
Get Ft_hints operation type.
Definition: handler.h:4193
void set_hint_op(enum ft_operation type, double value)
Set comparison operation type and and value for master MATCH function.
Definition: handler.h:4155
Definition: item_func.h:1343
Item_dec_func(const POS &pos, Item *a)
Definition: item_func.h:1346
Item_dec_func(const POS &pos, Item *a, Item *b)
Definition: item_func.h:1348
Item_dec_func(Item *a)
Definition: item_func.h:1345
bool resolve_type(THD *thd) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_func.cc:2824
Definition: item_func.h:1328
enum Functype functype() const override
Definition: item_func.h:1338
double real_op() override
Performs the operation that this functions implements when the result type is REAL.
Definition: item_func.cc:2793
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:1337
my_decimal * decimal_op(my_decimal *) override
Performs the operation that this functions implements when the result type is DECIMAL.
Definition: item_func.cc:2808
const char * func_name() const override
Definition: item_func.h:1334
bool check_partition_func_processor(uchar *) override
Check if a partition function is allowed.
Definition: item_func.h:1336
longlong int_op() override
Performs the operation that this functions implements when the result type is INT.
Definition: item_func.cc:2799
Item_func_abs(const POS &pos, Item *a)
Definition: item_func.h:1330
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_func.cc:2818
Definition: item_func.h:1408
const char * func_name() const override
Definition: item_func.h:1412
double val_real() override
Definition: item_func.cc:2922
enum Functype functype() const override
Definition: item_func.h:1413
Item_func_acos(const POS &pos, Item *a)
Definition: item_func.h:1410
Definition: item_func.h:1198
Item_func_additive_op(const POS &pos, Item *a, Item *b)
Definition: item_func.h:1201
Item_func_additive_op(Item *a, Item *b)
Definition: item_func.h:1200
void result_precision() override
Set precision of results for additive operations (+ and -)
Definition: item_func.cc:2205
bool check_partition_func_processor(uchar *) override
Check if a partition function is allowed.
Definition: item_func.h:1205
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:1206
Definition: item_func.h:1910
const char * func_name() const override
Definition: item_func.h:1916
longlong val_int() override
Definition: item_func.cc:4388
String value
Definition: item_func.h:1911
bool resolve_type(THD *thd) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_func.h:1917
Item_func_ascii(const POS &pos, Item *a)
Definition: item_func.h:1914
Definition: item_func.h:1416
double val_real() override
Definition: item_func.cc:2932
enum Functype functype() const override
Definition: item_func.h:1421
const char * func_name() const override
Definition: item_func.h:1420
Item_func_asin(const POS &pos, Item *a)
Definition: item_func.h:1418
Definition: item_func.h:1424
enum Functype functype() const override
Definition: item_func.h:1430
double val_real() override
Definition: item_func.cc:2940
Item_func_atan(const POS &pos, Item *a, Item *b)
Definition: item_func.h:1427
Item_func_atan(const POS &pos, Item *a)
Definition: item_func.h:1426
const char * func_name() const override
Definition: item_func.h:1429
Definition: item_func.h:2173
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:2188
table_map get_initial_pseudo_tables() const override
Ensure that "benchmark()" is never optimized away.
Definition: item_func.h:2181
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:2197
Item_int_func super
Definition: item_func.h:2174
Item_func_benchmark(const POS &pos, Item *count_expr, Item *expr)
Definition: item_func.h:2177
longlong val_int() override
Definition: item_func.cc:5828
const char * func_name() const override
Definition: item_func.h:2187
Definition: item_func.h:2045
longlong int_op() override
Performs the operation on integers to produce a result of type INT_RESULT.
Definition: item_func.h:2052
const char * func_name() const override
Definition: item_func.h:2049
Item_func_bit_and(const POS &pos, Item *a, Item *b)
Definition: item_func.h:2047
String * str_op(String *str) override
Performs the operation on binary strings to produce a result of type STRING_RESULT.
Definition: item_func.h:2053
Definition: item_func.h:2071
bool resolve_type(THD *thd) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_func.h:2076
longlong val_int() override
Definition: item_func.cc:4528
const char * func_name() const override
Definition: item_func.h:2075
Item_func_bit_count(const POS &pos, Item *a)
Definition: item_func.h:2073
Definition: item_func.h:1820
const char * func_name() const override
Definition: item_func.h:1827
longlong val_int() override
Definition: item_func.h:1823
Item_func_bit_length(const POS &pos, Item *a)
Definition: item_func.h:1822
Definition: item_func.h:2124
void print(const THD *thd, String *str, enum_query_type query_type) const override
This method is used for to:
Definition: item_func.h:2133
Item_func_bit_neg(const POS &pos, Item *a)
Definition: item_func.h:2131
longlong int_op() override
Performs the operation on integers to produce a result of type INT_RESULT.
Definition: item_func.cc:3174
bool binary_result_requires_binary_second_arg() const override
Definition: item_func.h:2126
String * str_op(String *str) override
Performs the operation on binary strings to produce a result of type STRING_RESULT.
Definition: item_func.cc:3182
const char * func_name() const override
Definition: item_func.h:2132
Definition: item_func.h:2032
const char * func_name() const override
Definition: item_func.h:2036
String * str_op(String *str) override
Performs the operation on binary strings to produce a result of type STRING_RESULT.
Definition: item_func.h:2040
longlong int_op() override
Performs the operation on integers to produce a result of type INT_RESULT.
Definition: item_func.h:2039
Item_func_bit_or(const POS &pos, Item *a, Item *b)
Definition: item_func.h:2034
Base class for all the bit functions that work with two binary arguments: '&', '|',...
Definition: item_func.h:2017
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:3240
bool binary_result_requires_binary_second_arg() const override
Definition: item_func.h:2019
longlong eval_int_op(Int_func int_func)
Template function used to evaluate the bitwise operation over int arguments.
Definition: item_func.cc:3214
Item_func_bit_two_param(const POS &pos, Item *a, Item *b)
Definition: item_func.h:2028
Definition: item_func.h:2058
const char * func_name() const override
Definition: item_func.h:2062
Item_func_bit_xor(const POS &pos, Item *a, Item *b)
Definition: item_func.h:2060
longlong int_op() override
Performs the operation on integers to produce a result of type INT_RESULT.
Definition: item_func.h:2065
String * str_op(String *str) override
Performs the operation on binary strings to produce a result of type STRING_RESULT.
Definition: item_func.h:2066
Definition: item_func.h:1955
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:1979
String tmp_value
Buffer storing the determined value.
Definition: item_func.h:1960
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_func.cc:2986
virtual bool binary_result_requires_binary_second_arg() const =0
my_decimal * val_decimal(my_decimal *decimal_value) override
Definition: item_func.cc:3047
double val_real() override
Definition: item_func.cc:3031
String * val_str(String *str) override
Definition: item_func.cc:3055
Item_result hybrid_type
Stores the Item's result type. Can only be INT_RESULT or STRING_RESULT.
Definition: item_func.h:1958
bool get_date(MYSQL_TIME *ltime, my_time_flags_t fuzzydate) override
Definition: item_func.h:1983
longlong val_int() override
Definition: item_func.cc:3015
Item_func_bit(const POS &pos, Item *a)
Definition: item_func.h:1969
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:1972
Item_func_bit(const POS &pos, Item *a, Item *b)
Definition: item_func.h:1968
bool get_time(MYSQL_TIME *ltime) override
Definition: item_func.h:1989
Definition: item_func.h:2638
const char * func_name() const override
Definition: item_func.h:2643
longlong val_int() override
INFORMATION_SCHEMA picks metadata from DD using system views.
Definition: item_func.cc:9126
Item_func_can_access_column(const POS &pos, Item *a, Item *b, Item *c)
Definition: item_func.h:2640
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_func.h:2644
Internal functions used by INFORMATION_SCHEMA implementation to check if user have access to given da...
Definition: item_func.h:2540
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_func.h:2546
Item_func_can_access_database(const POS &pos, Item *a)
Definition: item_func.h:2542
longlong val_int() override
INFORMATION_SCHEMA picks metadata from DD using system views.
Definition: item_func.cc:8718
const char * func_name() const override
Definition: item_func.h:2545
Definition: item_func.h:2602
Item_func_can_access_event(const POS &pos, Item *a)
Definition: item_func.h:2604
const char * func_name() const override
Definition: item_func.h:2606
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_func.h:2607
longlong val_int() override
INFORMATION_SCHEMA picks metadata from DD using system views.
Definition: item_func.cc:9011
Definition: item_func.h:2613
const char * func_name() const override
Definition: item_func.h:2618
Item_func_can_access_resource_group(const POS &pos, Item *a)
Definition: item_func.h:2615
longlong val_int() override
INFORMATION_SCHEMA picks metadata from DD using system views.
Definition: item_func.cc:9063
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_func.h:2619
Definition: item_func.h:2589
Item_func_can_access_routine(const POS &pos, PT_item_list *list)
Definition: item_func.h:2591
const char * func_name() const override
Definition: item_func.h:2594
longlong val_int() override
INFORMATION_SCHEMA picks metadata from DD using system views.
Definition: item_func.cc:8928
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_func.h:2595
Definition: item_func.h:2552
const char * func_name() const override
Definition: item_func.h:2557
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_func.h:2558
Item_func_can_access_table(const POS &pos, Item *a, Item *b)
Definition: item_func.h:2554
longlong val_int() override
INFORMATION_SCHEMA picks metadata from new DD using system views.
Definition: item_func.cc:8842
Definition: item_func.h:2576
Item_func_can_access_trigger(const POS &pos, Item *a, Item *b)
Definition: item_func.h:2578
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_func.h:2582
longlong val_int() override
INFORMATION_SCHEMA picks metadata from new DD using system views.
Definition: item_func.cc:8906
const char * func_name() const override
Definition: item_func.h:2581
Definition: item_func.h:2564
const char * func_name() const override
Definition: item_func.h:2569
Item_func_can_access_user(const POS &pos, Item *a, Item *b)
Definition: item_func.h:2566
longlong val_int() override
INFORMATION_SCHEMA picks metadata from new DD using system views.
Definition: item_func.cc:8865
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_func.h:2570
Definition: item_func.h:2626
longlong val_int() override
INFORMATION_SCHEMA picks metadata from DD using system views.
Definition: item_func.cc:9201
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_func.h:2632
Item_func_can_access_view(const POS &pos, Item *a, Item *b, Item *c, Item *d)
Definition: item_func.h:2628
const char * func_name() const override
Definition: item_func.h:2631
Definition: item_func.h:1472
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:1481
bool check_partition_func_processor(uchar *) override
Check if a partition function is allowed.
Definition: item_func.h:1480
const char * func_name() const override
Definition: item_func.h:1476
enum Functype functype() const override
Definition: item_func.h:1482
double real_op() override
Performs the operation that this functions implements when the result type is REAL.
Definition: item_func.cc:3401
my_decimal * decimal_op(my_decimal *) override
Performs the operation that this functions implements when the result type is DECIMAL.
Definition: item_func.cc:3407
Item_func_ceiling(const POS &pos, Item *a)
Definition: item_func.h:1475
longlong int_op() override
Performs the operation that this functions implements when the result type is INT.
Definition: item_func.cc:3380
Item_func_ceiling(Item *a)
Definition: item_func.h:1474
Definition: item_func.h:1830
Item_func_char_length(Item *a)
Definition: item_func.h:1834
Item_func_char_length(const POS &pos, Item *a)
Definition: item_func.h:1835
bool resolve_type(THD *thd) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_func.h:1838
longlong val_int() override
Definition: item_func.cc:4240
const char * func_name() const override
Definition: item_func.h:1837
String value
Definition: item_func.h:1831
Definition: item_func.h:1844
const char * func_name() const override
Definition: item_func.h:1850
bool resolve_type(THD *thd) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_func.h:1851
longlong val_int() override
Definition: item_func.cc:4251
Item_func_coercibility(const POS &pos, Item *a)
Definition: item_func.h:1846
Definition: item_func.h:1080
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:1086
Item_int_func super
Definition: item_func.h:1081
const char * func_name() const override
Definition: item_func.h:1090
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:1094
Item_func_connection_id(const POS &pos)
Definition: item_func.h:1084
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:1433
enum Functype functype() const override
Definition: item_func.h:1438
const char * func_name() const override
Definition: item_func.h:1437
double val_real() override
Definition: item_func.cc:2952
Item_func_cos(const POS &pos, Item *a)
Definition: item_func.h:1435
Definition: item_func.h:1457
const char * func_name() const override
Definition: item_func.h:1461
enum Functype functype() const override
Definition: item_func.h:1462
double val_real() override
Definition: item_func.cc:2973
Item_func_cot(const POS &pos, Item *a)
Definition: item_func.h:1459
Definition: item_func.h:1584
Item_func_degrees(const POS &pos, Item *a)
Definition: item_func.h:1586
const char * func_name() const override
Definition: item_func.h:1588
enum Functype functype() const override
Definition: item_func.h:1589
Definition: item_func.h:1257
Item_func_div_base(const POS &pos, Item *a, Item *b)
Definition: item_func.h:1259
Item_func_div_base(Item *a, Item *b)
Definition: item_func.h:1261
uint m_prec_increment
Definition: item_func.h:1268
my_decimal * decimal_op(my_decimal *) override
Performs the operation that this functions implements when the result type is DECIMAL.
Definition: item_func.cc:2461
double real_op() override
Performs the operation that this functions implements when the result type is REAL.
Definition: item_func.cc:2446
longlong int_op() override
Performs the operation that this functions implements when the result type is INT.
Definition: item_func.cc:2551
enum Functype functype() const override
Definition: item_func.h:1265
Definition: item_func.h:1280
bool resolve_type(THD *thd) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_func.cc:2613
void set_numeric_type() override
Check arguments to determine the data type for a numeric function of two arguments.
Definition: item_func.cc:2624
bool check_partition_func_processor(uchar *) override
Check if a partition function is allowed.
Definition: item_func.h:1292
Item_func_div_int(const POS &pos, Item *a, Item *b)
Definition: item_func.h:1283
enum_field_types default_data_type() const override
Get the default data (output) type for the specific item.
Definition: item_func.h:1286
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:1293
void result_precision() override
Definition: item_func.cc:2497
const char * func_name() const override
Definition: item_func.h:1285
Item_func_div_int(Item *a, Item *b)
Definition: item_func.h:1282
Definition: item_func.h:1271
void result_precision() override
Definition: item_func.cc:2480
Item_func_div(const POS &pos, Item *a, Item *b)
Definition: item_func.h:1273
const char * func_name() const override
Definition: item_func.h:1275
bool resolve_type(THD *thd) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_func.cc:2517
Definition: item_func.h:1352
double val_real() override
Definition: item_func.cc:2895
enum Functype functype() const override
Definition: item_func.h:1357
const char * func_name() const override
Definition: item_func.h:1356
Item_func_exp(const POS &pos, Item *a)
Definition: item_func.h:1354
Definition: item_func.h:1898
String value
Definition: item_func.h:1899
bool resolve_type(THD *thd) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_func.cc:4373
const char * func_name() const override
Definition: item_func.h:1906
String tmp
Definition: item_func.h:1899
Item_func_field(const POS &pos, PT_item_list *opt_list)
Definition: item_func.h:1903
longlong val_int() override
Definition: item_func.cc:4330
Item_result cmp_type
Definition: item_func.h:1900
Definition: item_func.h:1932
const CHARSET_INFO * compare_collation() const override
Definition: item_func.h:1948
const char * func_name() const override
Definition: item_func.h:1946
Item_func_find_in_set(const POS &pos, Item *a, Item *b)
Definition: item_func.h:1943
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_func.cc:4422
longlong val_int() override
Definition: item_func.cc:4450
String value2
Definition: item_func.h:1933
DTCollation cmp_collation
Definition: item_func.h:1940
uint m_enum_value
Definition: item_func.h:1939
String value
Definition: item_func.h:1933
Definition: item_func.h:1485
my_decimal * decimal_op(my_decimal *) override
Performs the operation that this functions implements when the result type is DECIMAL.
Definition: item_func.cc:3443
const char * func_name() const override
Definition: item_func.h:1489
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:1494
double real_op() override
Performs the operation that this functions implements when the result type is REAL.
Definition: item_func.cc:3437
bool check_partition_func_processor(uchar *) override
Check if a partition function is allowed.
Definition: item_func.h:1493
Item_func_floor(const POS &pos, Item *a)
Definition: item_func.h:1488
Item_func_floor(Item *a)
Definition: item_func.h:1487
longlong int_op() override
Performs the operation that this functions implements when the result type is INT.
Definition: item_func.cc:3416
enum Functype functype() const override
Definition: item_func.h:1495
Definition: item_func.h:4001
Item_func_found_rows(const POS &pos)
Definition: item_func.h:4005
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:4014
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:4010
Item_int_func super
Definition: item_func.h:4002
const char * func_name() const override
Definition: item_func.h:4009
Definition: item_func.h:2848
const char * func_name() const override
Definition: item_func.h:2858
longlong val_int() override
INFORMATION_SCHEMA picks metadata from DD using system views.
Definition: item_func.cc:10044
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_func.h:2853
Item_func_get_dd_index_sub_part_length(const POS &pos, PT_item_list *list)
Definition: item_func.h:2850
Definition: item_func.h:2399
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:2422
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:2411
bool resolve_type(THD *thd) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_func.h:2414
Item_int_func super
Definition: item_func.h:2400
Item_func_get_lock(const POS &pos, Item *a, Item *b)
Definition: item_func.h:2405
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:2410
String value
Definition: item_func.h:2402
bool is_non_const_over_literals(uchar *) override
Definition: item_func.h:2421
longlong val_int() override
Get a user level lock.
Definition: item_func.cc:5520
Definition: item_func.h:3488
const enum_var_type var_scope
Definition: item_func.h:3489
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:3507
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:3490
enum Functype functype() const override
Definition: item_func.h:3506
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:3492
const char * func_name() const override
Definition: item_func.h:3525
longlong val_int() override
Definition: item_func.cc:7263
const System_variable_tracker var_tracker
Definition: item_func.h:3496
query_id_t used_query_id
Definition: item_func.h:3494
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:3527
bool cached_null_value
Definition: item_func.h:3493
uchar cache_present
Definition: item_func.h:3495
double cached_dval
Definition: item_func.h:3491
enum Item_result result_type() const override
Definition: item_func.h:3514
bool is_non_const_over_literals(uchar *) override
Definition: item_func.h:3513
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:3521
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:3366
Name_string name
Definition: item_func.h:3371
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:3373
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:3378
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:3403
user_var_entry * var_entry
Definition: item_func.h:3367
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:3395
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:3368
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:3387
Item_func_get_user_var(const POS &pos, Name_string a)
Definition: item_func.h:3375
bool is_non_const_over_literals(uchar *) override
Definition: item_func.h:3396
Definition: item_func.h:1875
Item_func_instr(const POS &pos, Item *a, Item *b)
Definition: item_func.h:1877
const char * func_name() const override
Definition: item_func.h:1880
Definition: item_func.h:1465
bool resolve_type_inner(THD *thd) override
Resolve type of function after all arguments have had their data types resolved.
Definition: item_func.cc:3318
Item_func_int_val(const POS &pos, Item *a)
Definition: item_func.h:1468
Item_func_int_val(Item *a)
Definition: item_func.h:1467
Definition: item_func.h:2757
longlong val_int() override
Definition: item_func.cc:9551
Item_func_internal_auto_increment(const POS &pos, PT_item_list *list)
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:2764
const char * func_name() const override
Definition: item_func.h:2763
enum Functype functype() const override
Definition: item_func.h:2761
Definition: item_func.h:2682
const char * func_name() const override
Definition: item_func.h:2688
Item_func_internal_avg_row_length(const POS &pos, PT_item_list *list)
Definition: item_func.h:2684
longlong val_int() override
Definition: item_func.cc:9502
enum Functype functype() const override
Definition: item_func.h:2686
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_func.h:2689
Definition: item_func.h:2772
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_func.h:2779
const char * func_name() const override
Definition: item_func.h:2778
Item_func_internal_checksum(const POS &pos, PT_item_list *list)
Definition: item_func.h:2774
longlong val_int() override
Definition: item_func.cc:9563
enum Functype functype() const override
Definition: item_func.h:2776
Definition: item_func.h:2742
enum Functype functype() const override
Definition: item_func.h:2746
const char * func_name() const override
Definition: item_func.h:2748
Item_func_internal_data_free(const POS &pos, PT_item_list *list)
Definition: item_func.h:2744
longlong val_int() override
Definition: item_func.cc:9539
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_func.h:2749
Definition: item_func.h:2697
longlong val_int() override
Definition: item_func.cc:9512
const char * func_name() const override
Definition: item_func.h:2703
Item_func_internal_data_length(const POS &pos, PT_item_list *list)
Definition: item_func.h:2699
enum Functype functype() const override
Definition: item_func.h:2701
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_func.h:2704
Definition: item_func.h:2816
longlong val_int() override
Definition: item_func.cc:9905
Item_func_internal_dd_char_length(const POS &pos, Item *a, Item *b, Item *c, Item *d)
Definition: item_func.h:2818
const char * func_name() const override
Definition: item_func.h:2822
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_func.h:2823
Definition: item_func.h:2831
Item_func_internal_get_view_warning_or_error(const POS &pos, PT_item_list *list)
Definition: item_func.h:2833
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_func.h:2840
longlong val_int() override
Definition: item_func.cc:9984
const char * func_name() const override
Definition: item_func.h:2837
Definition: item_func.h:2799
longlong val_int() override
INFORMATION_SCHEMA picks metadata from DD using system views.
Definition: item_func.cc:9638
Item_func_internal_index_column_cardinality(const POS &pos, PT_item_list *list)
Definition: item_func.h:2801
enum Functype functype() const override
Definition: item_func.h:2804
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_func.h:2809
const char * func_name() const override
Definition: item_func.h:2806
Definition: item_func.h:2727
Item_func_internal_index_length(const POS &pos, PT_item_list *list)
Definition: item_func.h:2729
longlong val_int() override
Definition: item_func.cc:9530
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_func.h:2734
enum Functype functype() const override
Definition: item_func.h:2731
const char * func_name() const override
Definition: item_func.h:2733
Internal function used by INFORMATION_SCHEMA implementation to check if a role is enabled.
Definition: item_func.h:4102
longlong val_int() override
Internal function used by INFORMATION_SCHEMA implementation to check if a role enabled.
Definition: item_func.cc:10164
enum Functype functype() const override
Definition: item_func.h:4108
Item_func_internal_is_enabled_role(const POS &pos, Item *a, Item *b)
Definition: item_func.h:4104
const char * func_name() const override
Definition: item_func.h:4107
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_func.h:4109
Internal function used by INFORMATION_SCHEMA implementation to check if a role is a mandatory role.
Definition: item_func.h:4067
longlong val_int() override
Internal function used by INFORMATION_SCHEMA implementation to check if a role is a mandatory role.
Definition: item_func.cc:10101
Item_func_internal_is_mandatory_role(const POS &pos, Item *a, Item *b)
Definition: item_func.h:4069
const char * func_name() const override
Definition: item_func.h:4072
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_func.h:4076
enum Functype functype() const override
Definition: item_func.h:4075
Definition: item_func.h:2786
Item_func_internal_keys_disabled(const POS &pos, Item *a)
Definition: item_func.h:2788
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_func.h:2792
longlong val_int() override
INFORMATION_SCHEMA picks metadata from DD using system views.
Definition: item_func.cc:9590
const char * func_name() const override
Definition: item_func.h:2791
Definition: item_func.h:2712
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_func.h:2719
const char * func_name() const override
Definition: item_func.h:2718
Item_func_internal_max_data_length(const POS &pos, PT_item_list *list)
Definition: item_func.h:2714
enum Functype functype() const override
Definition: item_func.h:2716
longlong val_int() override
Definition: item_func.cc:9521
Definition: item_func.h:2667
enum Functype functype() const override
Definition: item_func.h:2671
longlong val_int() override
Definition: item_func.cc:9490
Item_func_internal_table_rows(const POS &pos, PT_item_list *list)
Definition: item_func.h:2669
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_func.h:2674
const char * func_name() const override
Definition: item_func.h:2673
Definition: item_func.h:2999
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_func.h:3012
Item_func_internal_tablespace_autoextend_size(const POS &pos, Item *a, Item *b, Item *c, Item *d)
Definition: item_func.h:3001
longlong val_int() override
Definition: item_func.cc:9848
enum Functype functype() const override
Definition: item_func.h:3005
const char * func_name() const override
Definition: item_func.h:3008
Definition: item_func.h:3039
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_func.h:3052
Item_func_internal_tablespace_data_free(const POS &pos, Item *a, Item *b, Item *c, Item *d)
Definition: item_func.h:3041
longlong val_int() override
Definition: item_func.cc:9881
const char * func_name() const override
Definition: item_func.h:3048
enum Functype functype() const override
Definition: item_func.h:3045
Definition: item_func.h:2939
Item_func_internal_tablespace_extent_size(const POS &pos, Item *a, Item *b, Item *c, Item *d)
Definition: item_func.h:2941
enum Functype functype() const override
Definition: item_func.h:2945
longlong val_int() override
Definition: item_func.cc:9801
const char * func_name() const override
Definition: item_func.h:2948
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_func.h:2952
Definition: item_func.h:2899
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_func.h:2912
enum Functype functype() const override
Definition: item_func.h:2905
const char * func_name() const override
Definition: item_func.h:2908
Item_func_internal_tablespace_free_extents(const POS &pos, Item *a, Item *b, Item *c, Item *d)
Definition: item_func.h:2901
longlong val_int() override
Definition: item_func.cc:9771
Definition: item_func.h:2863
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_func.h:2871
enum Functype functype() const override
Definition: item_func.h:2868
Item_func_internal_tablespace_id(const POS &pos, Item *a, Item *b, Item *c, Item *d)
Definition: item_func.h:2865
longlong val_int() override
Definition: item_func.cc:9738
const char * func_name() const override
Definition: item_func.h:2870
Definition: item_func.h:2959
longlong val_int() override
Definition: item_func.cc:9816
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_func.h:2972
const char * func_name() const override
Definition: item_func.h:2968
Item_func_internal_tablespace_initial_size(const POS &pos, Item *a, Item *b, Item *c, Item *d)
Definition: item_func.h:2961
enum Functype functype() const override
Definition: item_func.h:2965
Definition: item_func.h:2879
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_func.h:2892
enum Functype functype() const override
Definition: item_func.h:2885
longlong val_int() override
Definition: item_func.cc:9753
Item_func_internal_tablespace_logfile_group_number(const POS &pos, Item *a, Item *b, Item *c, Item *d)
Definition: item_func.h:2881
const char * func_name() const override
Definition: item_func.h:2888
Definition: item_func.h:2979
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_func.h:2992
Item_func_internal_tablespace_maximum_size(const POS &pos, Item *a, Item *b, Item *c, Item *d)
Definition: item_func.h:2981
const char * func_name() const override
Definition: item_func.h:2988
longlong val_int() override
Definition: item_func.cc:9831
enum Functype functype() const override
Definition: item_func.h:2985
Definition: item_func.h:2919
longlong val_int() override
Definition: item_func.cc:9786
enum Functype functype() const override
Definition: item_func.h:2925
Item_func_internal_tablespace_total_extents(const POS &pos, Item *a, Item *b, Item *c, Item *d)
Definition: item_func.h:2921
const char * func_name() const override
Definition: item_func.h:2928
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_func.h:2932
Definition: item_func.h:3019
Item_func_internal_tablespace_version(const POS &pos, Item *a, Item *b, Item *c, Item *d)
Definition: item_func.h:3021
longlong val_int() override
Definition: item_func.cc:9864
const char * func_name() const override
Definition: item_func.h:3028
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_func.h:3032
enum Functype functype() const override
Definition: item_func.h:3025
Definition: item_func.h:4082
const char * func_name() const override
Definition: item_func.h:4087
longlong val_int() override
Definition: item_func.cc:10135
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_func.h:4091
Item_func_internal_use_terminology_previous(const POS &pos)
Definition: item_func.h:4084
enum Functype functype() const override
Definition: item_func.h:4090
Definition: item_func.h:3830
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:3836
const char * func_name() const override
Definition: item_func.h:3840
Item_int_func super
Definition: item_func.h:3831
bool resolve_type(THD *thd) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_func.h:3844
bool is_non_const_over_literals(uchar *) override
Definition: item_func.h:3850
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:3841
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:3851
String value
Definition: item_func.h:3833
Definition: item_func.h:3860
bool resolve_type(THD *thd) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_func.h:3874
Item_func_is_used_lock(const POS &pos, Item *a)
Definition: item_func.h:3866
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:3881
Item_int_func super
Definition: item_func.h:3861
String value
Definition: item_func.h:3863
const char * func_name() const override
Definition: item_func.h:3870
longlong val_int() override
Check if user level lock is used and return connection id of owner.
Definition: item_func.cc:5766
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:3871
bool is_non_const_over_literals(uchar *) override
Definition: item_func.h:3880
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:2650
Item_func_is_visible_dd_object(const POS &pos, Item *a, Item *b)
Definition: item_func.h:2654
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_func.h:2660
Item_func_is_visible_dd_object(const POS &pos, Item *a, Item *b, Item *c)
Definition: item_func.h:2656
const char * func_name() const override
Definition: item_func.h:2659
longlong val_int() override
Skip hidden tables, columns, indexes and index elements.
Definition: item_func.cc:9334
Item_func_is_visible_dd_object(const POS &pos, Item *a)
Definition: item_func.h:2652
Definition: item_func.h:2143
bool resolve_type(THD *thd) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_func.h:2159
const char * func_name() const override
Definition: item_func.h:2153
Item_func_last_insert_id(const POS &pos, Item *a)
Definition: item_func.h:2149
Item_func_last_insert_id()
Definition: item_func.h:2147
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:2155
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:2164
Item_int_func super
Definition: item_func.h:2144
Item_func_last_insert_id(const POS &pos)
Definition: item_func.h:2148
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:1783
Item_func_length(const POS &pos, Item *a)
Definition: item_func.h:1787
String value
Definition: item_func.h:1784
const char * func_name() const override
Definition: item_func.h:1789
bool resolve_type(THD *thd) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_func.h:1790
longlong val_int() override
Definition: item_func.cc:4214
Definition: item_func.h:1360
double val_real() override
Gateway to natural LOG function.
Definition: item_func.cc:2835
enum Functype functype() const override
Definition: item_func.h:1365
const char * func_name() const override
Definition: item_func.h:1364
Item_func_ln(const POS &pos, Item *a)
Definition: item_func.h:1362
Definition: item_func.h:1858
String value1
Definition: item_func.h:1859
void print(const THD *thd, String *str, enum_query_type query_type) const override
This method is used for to:
Definition: item_func.cc:4309
longlong val_int() override
Definition: item_func.cc:4271
bool resolve_type(THD *thd) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_func.cc:4257
Item_func_locate(Item *a, Item *b)
Definition: item_func.h:1862
Item_func_locate(const POS &pos, Item *a, Item *b, Item *c)
Definition: item_func.h:1865
const char * func_name() const override
Definition: item_func.h:1868
Item_func_locate(const POS &pos, Item *a, Item *b)
Definition: item_func.h:1863
String value2
Definition: item_func.h:1859
Definition: item_func.h:1384
double val_real() override
Definition: item_func.cc:2884
enum Functype functype() const override
Definition: item_func.h:1389
const char * func_name() const override
Definition: item_func.h:1388
Item_func_log10(const POS &pos, Item *a)
Definition: item_func.h:1386
Definition: item_func.h:1377
double val_real() override
Definition: item_func.cc:2872
const char * func_name() const override
Definition: item_func.h:1381
Item_func_log2(const POS &pos, Item *a)
Definition: item_func.h:1379
Definition: item_func.h:1368
Item_func_log(const POS &pos, Item *a)
Definition: item_func.h:1370
double val_real() override
Extended but so slower LOG function.
Definition: item_func.cc:2852
Item_func_log(const POS &pos, Item *a, Item *b)
Definition: item_func.h:1371
const char * func_name() const override
Definition: item_func.h:1373
enum Functype functype() const override
Definition: item_func.h:1374
Definition: item_func.h:3539
uint flags
Definition: item_func.h:3547
FT_INFO * ft_handler
Definition: item_func.h:3553
DTCollation cmp_collation
Definition: item_func.h:3552
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:3602
uint key
Definition: item_func.h:3547
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:3619
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:3798
void set_master(Item_func_match *item)
Set master MATCH function and adjust used_in_where_only value.
Definition: item_func.h:3696
longlong val_int() override
Definition: item_func.h:3609
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:3561
Ft_hints * hints
Fulltext index hints, initialized for master MATCH function only.
Definition: item_func.h:3766
const char * func_name() const override
Definition: item_func.h:3604
bool docid_in_result()
Check whether FT result contains the document ID.
Definition: item_func.h:3666
Item * concat_ws
Definition: item_func.h:3562
bool can_skip_ranking()
Check if ranking is not needed.
Definition: item_func.h:3733
void cleanup() override
Called for every Item after use (preparation and execution).
Definition: item_func.h:3591
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:3717
Table_ref * table_ref
Definition: item_func.h:3554
bool ordered_result()
Check whether FT result is ordered on rank.
Definition: item_func.h:3648
bool init_search(THD *thd)
Initialize searching within full-text index.
Definition: item_func.cc:7566
String value
Definition: item_func.h:3563
enum Functype functype() const override
Definition: item_func.h:3603
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:3574
Item * against
Definition: item_func.h:3546
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:3779
String search_value
Definition: item_func.h:3564
bool is_simple_expression()
Check if this MATCH function is a simple expression in WHERE condition.
Definition: item_func.h:3757
Ft_hints * get_hints()
Returns pointer to Ft_hints object belonging to master MATCH function.
Definition: item_func.h:3706
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:3551
void set_simple_expression(bool val)
Set flag that the function is a simple expression.
Definition: item_func.h:3746
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:3772
Item_func_match * get_master()
Returns master MATCH function.
Definition: item_func.h:3686
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:3540
ulonglong get_count()
Get number of matching rows from FT handler.
Definition: item_func.h:3634
Definition: item_func.h:1685
Item_func_max(const POS &pos, PT_item_list *opt_list)
Definition: item_func.h:1687
const char * func_name() const override
Definition: item_func.h:1689
enum Functype functype() const override
Definition: item_func.h:1690
Definition: item_func.h:1599
bool compare_as_dates() const
Returns true if arguments to this function should be compared as dates.
Definition: item_func.cc:3902
longlong int_op() override
Performs the operation that this functions implements when the result type is INT.
Definition: item_func.cc:4042
bool resolve_type(THD *thd) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_func.cc:3786
TYPELIB * get_typelib() const override
Get the typelib information for an item of type set or enum.
Definition: item_func.cc:3800
my_decimal * val_decimal(my_decimal *) override
Definition: item_func.cc:4106
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:3999
String * str_op(String *) override
Performs the operation that this functions implements when the result type is a string type.
Definition: item_func.cc:3939
uint8 fsp_for_string
Fractional seconds precision to use when converting a time or timestamp expression into a string.
Definition: item_func.h:1655
double val_real() override
Definition: item_func.cc:4092
longlong val_int() override
Definition: item_func.cc:4099
bool resolve_type_inner(THD *thd) override
Resolve type of function after all arguments have had their data types resolved.
Definition: item_func.cc:3834
Item_func_min_max(const POS &pos, PT_item_list *opt_list, bool is_least_func)
Definition: item_func.h:1601
bool has_temporal_arg() const
Returns true if at least one of the arguments was of temporal type.
Definition: item_func.h:1636
String m_string_buf
Definition: item_func.h:1641
double real_op() override
Performs the operation that this functions implements when the result type is REAL.
Definition: item_func.cc:4023
bool cmp_datetimes(longlong *value)
Compare arguments as datetime values.
Definition: item_func.cc:3907
Item * temporal_item
Definition: item_func.h:1649
enum Item_result result_type() const override
Definition: item_func.h:1621
bool cmp_times(longlong *value)
Compare arguments as time values.
Definition: item_func.cc:3928
const bool m_is_least_func
True if LEAST function, false if GREATEST.
Definition: item_func.h:1640
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:1628
bool time_op(MYSQL_TIME *ltime) override
Definition: item_func.cc:4008
my_decimal * decimal_op(my_decimal *) override
Performs the operation that this functions implements when the result type is DECIMAL.
Definition: item_func.cc:4067
enum_field_types default_data_type() const override
Get the default data (output) type for the specific item.
Definition: item_func.h:1615
void set_numeric_type() override
Definition: item_func.h:1620
Definition: item_func.h:1677
enum Functype functype() const override
Definition: item_func.h:1682
const char * func_name() const override
Definition: item_func.h:1681
Item_func_min(const POS &pos, PT_item_list *opt_list)
Definition: item_func.h:1679
Definition: item_func.h:1225
enum Functype functype() const override
Definition: item_func.h:1239
my_decimal * decimal_op(my_decimal *) override
See Item_func_plus::decimal_op for comments.
Definition: item_func.cc:2294
longlong int_op() override SUPPRESS_UBSAN
Performs the operation that this functions implements when the result type is INT.
Definition: item_func.cc:2243
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:2225
Item_func_minus(const POS &pos, Item *a, Item *b)
Definition: item_func.h:1228
Item_func_minus(Item *a, Item *b)
Definition: item_func.h:1227
double real_op() override
Performs the operation that this functions implements when the result type is REAL.
Definition: item_func.cc:2232
const char * func_name() const override
Definition: item_func.h:1231
Definition: item_func.h:1296
bool check_partition_func_processor(uchar *) override
Check if a partition function is allowed.
Definition: item_func.h:1307
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:1308
bool resolve_type(THD *thd) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_func.cc:2718
void result_precision() override
Definition: item_func.cc:2702
Item_func_mod(const POS &pos, Item *a, Item *b)
Definition: item_func.h:1299
const char * func_name() const override
Definition: item_func.h:1304
enum Functype functype() const override
Definition: item_func.h:1309
double real_op() override
Performs the operation that this functions implements when the result type is REAL.
Definition: item_func.cc:2665
Item_func_mod(Item *a, Item *b)
Definition: item_func.h:1298
my_decimal * decimal_op(my_decimal *) override
Performs the operation that this functions implements when the result type is DECIMAL.
Definition: item_func.cc:2680
longlong int_op() override
Performs the operation that this functions implements when the result type is INT.
Definition: item_func.cc:2630
Definition: item_func.h:1242
const char * func_name() const override
Definition: item_func.h:1247
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:1253
void result_precision() override
Definition: item_func.cc:2432
double real_op() override
Performs the operation that this functions implements when the result type is REAL.
Definition: item_func.cc:2319
bool check_partition_func_processor(uchar *) override
Check if a partition function is allowed.
Definition: item_func.h:1252
my_decimal * decimal_op(my_decimal *) override
See Item_func_plus::decimal_op for comments.
Definition: item_func.cc:2417
longlong int_op() override
Performs the operation that this functions implements when the result type is INT.
Definition: item_func.cc:2331
Item_func_mul(Item *a, Item *b)
Definition: item_func.h:1244
enum Functype functype() const override
Definition: item_func.h:1254
Item_func_mul(const POS &pos, Item *a, Item *b)
Definition: item_func.h:1245
Definition: item_func.h:1312
Item_func_neg(const POS &pos, Item *a)
Definition: item_func.h:1315
const char * func_name() const override
Definition: item_func.h:1320
enum Functype functype() const override
Definition: item_func.h:1321
bool resolve_type(THD *thd) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_func.cc:2763
double real_op() override
Performs the operation that this functions implements when the result type is REAL.
Definition: item_func.cc:2725
longlong int_op() override
Performs the operation that this functions implements when the result type is INT.
Definition: item_func.cc:2731
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:1325
my_decimal * decimal_op(my_decimal *) override
Performs the operation that this functions implements when the result type is DECIMAL.
Definition: item_func.cc:2746
void fix_num_length_and_dec() override
Definition: item_func.cc:2756
Item_func_neg(Item *a)
Definition: item_func.h:1314
bool check_partition_func_processor(uchar *) override
Check if a partition function is allowed.
Definition: item_func.h:1324
Definition: item_func.h:966
Item_func_num1(Item *a, Item *b)
Definition: item_func.h:971
Item_func_num1(const POS &pos, Item *a)
Definition: item_func.h:969
void fix_num_length_and_dec() override
Definition: item_func.cc:1577
String * str_op(String *) override
Performs the operation that this functions implements when the result type is a string type.
Definition: item_func.h:977
Item_func_num1(Item *a)
Definition: item_func.h:968
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:1549
Item_func_num1(const POS &pos, Item *a, Item *b)
Definition: item_func.h:972
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:981
bool time_op(MYSQL_TIME *) override
Definition: item_func.h:985
Definition: item_func.h:873
virtual void set_numeric_type()=0
longlong val_int() override
Definition: item_func.cc:1774
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:1693
Item_func_numhybrid(const POS &pos, Item *a)
Definition: item_func.h:881
Item_func_numhybrid(mem_root_deque< Item * > *list)
Definition: item_func.h:895
enum_field_types default_data_type() const override
Get the default data (output) type for the specific item.
Definition: item_func.h:905
bool resolve_type_inner(THD *thd) override
Resolve type of function after all arguments have had their data types resolved.
Definition: item_func.cc:1685
bool is_null() override
The method allows to determine nullness of a complex expression without fully evaluating it,...
Definition: item_func.h:962
bool get_date(MYSQL_TIME *ltime, my_time_flags_t fuzzydate) override
Definition: item_func.cc:1857
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:878
bool resolve_type(THD *thd) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_func.cc:1657
my_decimal * val_decimal(my_decimal *) override
Definition: item_func.cc:1815
enum Item_result result_type() const override
Definition: item_func.h:904
virtual bool time_op(MYSQL_TIME *ltime)=0
double val_real() override
Definition: item_func.cc:1735
Item_func_numhybrid(const POS &pos, PT_item_list *list)
Definition: item_func.h:899
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:890
Item_result hybrid_type
Definition: item_func.h:875
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:1874
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:886
Definition: item_func.h:1923
const char * func_name() const override
Definition: item_func.h:1929
longlong val_int() override
Definition: item_func.cc:4399
String value
Definition: item_func.h:1924
Item_func_ord(const POS &pos, Item *a)
Definition: item_func.h:1927
Definition: item_func.h:1209
const char * func_name() const override
Definition: item_func.h:1215
Item_func_plus(const POS &pos, Item *a, Item *b)
Definition: item_func.h:1212
Item_func_plus(Item *a, Item *b)
Definition: item_func.h:1211
double real_op() override
Performs the operation that this functions implements when the result type is REAL.
Definition: item_func.cc:2120
longlong int_op() override SUPPRESS_UBSAN
Performs the operation that this functions implements when the result type is INT.
Definition: item_func.cc:2131
my_decimal * decimal_op(my_decimal *) override
Calculate plus of two decimals.
Definition: item_func.cc:2187
enum Functype functype() const override
Definition: item_func.h:1222
Definition: item_func.h:1400
double val_real() override
Definition: item_func.cc:2910
Item_func_pow(const POS &pos, Item *a, Item *b)
Definition: item_func.h:1402
const char * func_name() const override
Definition: item_func.h:1404
enum Functype functype() const override
Definition: item_func.h:1405
Definition: item_func.h:1592
Item_func_radians(const POS &pos, Item *a)
Definition: item_func.h:1594
const char * func_name() const override
Definition: item_func.h:1596
enum Functype functype() const override
Definition: item_func.h:1597
Definition: item_func.h:1521
bool do_itemize(Parse_context *pc, Item **res) override
The core function that does the actual itemization.
Definition: item_func.cc:3657
double val_real() override
Definition: item_func.cc:3722
void seed_random(Item *val)
Definition: item_func.cc:3674
bool fix_fields(THD *thd, Item **ref) override
Definition: item_func.cc:3692
const char * func_name() const override
Definition: item_func.h:1533
bool first_eval
Definition: item_func.h:1525
Item_real_func super
Definition: item_func.h:1522
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:1549
rand_struct * m_rand
Definition: item_func.h:1524
Item_func_rand()
Definition: item_func.h:1527
Item_func_rand(const POS &pos)
Definition: item_func.h:1529
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:1540
Item_func_rand(const POS &pos, Item *a)
Definition: item_func.h:1528
bool resolve_type(THD *thd) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_func.cc:3684
void cleanup() override
Called for every Item after use (preparation and execution).
Definition: item_func.h:1545
Definition: item_func.h:2461
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:2462
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_func.h:2473
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:2470
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:2478
Item_func_release_all_locks(const POS &pos)
Definition: item_func.h:2465
const char * func_name() const override
Definition: item_func.h:2469
bool is_non_const_over_literals(uchar *) override
Definition: item_func.h:2477
Definition: item_func.h:2431
Item_int_func super
Definition: item_func.h:2432
bool do_itemize(Parse_context *pc, Item **res) override
The core function that does the actual itemization.
Definition: item_func.cc:5600
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:2442
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:2452
bool resolve_type(THD *thd) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_func.h:2445
String value
Definition: item_func.h:2434
const char * func_name() const override
Definition: item_func.h:2441
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:2451
Item_func_release_lock(const POS &pos, Item *a)
Definition: item_func.h:2437
Definition: item_func.h:1500
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_func.cc:3452
my_decimal * decimal_op(my_decimal *) override
Performs the operation that this functions implements when the result type is DECIMAL.
Definition: item_func.cc:3642
bool truncate
Definition: item_func.h:1501
Item_func_round(Item *a, Item *b, bool trunc_arg)
Definition: item_func.h:1504
longlong int_op() override
Performs the operation that this functions implements when the result type is INT.
Definition: item_func.cc:3576
enum Functype functype() const override
Definition: item_func.h:1516
const char * func_name() const override
Definition: item_func.h:1509
Item_func_round(const POS &pos, Item *a, Item *b, bool trunc_arg)
Definition: item_func.h:1506
double real_op() override
Performs the operation that this functions implements when the result type is REAL.
Definition: item_func.cc:3548
Definition: item_func.h:3890
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_func.h:3900
Item_func_row_count(const POS &pos)
Definition: item_func.h:3894
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:3899
Item_int_func super
Definition: item_func.h:3891
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:3904
This class is used to implement operations like SET @variable or @variable:= expression.
Definition: item_func.h:3298
void cleanup() override
Called for every Item after use (preparation and execution).
Definition: item_func.cc:6026
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:3339
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:3315
enum Item_result cached_result_type
Definition: item_func.h:3299
enum Functype functype() const override
Definition: item_func.h:3327
Item_func_set_user_var(Name_string a, Item *b)
Definition: item_func.h:3314
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:3359
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:3351
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:3303
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
union Item_func_set_user_var::@58 save_result
double vreal
Definition: item_func.h:3306
my_decimal decimal_buff
Definition: item_func.h:3302
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:3308
String value
Definition: item_func.h:3301
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:3346
Name_string name
Definition: item_func.h:3312
Item_func_set_user_var(THD *thd, Item_func_set_user_var *item)
Definition: item_func.h:3318
String * vstr
Definition: item_func.h:3307
longlong vint
Definition: item_func.h:3305
Definition: item_func.h:2102
Item_func_shift_left(const POS &pos, Item *a, Item *b)
Definition: item_func.h:2104
const char * func_name() const override
Definition: item_func.h:2106
longlong int_op() override
Performs the operation on integers to produce a result of type INT_RESULT.
Definition: item_func.cc:3090
String * str_op(String *str) override
Performs the operation on binary strings to produce a result of type STRING_RESULT.
Definition: item_func.cc:3164
Definition: item_func.h:2113
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
Item_func_shift_right(const POS &pos, Item *a, Item *b)
Definition: item_func.h:2115
longlong int_op() override
Performs the operation on integers to produce a result of type INT_RESULT.
Definition: item_func.cc:3091
const char * func_name() const override
Definition: item_func.h:2117
Definition: item_func.h:2087
String * eval_str_op(String *str)
Template function that evaluates the bitwise shift operation over binary string arguments.
Definition: item_func.cc:3099
longlong eval_int_op()
Template function that evaluates the bitwise shift operation over integer arguments.
Definition: item_func.cc:3074
bool binary_result_requires_binary_second_arg() const override
Definition: item_func.h:2089
Item_func_shift(const POS &pos, Item *a, Item *b)
Definition: item_func.h:2098
Definition: item_func.h:1562
longlong val_int() override
Definition: item_func.cc:3763
Item_func_sign(const POS &pos, Item *a)
Definition: item_func.h:1564
enum Functype functype() const override
Definition: item_func.h:1566
const char * func_name() const override
Definition: item_func.h:1565
bool resolve_type(THD *thd) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_func.cc:3755
Definition: item_func.h:1441
Item_func_sin(const POS &pos, Item *a)
Definition: item_func.h:1443
double val_real() override
Definition: item_func.cc:2959
const char * func_name() const override
Definition: item_func.h:1445
enum Functype functype() const override
Definition: item_func.h:1446
Definition: item_func.h:2209
bool resolve_type(THD *thd) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_func.h:2233
Item_func_sleep(const POS &pos, Item *a)
Definition: item_func.h:2213
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:2226
const char * func_name() const override
Definition: item_func.h:2216
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:2223
Item_int_func super
Definition: item_func.h:2210
longlong val_int() override
This function is just used to create tests with time gaps.
Definition: item_func.cc:5937
Definition: item_func.h:3922
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:8610
void compute_cost(CostOfItem *root_cost) const override
Compute the cost of evaluating this Item.
Definition: item_func.h:3996
double val_real() override
Definition: item_func.cc:8304
bool change_context_processor(uchar *arg) override
Definition: item_func.h:3975
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:3936
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:3934
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:3988
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:8603
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:3928
Item_result result_type() const override
Definition: item_func.cc:8461
Field * get_sp_result_field()
Definition: item_func.h:3987
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:3923
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:3982
sp_name * m_name
The name of the stored function.
Definition: item_func.h:3930
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:3932
Definition: item_func.h:1392
Item_func_sqrt(const POS &pos, Item *a)
Definition: item_func.h:1394
const char * func_name() const override
Definition: item_func.h:1396
double val_real() override
Definition: item_func.cc:2902
enum Functype functype() const override
Definition: item_func.h:1397
Definition: item_func.h:1449
enum Functype functype() const override
Definition: item_func.h:1454
double val_real() override
Definition: item_func.cc:2966
Item_func_tan(const POS &pos, Item *a)
Definition: item_func.h:1451
const char * func_name() const override
Definition: item_func.h:1453
Definition: item_func.h:2337
bool get_date(MYSQL_TIME *ltime, my_time_flags_t fuzzydate) override
Definition: item_func.h:2346
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:2339
longlong val_int() override
Definition: item_func.cc:5136
enum Item_result result_type() const override
Definition: item_func.h:2352
bool get_time(MYSQL_TIME *ltime) override
Definition: item_func.h:2349
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:2288
bool get_date(MYSQL_TIME *ltime, my_time_flags_t fuzzydate) override
Definition: item_func.h:2304
Item_func_udf_float(const POS &pos, udf_func *udf_arg, PT_item_list *opt_list)
Definition: item_func.h:2290
my_decimal * val_decimal(my_decimal *dec_buf) override
Definition: item_func.h:2296
longlong val_int() override
Definition: item_func.h:2292
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_func.h:2310
bool get_time(MYSQL_TIME *ltime) override
Definition: item_func.h:2307
double val_real() override
Definition: item_func.cc:5106
String * val_str(String *str) override
Definition: item_func.cc:5114
Definition: item_func.h:2317
bool get_time(MYSQL_TIME *ltime) override
Definition: item_func.h:2329
enum Item_result result_type() const override
Definition: item_func.h:2330
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:2319
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_func.h:2331
double val_real() override
Definition: item_func.h:2322
bool get_date(MYSQL_TIME *ltime, my_time_flags_t fuzzydate) override
Definition: item_func.h:2326
longlong val_int() override
Definition: item_func.cc:5122
Definition: item_func.h:2356
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:2358
String * val_str(String *) override
Definition: item_func.cc:5184
bool get_time(MYSQL_TIME *ltime) override
Definition: item_func.h:2389
bool get_date(MYSQL_TIME *ltime, my_time_flags_t fuzzydate) override
Definition: item_func.h:2386
my_decimal * val_decimal(my_decimal *dec_buf) override
Definition: item_func.h:2379
enum Item_result result_type() const override
Definition: item_func.h:2392
longlong val_int() override
Definition: item_func.h:2371
double val_real() override
Definition: item_func.h:2362
Definition: item_func.h:1572
Item_func_units(const POS &pos, Item *a, double mul_arg, double add_arg)
Definition: item_func.h:1576
double add
Definition: item_func.h:1573
bool resolve_type(THD *thd) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_func.cc:3770
double val_real() override
Definition: item_func.cc:3779
double mul
Definition: item_func.h:1573
Definition: item_func.h:4025
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:4048
Item_int_func super
Definition: item_func.h:4026
longlong val_int() override
Definition: item_func.cc:8648
bool do_itemize(Parse_context *pc, Item **res) override
The core function that does the actual itemization.
Definition: item_func.cc:8640
Item_func_uuid_short(const POS &pos)
Definition: item_func.h:4029
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:4039
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_func.h:4034
bool check_partition_func_processor(uchar *) override
Check if a partition function is allowed.
Definition: item_func.h:4038
const char * func_name() const override
Definition: item_func.h:4032
Definition: item_func.h:1883
bool resolve_type(THD *thd) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_func.h:1891
const char * func_name() const override
Definition: item_func.h:1888
Item_func_validate_password_strength(const POS &pos, Item *a)
Definition: item_func.h:1885
longlong val_int() override
Definition: item_func.cc:4322
Definition: item_func.h:1797
const char * func_name() const override
Definition: item_func.h:1803
String value
Definition: item_func.h:1798
Item_func_vector_dim(const POS &pos, Item *a)
Definition: item_func.h:1801
longlong val_int() override
Definition: item_func.cc:4225
bool resolve_type(THD *thd) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_func.h:1804
Definition: item_func.h:4053
Item_static_string_func super
Definition: item_func.h:4054
bool do_itemize(Parse_context *pc, Item **res) override
The core function that does the actual itemization.
Definition: item_func.cc:8656
Item_func_version(const POS &pos)
Definition: item_func.cc:9896
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:581
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:405
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:657
Item_func()
Definition: item_func.h:367
my_decimal * val_decimal(my_decimal *) override
Definition: item_func.cc:835
bool replace_equal_field_checker(uchar **arg) override
Definition: item_func.h:606
virtual bool have_rev_func() const
Definition: item_func.h:536
Item ** args
Array of pointers to arguments.
Definition: item_func.h:107
virtual enum Functype functype() const
Definition: item_func.h:366
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:815
Item_func(const POS &pos)
Definition: item_func.h:369
bool reject_vector_args()
Definition: item_func.cc:1596
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:711
Item_func(Item *a, Item *b)
Definition: item_func.h:381
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:494
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:2078
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:524
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:563
Item_func(const POS &pos, Item *a)
Definition: item_func.h:376
Item * replace_equal_field(uchar *arg) override
Definition: item_func.h:612
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
@ JSON_SCHEMA_VALIDATION_REPORT_FUNC
Definition: item_func.h:355
@ 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
@ JSON_SCHEMA_VALID_FUNC
Definition: item_func.h:356
@ 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:647
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:534
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:448
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:734
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:358
@ OPTIMIZE_NONE
Definition: item_func.h:359
@ OPTIMIZE_EQUAL
Definition: item_func.h:363
@ OPTIMIZE_NULL
Definition: item_func.h:362
@ OPTIMIZE_KEY
Definition: item_func.h:360
@ OPTIMIZE_OP
Definition: item_func.h:361
void set_used_tables(table_map map)
Definition: item_func.h:528
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:717
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:661
bool agg_arg_charsets(DTCollation &c, Item **items, uint nitems, uint flags, int item_sep)
Definition: item_func.h:572
virtual bool is_deprecated() const
Definition: item_func.h:556
Item_func(const POS &pos, Item *a, Item *b, Item *c, Item *d, Item *e, Item *f)
Definition: item_func.h:473
enum Type type() const override
Definition: item_func.h:365
virtual Item * key_item() const
Definition: item_func.h:537
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:426
virtual bool may_have_named_parameters() const
Named parameters are allowed in a parameter list.
Definition: item_func.h:812
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:1582
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:557
Item_func(Item *a, Item *b, Item *c, Item *d)
Definition: item_func.h:413
bool reject_geometry_args()
Definition: item_func.cc:1608
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:630
Item_func(const POS &pos, Item *a, Item *b)
Definition: item_func.h:388
virtual optimize_type select_optimize(const THD *)
Definition: item_func.h:535
bool has_date_args()
Definition: item_func.h:671
virtual const Item * get_arg(uint i) const
Get the i'th argument of the function that this object represents.
Definition: item_func.h:497
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:434
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:682
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:813
bool agg_arg_charsets_for_comparison(DTCollation &c, Item **items, uint nitems, int item_sep=1)
Definition: item_func.h:591
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:693
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:639
bool get_arg0_time(MYSQL_TIME *ltime)
Definition: item_func.h:560
Item_func(Item *a)
Definition: item_func.h:372
Item_func(mem_root_deque< Item * > *list)
Definition: item_func.h:484
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:526
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:498
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:457
table_map used_tables() const override
Definition: item_func.h:525
virtual bool contains_only_equi_join_condition() const
Whether this Item is an equi-join condition.
Definition: item_func.h:744
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:514
Item_func(Item *a, Item *b, Item *c)
Definition: item_func.h:394
uint allowed_arg_cols
Definition: item_func.h:191
Definition: item_func.h:1020
String * val_str(String *str) override
Definition: item_func.cc:1471
Item_int_func(const POS &pos, Item *a)
Definition: item_func.h:1028
Item_int_func(Item *a, Item *b, Item *c)
Definition: item_func.h:1039
Item_int_func(const POS &pos)
Definition: item_func.h:1023
Item_int_func(Item *a, Item *b)
Definition: item_func.h:1032
Item_int_func(const POS &pos, PT_item_list *opt_list)
Definition: item_func.h:1058
bool get_date(MYSQL_TIME *ltime, my_time_flags_t fuzzydate) override
Definition: item_func.h:1068
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:1042
Item_int_func()
Definition: item_func.h:1022
Item_int_func(const POS &pos, Item *a, Item *b)
Definition: item_func.h:1035
Item_int_func(Item *a)
Definition: item_func.h:1027
Item_int_func(mem_root_deque< Item * > *list)
Definition: item_func.h:1055
Item_int_func(const POS &pos, Item *a, Item *b, Item *c, Item *d)
Definition: item_func.h:1050
enum Item_result result_type() const override
Definition: item_func.h:1072
Item_int_func(Item *a, Item *b, Item *c, Item *d)
Definition: item_func.h:1047
Item_int_func(THD *thd, Item_int_func *item)
Definition: item_func.h:1063
bool get_time(MYSQL_TIME *ltime) override
Definition: item_func.h:1071
Definition: item_func.h:2524
Item_master_pos_wait(const POS &pos, Item *a, Item *b)
Definition: item_func.h:2526
Item_master_pos_wait(const POS &pos, Item *a, Item *b, Item *c)
Definition: item_func.h:2528
Item_master_pos_wait(const POS &pos, Item *a, Item *b, Item *c, Item *d)
Definition: item_func.h:2530
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:1456
Definition: item_func.h:992
String * str_op(String *) override
Performs the operation that this functions implements when the result type is a string type.
Definition: item_func.h:1006
Item_num_op(const POS &pos, Item *a, Item *b)
Definition: item_func.h:995
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:1000
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:1010
Item_num_op(Item *a, Item *b)
Definition: item_func.h:994
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:1014
Definition: item_func.h:832
bool get_date(MYSQL_TIME *ltime, my_time_flags_t fuzzydate) override
Definition: item_func.h:864
longlong val_int() override
Definition: item_func.h:860
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:867
Item_real_func(Item *a, Item *b)
Definition: item_func.h:844
String * val_str(String *str) override
Definition: item_func.cc:844
Item_real_func(mem_root_deque< Item * > *list)
Definition: item_func.h:850
Item_real_func(const POS &pos)
Definition: item_func.h:835
Item_real_func(const POS &pos, Item *a)
Definition: item_func.h:840
enum Item_result result_type() const override
Definition: item_func.h:870
Item_real_func()
Definition: item_func.h:834
Item_real_func(const POS &pos, PT_item_list *list)
Definition: item_func.h:854
Item_real_func(Item *a)
Definition: item_func.h:839
Item_real_func(const POS &pos, Item *a, Item *b)
Definition: item_func.h:846
Item with result field.
Definition: item.h:5829
int raise_decimal_overflow()
Definition: item.h:5888
longlong raise_integer_overflow()
Definition: item.h:5883
longlong llrint_with_overflow_check(double realval)
Definition: item.h:5868
void cleanup() override
Called for every Item after use (preparation and execution).
Definition: item.cc:10763
double raise_float_overflow()
Definition: item.h:5878
A wrapper Item that normally returns its parameter, but becomes NULL when processing rows for rollup.
Definition: item_func.h:1718
const char * func_name() const override
Definition: item_func.h:1738
bool rollup_null() const
Definition: item_func.h:1763
void print(const THD *thd, String *str, enum_query_type query_type) const override
This method is used for to:
Definition: item_func.cc:4188
table_map used_tables() const override
Definition: item_func.h:1739
TYPELIB * get_typelib() const override
Get the typelib information for an item of type set or enum.
Definition: item_func.cc:4210
String * val_str(String *str) override
Definition: item_func.cc:4155
bool val_json(Json_wrapper *result) override
Get a JSON value from an Item.
Definition: item_func.cc:4177
const int m_min_rollup_level
Definition: item_func.h:1779
bool eq_specific(const Item *item) const override
Provide a more specific equality check for a function.
Definition: item_func.cc:4205
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_func.h:1753
my_decimal * val_decimal(my_decimal *dec) override
Definition: item_func.cc:4166
Item_result result_type() const override
Definition: item_func.h:1752
Item_rollup_group_item(int min_rollup_level, Item *inner_item)
Definition: item_func.h:1720
void set_current_rollup_level(int level)
Definition: item_func.h:1773
int min_rollup_level() const
Definition: item_func.h:1776
int m_current_rollup_level
Definition: item_func.h:1780
longlong val_int() override
Definition: item_func.cc:4144
Item * inner_item()
Definition: item_func.h:1761
const Item * inner_item() const
Definition: item_func.h:1762
bool get_date(MYSQL_TIME *ltime, my_time_flags_t fuzzydate) override
Definition: item_func.cc:4114
bool get_time(MYSQL_TIME *ltime) override
Definition: item_func.cc:4124
enum Functype functype() const override
Definition: item_func.h:1766
void update_used_tables() override
Updates used tables, not null tables information and accumulates properties up the item tree,...
Definition: item_func.h:1748
double val_real() override
Definition: item_func.cc:4133
Definition: item_func.h:2489
const char * func_name() const override
Definition: item_func.h:2503
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:2515
Item_source_pos_wait(const POS &pos, Item *a, Item *b, Item *c, Item *d)
Definition: item_func.h:2498
Item_source_pos_wait(const POS &pos, Item *a, Item *b, Item *c)
Definition: item_func.h:2496
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:2504
bool resolve_type(THD *thd) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_func.h:2507
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:2491
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:2490
Item_source_pos_wait(const POS &pos, Item *a, Item *b)
Definition: item_func.h:2494
Utility mixin class to be able to walk() only parts of item trees.
Definition: item.h:738
Definition: item_func.h:1130
Item_typecast_decimal(const POS &pos, Item *a, int len, int dec)
Definition: item_func.h:1135
longlong val_int() override
Definition: item_func.cc:2001
void print(const THD *thd, String *str, enum_query_type query_type) const override
This method is used for to:
Definition: item_func.cc:2039
const char * func_name() const override
Definition: item_func.h:1156
enum Item_result result_type() const override
Definition: item_func.h:1149
void add_json_info(Json_object *obj) override
Add all the node-specific json fields.
Definition: item_func.cc:2053
String * val_str(String *str) override
Definition: item_func.cc:1986
my_decimal * val_decimal(my_decimal *) override
Definition: item_func.cc:2009
bool get_time(MYSQL_TIME *ltime) override
Definition: item_func.h:1145
double val_real() override
Definition: item_func.cc:1993
bool get_date(MYSQL_TIME *ltime, my_time_flags_t fuzzydate) override
Definition: item_func.h:1142
enum Functype functype() const override
Definition: item_func.h:1157
bool resolve_type(THD *thd) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_func.h:1150
Class used to implement CAST to floating-point data types.
Definition: item_func.h:1165
void print(const THD *thd, String *str, enum_query_type query_type) const override
This method is used for to:
Definition: item_func.cc:2112
void add_json_info(Json_object *obj) override
Add all the node-specific json fields.
Definition: item_func.h:1167
enum Item_result result_type() const override
Definition: item_func.h:1187
Item_typecast_real(const POS &pos, Item *a, bool as_double)
Definition: item_func.h:1173
bool resolve_type(THD *thd) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_func.h:1188
Item_typecast_real(Item *a)
Definition: item_func.h:1180
String * val_str(String *str) override
Definition: item_func.cc:2060
double val_real() override
Definition: item_func.cc:2064
longlong val_int() override
Definition: item_func.h:1183
const char * func_name() const override
Definition: item_func.h:1192
bool get_date(MYSQL_TIME *ltime, my_time_flags_t fuzzydate) override
Definition: item_func.cc:2095
bool get_time(MYSQL_TIME *ltime) override
Definition: item_func.cc:2100
enum Functype functype() const override
Definition: item_func.h:1193
my_decimal * val_decimal(my_decimal *decimal_value) override
Definition: item_func.cc:2104
Definition: item_func.h:1104
const char * func_name() const override
Definition: item_func.h:1109
Item_typecast_signed(const POS &pos, Item *a)
Definition: item_func.h:1106
void print(const THD *thd, String *str, enum_query_type query_type) const override
This method is used for to:
Definition: item_func.cc:1891
longlong val_int() override
Definition: item_func.cc:1922
bool resolve_type(THD *thd) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_func.cc:1898
enum Functype functype() const override
Definition: item_func.h:1114
Definition: item_func.h:1117
void print(const THD *thd, String *str, enum_query_type query_type) const override
This method is used for to:
Definition: item_func.cc:1950
bool resolve_type(THD *thd) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_func.cc:1957
Item_typecast_unsigned(const POS &pos, Item *a)
Definition: item_func.h:1119
longlong val_int() override
Definition: item_func.cc:1963
const char * func_name() const override
Definition: item_func.h:1122
enum Functype functype() const override
Definition: item_func.h:1127
Definition: item_func.h:2240
Item_func super
Definition: item_func.h:2241
Item_udf_func(const POS &pos, udf_func *udf_arg, PT_item_list *opt_list)
Definition: item_func.h:2247
const char * func_name() const override
Definition: item_func.h:2254
bool may_have_named_parameters() const override
Named parameters are allowed in a parameter list.
Definition: item_func.h:2278
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:2265
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:4607
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:2256
~Item_udf_func() override=default
Item_result result_type() const override
Definition: item_func.h:2261
udf_handler udf
Definition: item_func.h:2244
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:2255
void compute_cost(CostOfItem *root_cost) const override
Compute the cost of evaluating this Item.
Definition: item_func.h:2273
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:2285
Definition: item_func.h:3417
bool get_date(MYSQL_TIME *, my_time_flags_t) override
Definition: item_func.h:3432
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:3418
Item_user_var_as_out_param(const POS &pos, Name_string a)
Definition: item_func.h:3422
enum Type type() const override
Definition: item_func.h:3427
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:3436
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:3419
Common class for: Item_func_get_system_var Item_func_get_user_var Item_func_set_user_var.
Definition: item_func.h:3065
Item_var_func(const POS &pos, Item *a)
Definition: item_func.h:3073
bool get_time(MYSQL_TIME *ltime) override
Definition: item_func.h:3078
bool get_date(MYSQL_TIME *ltime, my_time_flags_t fuzzydate) override
Definition: item_func.h:3075
Item_var_func()
Definition: item_func.h:3067
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:3081
Item_var_func(THD *thd, Item_var_func *item)
Definition: item_func.h:3070
Item_var_func(Item *a)
Definition: item_func.h:3072
Item_var_func(const POS &pos)
Definition: item_func.h:3068
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:3576
void set_nullable(bool nullable)
Definition: item.h:3687
DTCollation collation
Character set and collation properties assigned for this Item.
Definition: item.h:3583
bool get_time_from_decimal(MYSQL_TIME *ltime)
Convert val_decimal() to time in MYSQL_TIME.
Definition: item.cc:1667
bool is_nullable() const
Definition: item.h:3686
bool get_time_from_string(MYSQL_TIME *ltime)
Convert val_str() to time in MYSQL_TIME.
Definition: item.cc:1648
virtual bool propagate_type(THD *thd, const Type_properties &type)
Propagate data type specifications into parameters and user variables.
Definition: item.h:1314
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:1042
virtual table_map used_tables() const
Definition: item.h:2364
bool get_time_from_real(MYSQL_TIME *ltime)
Convert val_real() to time in MYSQL_TIME.
Definition: item.cc:1658
bool get_date_from_decimal(MYSQL_TIME *ltime, my_time_flags_t flags)
Convert val_decimal() to date in MYSQL_TIME.
Definition: item.cc:1580
void add_accum_properties(const Item *item)
Add more accumulated properties to an Item.
Definition: item.h:3435
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:3584
bool fixed
True if item has been resolved.
Definition: item.h:3675
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:3712
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:1723
uint8 m_accum_properties
Definition: item.h:3753
void set_accum_properties(const Item *item)
Set accumulated properties for an Item.
Definition: item.h:3430
my_decimal * val_decimal_from_real(my_decimal *decimal_value)
Definition: item.cc:354
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:3481
bool unsigned_flag
Definition: item.h:3713
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:2542
bool const_for_execution() const
Returns true if item is constant during one query execution.
Definition: item.h:2437
bool get_date_from_string(MYSQL_TIME *ltime, my_time_flags_t flags)
Convert val_str() to date in MYSQL_TIME.
Definition: item.cc:1561
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:1629
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:3723
bool get_date_from_int(MYSQL_TIME *ltime, my_time_flags_t flags)
Convert val_int() to date in MYSQL_TIME.
Definition: item.cc:1589
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:1799
uint32 max_length
Maximum length of result of evaluating this item, in number of bytes.
Definition: item.h:3601
bool get_date_from_real(MYSQL_TIME *ltime, my_time_flags_t flags)
Convert val_real() to date in MYSQL_TIME.
Definition: item.cc:1571
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:7526
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:1676
Definition: sql_optimizer.h:133
Represents a JSON container value of type "object" (ECMA), type J_OBJECT here.
Definition: json_dom.h:367
bool add_alias(std::string_view key, Json_dom *value)
Insert the value into the object.
Definition: json_dom.h:409
Abstraction for accessing JSON values irrespective of whether they are (started out as) binary JSON v...
Definition: json_dom.h:1150
Definition: sql_list.h:494
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:3820
std::function< bool(Item_func_match *)> m_func
Definition: item_func.h:3827
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:1159
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:3677
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:4930
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:96
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:3095
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:3112
static const size_t extra_size
Definition: item_func.h:3184
Simple_cstring entry_name
Definition: item_func.h:3209
Item_result m_type
Value type.
Definition: item_func.h:3187
size_t m_length
Value length.
Definition: item_func.h:3186
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:3211
THD * m_owner
Definition: item_func.h:3188
size_t length() const
Definition: item_func.h:3283
query_id_t used_query_id() const
Definition: item_func.h:3253
THD * owner_session() const
Definition: item_func.h:3207
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:3100
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:3282
void free_value()
Free the external value buffer, if it's allocated.
Definition: item_func.h:3140
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:3285
void destroy()
Free all memory used by a user_var_entry instance previously created by create().
Definition: item_func.h:3272
bool alloced()
Check if m_ptr points to an external buffer previously allocated by realloc().
Definition: item_func.h:3135
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:3245
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:3148
DTCollation collation
Definition: item_func.h:3210
void set_type(Item_result type)
Set type of to the given value.
Definition: item_func.h:3236
char * m_ptr
Value.
Definition: item_func.h:3185
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:3202
void assert_locked() const
Assert the user variable is locked.
Definition: item_func.cc:6203
void reset_value()
Definition: item_func.h:3096
char * name_ptr()
Position inside a user_var_entry where a null-terminates array of characters representing the variabl...
Definition: item_func.h:3120
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:3252
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
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:283
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)
Definition: item.cc:2793
bool agg_item_charsets_for_string_result(DTCollation &c, const char *name, Item **items, uint nitems, int item_sep=1)
Definition: item.h:4095
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:4102
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:1644
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:182
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:3523
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:9705
bool volatile mqh_used
Definition: mysqld.cc:1311
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:8635
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:120
#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:322
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:1569
static bool replace
Definition: mysqlimport.cc:70
std::string str(const mysqlrouter::ConfigGenerator::Options::Endpoint &ep)
Definition: config_generator.cc:1105
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(const detail::range auto &rng, std::string_view delim)
join elements of a range into a string separated by a delimiter.
Definition: string.h:74
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:2894
std::list< T, ut::allocator< T > > list
Specialization of list which uses ut_allocator.
Definition: ut0new.h:2880
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
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
#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:113
enum_walk
Enumeration for {Item,Query_block[_UNIT],Table_function}walk.
Definition: sql_const.h:289
bool(Item::*)(unsigned char *) Item_processor
Processor type for {Item,Query_block[_UNIT],Table_function}walk.
Definition: sql_const.h:307
constexpr const table_map INNER_TABLE_BIT
Definition: sql_const.h:111
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:1423
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:50