58#include "mysqld_error.h"
100#define COND_FILTER_ALLPASS 1.0f
102#define COND_FILTER_EQUALITY 0.1f
104#define COND_FILTER_INEQUALITY 0.3333f
106#define COND_FILTER_BETWEEN 0.1111f
113#define COND_FILTER_STALE -1.0f
129#define COND_FILTER_STALE_NO_CONST -2.0f
164#define MY_COLL_ALLOW_SUPERSET_CONV 1
165#define MY_COLL_ALLOW_COERCIBLE_CONV 2
166#define MY_COLL_DISALLOW_NONE 4
167#define MY_COLL_ALLOW_NUMERIC_CONV 8
169#define MY_COLL_ALLOW_CONV \
170 (MY_COLL_ALLOW_SUPERSET_CONV | MY_COLL_ALLOW_COERCIBLE_CONV)
171#define MY_COLL_CMP_CONV (MY_COLL_ALLOW_CONV | MY_COLL_DISALLOW_NONE)
204 uint repertoire_arg) {
289 if (is_null_terminated)
346#define NAME_STRING(x) Name_string(STRING_WITH_LEN(x))
377 void copy(
const char *str_arg,
size_t length_arg,
const CHARSET_INFO *cs_arg,
378 bool is_autogenerated_arg);
466 DBUG_PRINT(
"outer_field", (
"creating ctx %p",
this));
507 ? ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
509 ? ER_DEFAULT_VAL_GENERATED_FUNCTION_IS_NOT_ALLOWED
510 : ER_CHECK_CONSTRAINT_FUNCTION_IS_NOT_ALLOWED);
870 static void *
operator new(
size_t size)
noexcept {
871 return (*THR_MALLOC)->Alloc(size);
874 const std::nothrow_t &arg
875 [[maybe_unused]] = std::nothrow)
noexcept {
879 static void operator delete(
void *ptr [[maybe_unused]],
880 size_t size [[maybe_unused]]) {
884 const std::nothrow_t &)
noexcept {}
1159 void rename(
char *new_name);
1189 [[maybe_unused]]) {}
1221 bool pin =
false,
bool inherit =
false) {
1260 const Query_block *outer_query_block [[maybe_unused]]) {
1261 return std::nullopt;
1282 bool no_conversions);
1296 bool no_conversions);
1328 virtual bool eq(
const Item *,
bool binary_cmp)
const;
1698 bool *incl_endp [[maybe_unused]]) {
1921 my_error(ER_NOT_SUPPORTED_YET,
MYF(0),
"item type for JSON");
1953 double rows_in_table [[maybe_unused]]) {
1955 assert((read_tables & filter_for_table) == 0);
2082 return decimal_value;
2327 bool used_alias)
const;
2345 bool skip_registered);
2455 return (this->*processor)(arg);
2461 return (*
reinterpret_cast<std::remove_reference_t<T> *
>(arg))(
this);
2467 return (*
reinterpret_cast<std::remove_reference_t<T> *
>(*arg))(
this);
2538 if ((this->*analyzer)(arg_p))
return ((this->*transformer)(arg_t));
2544 (*traverser)(
this, arg);
2656 if (table !=
nullptr && table != field->
table)
return false;
2658 table = field->
table;
2714 assert(root !=
nullptr);
2737 assert(arg !=
nullptr);
2865 if (*arg) *arg =
nullptr;
3111 if (this_context == other_context) {
3504 [[maybe_unused]])
const {
3545 return item->
walk(&Item::walk_helper_thunk<T>, walk,
3546 reinterpret_cast<uchar *
>(&functor));
3556template <
class T,
class U>
3558 uchar *analyzer_ptr =
reinterpret_cast<uchar *
>(&analyzer);
3559 return item->
compile(&Item::analyze_helper_thunk<T>, &analyzer_ptr,
3560 &Item::walk_helper_thunk<U>,
3561 reinterpret_cast<uchar *
>(&transformer));
3571 return item->
transform(&Item::walk_helper_thunk<T>,
3572 pointer_cast<uchar *>(&transformer));
3651 Field *field,
bool no_conversions)
override;
3665 Field *field,
bool no_conversions) {
3814 bool no_conversions)
override {
3828 uint nitems,
int item_sep = 1) {
3853#define NO_FIELD_INDEX ((uint16)(-1))
3952 const char *table_name_arg,
const char *field_name_arg)
3967 const char *table_name_arg,
const char *field_name_arg)
4045 const char *db_name_arg,
const char *table_name_arg)
const;
4091 bool any_privileges);
4103 const char *table_name_arg)
4142 bool no_conversions)
override;
4198 if (
item_equal ==
nullptr && item_equal_arg !=
nullptr) {
4236 const char *table_name_arg,
const char *field_name_arg);
4237 Item_field(
const POS &pos,
const char *db_arg,
const char *table_name_arg,
4238 const char *field_name_arg);
4247 bool eq(
const Item *item,
bool binary_cmp)
const override;
4304 return pointer_cast<Field *>(arg) ==
field;
4308 auto mark_field = pointer_cast<Mark_field *>(arg);
4376 double rows_in_table)
override;
4397 float default_filter)
const;
4449 const char *opt_table_name)
4450 :
super(pos, opt_schema_name, opt_table_name,
"*") {}
4492 bool no_conversions)
override;
4510 bool eq(
const Item *item,
bool binary_cmp)
const override;