61#include "mysqld_error.h" 
  175#define MY_COLL_ALLOW_SUPERSET_CONV 1 
  176#define MY_COLL_ALLOW_COERCIBLE_CONV 2 
  177#define MY_COLL_ALLOW_NONE 4 
  178#define MY_COLL_ALLOW_NUMERIC_CONV 8 
  180#define MY_COLL_CMP_CONV \ 
  181  (MY_COLL_ALLOW_SUPERSET_CONV | MY_COLL_ALLOW_COERCIBLE_CONV) 
  214           uint repertoire_arg) {
 
  299    if (is_null_terminated)
 
  356#define NAME_STRING(x) Name_string(STRING_WITH_LEN(x)) 
  363#define ITEM_TO_QUERY_SUBSTRING_CHAR_LIMIT (300) 
  394  void copy(
const char *str_arg, 
size_t length_arg, 
const CHARSET_INFO *cs_arg,
 
  395            bool is_autogenerated_arg);
 
  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);
 
  947  static void *
operator new(
size_t size) 
noexcept {
 
  948    return (*THR_MALLOC)->Alloc(
size);
 
  951                            const std::nothrow_t &arg
 
  952                            [[maybe_unused]] = std::nothrow) 
noexcept {
 
  956  static void operator delete(
void *ptr [[maybe_unused]],
 
  957                              size_t size [[maybe_unused]]) {
 
  961                              const std::nothrow_t &) 
noexcept {}
 
 1250    if (pc->m_show_parse_tree == 
nullptr || this->m_pos.is_empty())
 
 1265  void 
rename(
char *new_name);
 
 1295                                 [[maybe_unused]]) {}
 
 1327                      bool pin = 
false, 
bool inherit = 
false) {
 
 1365      const Query_block *outer_query_block [[maybe_unused]]) {
 
 1366    return std::nullopt;
 
 1387                                                     bool no_conversions);
 
 1401                                                   bool no_conversions);
 
 1445  virtual bool eq(
const Item *) 
const;
 
 1871                                    bool *incl_endp [[maybe_unused]]) {
 
 2084    my_error(ER_NOT_SUPPORTED_YET, 
MYF(0), 
"item type for JSON");
 
 2116                                     double rows_in_table [[maybe_unused]]) {
 
 2118    assert((read_tables & filter_for_table) == 0);
 
 2249    return decimal_value;
 
 2515  virtual uint64_t 
hash() { 
return 0; }
 
 2528                       const char *used_alias) 
const;
 
 2547                       bool skip_registered);
 
 2695    return (*
reinterpret_cast<std::remove_reference_t<T> *
>(arg))(
this);
 
 2701    return (*
reinterpret_cast<std::remove_reference_t<T> *
>(*arg))(
this);
 
 2772    if ((this->*analyzer)(arg_p)) 
return ((this->*transformer)(arg_t));
 
 2778    (*traverser)(
this, arg);
 
 2796    return *(pointer_cast<Item **>(arg)) == 
this;
 
 2900    table->mark_column_used(field, mark_field->
mark);
 
 2955      assert(root != 
nullptr);
 
 3114    if (*arg) *arg = 
nullptr;
 
 3234  virtual uint 
cols()
 const { 
return 1; }
 
 3402    if (this_context == other_context) {
 
 3599                                   Item **items, uint nitems);
 
 3829                                       [[maybe_unused]])
 const {
 
 3870  return item->
walk(&Item::walk_helper_thunk<T>, walk,
 
 3871                    reinterpret_cast<uchar *
>(&functor));
 
 3879  auto to_const = [&](
const Item *descendant) { 
return functor(descendant); };
 
 3880  return WalkItem(
const_cast<Item *
>(item), walk, to_const);
 
 3890template <
class T, 
class U>
 
 3892  uchar *analyzer_ptr = 
reinterpret_cast<uchar *
>(&analyzer);
 
 3893  return item->
compile(&Item::analyze_helper_thunk<T>, &analyzer_ptr,
 
 3894                       &Item::walk_helper_thunk<U>,
 
 3895                       reinterpret_cast<uchar *
>(&transformer));
 
 3905  return item->
transform(&Item::walk_helper_thunk<T>,
 
 3906                         pointer_cast<uchar *>(&transformer));
 
 3990      Field *field, 
bool no_conversions) 
override;
 
 4004    Field *field, 
bool no_conversions) {
 
 4058  uint64_t 
hash() 
override;
 
 4103  uint64_t 
hash() 
override;
 
 4148  uint64_t 
hash() 
override;
 
 4159                                             bool no_conversions)
 override {
 
 4166                                        Item **items, uint nitems);
 
 4168                       uint nitems, uint 
flags);
 
 4177                                             Item **items, uint nitems) {
 
 4302             const char *table_name_arg, 
const char *field_name_arg)
 
 4315             const char *table_name_arg, 
const char *field_name_arg)
 
 4365  uint64_t 
hash() 
override;
 
 4392             const char *db_name_arg, 
const char *table_name_arg) 
const;
 
 4394  uint64_t 
hash(
const char *db_name_arg, 
const char *table_name_arg);
 
 4430                            bool any_privileges);
 
 4442                      const char *table_name_arg)
 
 4481                                             bool no_conversions) 
override;
 
 4545    assert(item_equal != 
nullptr);
 
 4580             const char *table_name_arg, 
const char *field_name_arg);
 
 4581  Item_field(
const POS &pos, 
const char *db_arg, 
const char *table_name_arg,
 
 4582             const char *field_name_arg);
 
 4590  bool eq(
const Item *item) 
const override;
 
 4647    return pointer_cast<Field *>(arg) == 
field;
 
 4651    auto mark_field = pointer_cast<Mark_field *>(arg);
 
 4719                             double rows_in_table) 
override;
 
 4740                                            float default_filter) 
const;
 
 4798                const char *opt_table_name)
 
 4799      : 
super(pos, opt_schema_name, opt_table_name, 
"*") {}
 
 4838                                             bool no_conversions) 
override;
 
 4856  bool eq(
const Item *item) 
const override;
 
 4875  uint64_t 
hash() 
override;
 
 4887                                             bool no_conversions) 
override;
 
 5147  uint64_t 
hash() 
override;
 
 5159  bool eq(
const Item *item) 
const override;
 
 5185        pointer_cast<Check_function_as_value_generator_parameters *>(args);
 
 5281                 static_cast<uint>(num.
length)) {}
 
 5292                                             bool no_conversions) 
override;
 
 5303    return static_cast<double>(
value);
 
 5317  uint64_t 
hash() 
override;
 
 5325  bool eq(
const Item *item) 
const override;
 
 5354                                             bool no_conversions) 
override;
 
 5393                                             bool no_conversions) 
override;
 
 5420  uint64_t 
hash() 
override;
 
 5432                                             bool no_conversions) 
override;
 
 5438               uint decimal_par, uint 
length);
 
 5462  uint64_t 
hash() 
override;
 
 5469  bool eq(
const Item *item) 
const override;
 
 5498             uint decimal_par, uint 
length)
 
 5520                                             bool no_conversions) 
override;
 
 5530    if (
value <= LLONG_MIN) {
 
 5555  uint64_t 
hash() 
override;
 
 5556  bool eq(
const Item *item) 
const override;
 
 5604                                             bool no_conversions) 
override;
 
 5711  bool eq(
const Item *item) 
const override;
 
 5726  uint64_t 
hash() 
override;
 
 5771                                         const char *cptr, 
const char *
end,
 
 5772                                         int unsigned_target);
 
 5795  uint64_t 
hash() 
override;
 
 5799        pointer_cast<Check_function_as_value_generator_parameters *>(args);
 
 5825        pointer_cast<Check_function_as_value_generator_parameters *>(args);
 
 5865                                             bool no_conversions) 
override;
 
 5902  uint64_t 
hash() 
override;
 
 5903  bool eq(
const Item *item) 
const override;
 
 5990    return llrint(realval);
 
 6015                                             bool no_conversions) 
override;
 
 6031  Item_ref(
const POS &pos, 
const char *db_name_arg, 
const char *table_name_arg,
 
 6032           const char *field_name_arg)
 
 6033      : 
Item_ident(pos, db_name_arg, table_name_arg, field_name_arg) {}
 
 6050           const char *db_name_arg, 
const char *table_name_arg,
 
 6051           const char *field_name_arg, 
bool alias_of_expr_arg = 
false);
 
 6053           const char *field_name_arg);
 
 6105    if (
map != 0) 
return map;
 
 6157    if (order == 
PREFIX) (*traverser)(
this, arg);
 
 6159    if (order == 
POSTFIX) (*traverser)(
this, arg);
 
 6173  uint64_t 
hash() 
override;
 
 6223        pointer_cast<Check_function_as_value_generator_parameters *>(args);
 
 6252                const char *db_name_arg, 
const char *alias_name_arg,
 
 6253                const char *table_name_arg, 
const char *field_name_arg,
 
 6255      : 
Item_ref(context_arg, item, db_name_arg, alias_name_arg,
 
 6262      assert(db_name_arg == 
nullptr);
 
 6287    const Item *inner_item;
 
 6296      inner_item = inner_ref->
ref_item();
 
 6298      inner_ref = down_cast<const Item_ref *>(inner_item);
 
 6302                                  ? down_cast<const Item_field *>(inner_item)
 
 6327    return field != 
nullptr 
 6332  bool eq(
const Item *item) 
const override;
 
 6367                                             bool no_conversions) 
override;
 
 6426                 const char *db_name_arg, 
const char *table_name_arg,
 
 6427                 const char *field_name_arg, 
bool alias_of_expr_arg,
 
 6429      : 
Item_ref(context_arg, item, db_name_arg, table_name_arg, field_name_arg,
 
 6464      : 
super(context_arg, item, 
"", 
"", 
""), 
owner(master) {}
 
 6502                                             bool no_conversions)
 override {
 
 6514  uint64_t 
hash() 
override;
 
 6602  bool cmp() 
override;
 
 6611  bool cmp() 
override;
 
 6619  bool cmp() 
override;
 
 6627  bool cmp() 
override;
 
 6633  bool cmp() 
override;
 
 6644  bool cmp() 
override;
 
 6652  bool cmp() 
override;
 
 6660                                             bool no_conversions) 
override;
 
 6667  bool eq(
const Item *item) 
const override;
 
 6673  uint64_t 
hash() 
override;
 
 6693                          reinterpret_cast<char *
>(args));
 
 6719                                             bool no_conversions)
 override {
 
 6748  bool eq(
const Item *item) 
const override;
 
 6754  uint64_t 
hash() 
override;
 
 6768        pointer_cast<Check_function_as_value_generator_parameters *>(args);
 
 6838  bool eq(
const Item *item) 
const override;
 
 6855        pointer_cast<Check_function_as_value_generator_parameters *>(args);
 
 6873    const bool ret = 
set_value(thd, 
nullptr, it);
 
 6937    if (
example == 
nullptr) 
return;
 
 6965  uint64_t 
hash() 
override;
 
 6969  bool eq(
const Item *item)
 const override { 
return this == item; }
 
 7021        pointer_cast<Check_function_as_value_generator_parameters *>(args);
 
 7139                                             bool no_conversions) 
override;
 
 7362    field->
field = 
true;
 
 7366        pointer_cast<Check_function_as_value_generator_parameters *>(args);
 
 7431                                             bool no_conversions) 
override;
 
 7436  bool eq(
const Item *item) 
const override;
 
 7463  uint64_t 
hash() 
override;
 
 7491    const Item *item, 
const LEX *lex = 
nullptr,
 
 7495  return std::count_if(fields.
begin(), fields.
end(),
 
 7496                       [](
Item *item) { return !item->hidden; });
 
 7500  return std::count_if(fields.
begin(), fields.
end(),
 
 7501                       [](
Item *item) { return item->hidden; });
 
 7506  for (
Item *item : fields) {
 
 7507    if (item->hidden) 
continue;
 
 7508    if (
index-- == 0) 
return item;
 
uint32_t Access_bitmask
Definition: auth_acls.h:34
 
Kerberos Client Authentication nullptr
Definition: auth_kerberos_client_plugin.cc:247
 
A type for SQL-like 3-valued Booleans: true/false/unknown.
Definition: item.h:590
 
value
Definition: item.h:604
 
@ v_UNKNOWN
Definition: item.h:604
 
@ v_FALSE
Definition: item.h:604
 
@ v_TRUE
Definition: item.h:604
 
Bool3(value v)
This is private; instead, use false3()/etc.
Definition: item.h:606
 
static const Bool3 true3()
Definition: item.h:597
 
static const Bool3 unknown3()
Definition: item.h:595
 
static const Bool3 false3()
Definition: item.h:593
 
bool is_true() const
Definition: item.h:599
 
value m_val
Definition: item.h:608
 
bool is_unknown() const
Definition: item.h:600
 
bool is_false() const
Definition: item.h:601
 
bool cmp() override
Compare the value associated with the item with the stored value.
Definition: item_buff.cc:221
 
Cached_item_decimal(Item *item_par)
Definition: item.h:6651
 
my_decimal value
Definition: item.h:6648
 
longlong value
Definition: item.h:6623
 
bool cmp() override
Compare the value associated with the item with the stored value.
Definition: item_buff.cc:160
 
Cached_item_int(Item *item_par)
Definition: item.h:6626
 
Cached_item subclass for JSON values.
Definition: item.h:6606
 
Json_wrapper * m_value
The cached JSON value.
Definition: item.h:6607
 
~Cached_item_json() override
Definition: item_buff.cc:106
 
Cached_item_json(Item *item)
Definition: item_buff.cc:103
 
bool cmp() override
Compare the new JSON value in member 'item' with the previous value.
Definition: item_buff.cc:116
 
Cached_item_real(Item *item_par)
Definition: item.h:6618
 
bool cmp() override
Compare the value associated with the item with the stored value.
Definition: item_buff.cc:144
 
double value
Definition: item.h:6615
 
String tmp_value
Definition: item.h:6598
 
Cached_item_str(Item *arg)
Definition: item.h:6601
 
bool cmp() override
Compare the value associated with the item with the stored value.
Definition: item_buff.cc:83
 
String value
Definition: item.h:6597
 
Cached_item_temporal(Item *item_par)
Definition: item.h:6643
 
bool cmp() override
Compare the value associated with the item with the stored value.
Definition: item_buff.cc:194
 
longlong value
Definition: item.h:6640
 
Cached_item_time(Item *item_par)
Definition: item.h:6632
 
bool cmp() override
Compare the value associated with the item with the stored value.
Definition: item_buff.cc:177
 
Time_val m_time
Definition: item.h:6636
 
This is used for segregating rows in groups (e.g.
Definition: item.h:6572
 
Item ** get_item_ptr()
Definition: item.h:6591
 
Item * item
The item whose value to cache.
Definition: item.h:6574
 
virtual ~Cached_item()=default
 
Item * get_item() const
Definition: item.h:6590
 
virtual bool cmp()=0
Compare the value associated with the item with the stored value.
 
Cached_item(Item *i)
Definition: item.h:6575
 
bool null_value
Definition: item.h:6578
 
This class represents the cost of evaluating an Item.
Definition: item.h:789
 
bool m_is_expensive
True if the associated Item calls user defined functions or stored procedures.
Definition: item.h:844
 
double FieldCost() const
Get the cost of field access when evaluating the Item associated with this object.
Definition: item.h:826
 
uint8 m_other_fields
The number of other Field objects accessed by the associated Item.
Definition: item.h:850
 
void Compute(const Item &item)
Set '*this' to represent the cost of 'item'.
Definition: item.h:792
 
static constexpr double kStrFieldCost
The cost of accessing a Field_str, relative to other Field types.
Definition: item.h:834
 
uint8 m_str_fields
The number of Field_str objects accessed by the associated Item.
Definition: item.h:847
 
bool IsExpensive() const
Definition: item.h:815
 
void AddFieldCost()
Add the cost of accessing any other Field.
Definition: item.h:810
 
bool m_computed
True if 'ComputeInternal()' has been called.
Definition: item.h:840
 
void ComputeInternal(const Item &root)
Compute the cost of 'root' and its descendants.
Definition: item.cc:138
 
static constexpr double kOtherFieldCost
The cost of accessing a Field other than Field_str. 1.0 by definition.
Definition: item.h:837
 
void AddStrFieldCost()
Add the cost of accessing a Field_str.
Definition: item.h:804
 
void MarkExpensive()
Definition: item.h:798
 
void set(Derivation derivation_arg)
Definition: item.h:228
 
DTCollation(const CHARSET_INFO *collation_arg, Derivation derivation_arg)
Definition: item.h:198
 
void set_repertoire_from_charset(const CHARSET_INFO *cs)
Definition: item.h:189
 
bool aggregate(DTCollation &dt, uint flags=0)
Aggregate two collations together taking into account their coercibility (aka derivation).
Definition: item.cc:2669
 
void set(const DTCollation &dt)
Definition: item.h:203
 
DTCollation()
Definition: item.h:193
 
void set(const CHARSET_INFO *collation_arg, Derivation derivation_arg, uint repertoire_arg)
Definition: item.h:213
 
bool set(DTCollation &dt1, DTCollation &dt2, uint flags=0)
Definition: item.h:231
 
void set_numeric()
Definition: item.h:219
 
void set_repertoire(uint repertoire_arg)
Definition: item.h:229
 
const CHARSET_INFO * collation
Definition: item.h:185
 
Derivation derivation
Definition: item.h:186
 
const char * derivation_name() const
Definition: item.h:235
 
void set(const CHARSET_INFO *collation_arg, Derivation derivation_arg)
Definition: item.h:208
 
uint repertoire
Definition: item.h:187
 
void set(const CHARSET_INFO *collation_arg)
Definition: item.h:224
 
Definition: my_temporal.h:395
 
Definition: my_temporal.h:339
 
A field that stores a JSON value.
Definition: field.h:3835
 
const CHARSET_INFO * charset_for_protocol() const
Definition: field.h:1573
 
virtual Item_result cast_to_int_type() const
Definition: field.h:1020
 
static constexpr size_t MAX_LONG_BLOB_WIDTH
Definition: field.h:732
 
virtual bool is_array() const
Whether the field is a typed array.
Definition: field.h:1776
 
static constexpr size_t MAX_VARCHAR_WIDTH
Definition: field.h:726
 
const char * field_name
Definition: field.h:681
 
virtual void add_to_cost(CostOfItem *cost) const
Update '*cost' with the fact that this Field is accessed.
Definition: field.cc:1403
 
virtual uint32 max_display_length() const =0
 
TABLE * table
Pointer to TABLE object that owns this field.
Definition: field.h:676
 
bool is_null(ptrdiff_t row_offset=0) const
Check whether the full table's row is NULL or the Field has value NULL.
Definition: field.h:1200
 
virtual my_decimal * val_decimal(my_decimal *) const =0
 
bool is_tmp_nullable() const
Definition: field.h:906
 
virtual double val_real() const =0
 
virtual bool val_date(Date_val *date, my_time_flags_t flags) const
Definition: field.cc:2286
 
virtual longlong val_int() const =0
 
virtual Item_result numeric_context_result_type() const
Returns Item_result type of a field when it appears in numeric context such as: SELECT time_column + ...
Definition: field.h:1016
 
virtual bool eq_def(const Field *field) const
Definition: field.cc:8447
 
geometry_type
Definition: field.h:713
 
@ GEOM_GEOMETRY
Definition: field.h:714
 
virtual bool val_time(Time_val *time) const
Definition: field.cc:2302
 
virtual Item_result result_type() const =0
 
bool is_nullable() const
Definition: field.h:1273
 
virtual bool val_datetime(Datetime_val *dt, my_time_flags_t flags) const
Definition: field.cc:2294
 
virtual geometry_type get_geometry_type() const
Definition: field.h:1656
 
static Item_result result_merge_type(enum_field_types)
Detect Item_result by given field type of UNION merge result.
Definition: field.cc:1522
 
String * val_str(String *str) const
Definition: field.h:985
 
bool is_field_for_functional_index() const
Definition: field.h:872
 
static constexpr size_t MAX_MEDIUM_BLOB_WIDTH
Definition: field.h:731
 
void dbug_print() const
Definition: field.h:1663
 
Context object for (functions that override) Item::clean_up_after_removal().
Definition: item.h:2952
 
Query_block *const m_root
Pointer to Cleanup_after_removal_context containing from which select the walk started,...
Definition: item.h:2966
 
Cleanup_after_removal_context(Query_block *root)
Definition: item.h:2954
 
Query_block * get_root()
Definition: item.h:2958
 
List< Item > * m_items
Definition: item.h:2804
 
Collect_item_fields_or_refs(List< Item > *fields_or_refs)
Definition: item.h:2805
 
Collect_item_fields_or_refs(const Collect_item_fields_or_refs &)=delete
 
Collect_item_fields_or_refs & operator=(const Collect_item_fields_or_refs &)=delete
 
Collect_item_fields_or_view_refs(const Collect_item_fields_or_view_refs &)=delete
 
Query_block * m_transformed_block
Definition: item.h:2819
 
List< Item > * m_item_fields_or_view_refs
Definition: item.h:2818
 
Collect_item_fields_or_view_refs(List< Item > *fields_or_vr, Query_block *transformed_block)
Definition: item.h:2823
 
uint m_any_value_level
Used to compute Item_field's m_protected_by_any_value.
Definition: item.h:2822
 
Collect_item_fields_or_view_refs & operator=(const Collect_item_fields_or_view_refs &)=delete
 
Interface for storing an aggregation of type and type specification of multiple Item objects.
Definition: item.h:7332
 
longlong val_int() override=0
 
Item_result result_type() const override
Return expression type of Item_aggregate_type.
Definition: item.cc:10844
 
bool val_date(Date_val *, my_time_flags_t) override=0
Evaluate the item and return result as a date value.
 
my_decimal * val_decimal(my_decimal *) override=0
 
bool val_datetime(Datetime_val *dt, my_time_flags_t flags) override=0
Evaluate the item and return result as a datetime value.
 
void set_typelib(Item *item)
Set typelib information for an aggregated enum/set field.
Definition: item.cc:11117
 
Item_aggregate_type(THD *, Item *)
Definition: item.cc:10825
 
String * val_str(String *) override=0
 
bool check_function_as_value_generator(uchar *args) override
Check if this item is allowed for a virtual column or inside a default expression.
Definition: item.h:7364
 
static uint32 display_length(Item *item)
Calculate length for merging result for given Item type.
Definition: item.cc:10999
 
bool val_time(Time_val *time) override=0
Evaluate the item and return result as a time value.
 
void make_field(Send_field *field) override
Definition: item.h:7359
 
Field * make_field_by_type(TABLE *table, bool strict)
Make temporary table field according collected information about type of UNION result.
Definition: item.cc:11062
 
double val_real() override=0
 
Field::geometry_type get_geometry_type() const override
Definition: item.h:7356
 
TYPELIB * m_typelib
Typelib information, only used for data type ENUM and SET.
Definition: item.h:7335
 
bool unify_types(Item *item)
Unify type from given item with the type in the current item.
Definition: item.cc:10958
 
Field::geometry_type geometry_type
Geometry type, only used for data type GEOMETRY.
Definition: item.h:7337
 
Represents [schema.
Definition: item.h:4786
 
bool is_asterisk() const override
Checks if the current object represents an asterisk select list item.
Definition: item.h:4806
 
Item_asterisk(const POS &pos, const char *opt_schema_name, const char *opt_table_name)
Constructor.
Definition: item.h:4797
 
Item_field super
Definition: item.h:4787
 
bool fix_fields(THD *, Item **) override
Resolve the name of a column reference.
Definition: item.h:4802
 
bool do_itemize(Parse_context *pc, Item **res) override
The core function that does the actual itemization.
Definition: item.cc:11555
 
Item_basic_constant(const POS &pos)
Definition: item.h:3914
 
void cleanup() override
Called for every Item after use (preparation and execution).
Definition: item.h:3923
 
void set_str_value(String *str)
Note that str_value.ptr() will now point to a string owned by some other object.
Definition: item.h:3935
 
bool basic_const_item() const override
Returns true if this is a simple constant item like an integer, not a constant expression.
Definition: item.h:3930
 
void set_used_tables(table_map map)
Definition: item.h:3919
 
table_map used_table_map
Definition: item.h:3910
 
bool check_function_as_value_generator(uchar *) override
Check if this item is allowed for a virtual column or inside a default expression.
Definition: item.h:3921
 
Item_basic_constant()
Definition: item.h:3913
 
table_map used_tables() const override
Definition: item.h:3920
 
Item_bin_string(const char *str, size_t str_length)
Definition: item.h:5916
 
void bin_string_init(const char *str, size_t str_length)
Definition: item.cc:7691
 
static LEX_CSTRING make_bin_str(const char *str, size_t str_length)
Definition: item.cc:7661
 
Item_hex_string super
Definition: item.h:5913
 
Item_bin_string(const POS &pos, const LEX_STRING &literal)
Definition: item.h:5919
 
Item_blob(const char *name, size_t length)
Definition: item.h:5817
 
enum Type type() const override
Definition: item.h:5822
 
bool check_function_as_value_generator(uchar *args) override
Check if this item is allowed for a virtual column or inside a default expression.
Definition: item.h:5823
 
Cache class for BIT type expressions.
Definition: item.h:7071
 
Item_cache_bit(enum_field_types field_type_arg)
Definition: item.h:7073
 
uint string_length()
Definition: item.h:7083
 
String * val_str(String *str) override
Transform the result Item_cache_int::value in bit format.
Definition: item.cc:10177
 
longlong val_int() override
Definition: item.cc:10437
 
longlong int_value
Used for DATE and DATETIME values.
Definition: item.h:7290
 
longlong val_date_temporal() override
Return date value of item in packed longlong format.
Definition: item.cc:10428
 
bool cache_value() override
Definition: item.cc:10284
 
my_decimal * val_decimal(my_decimal *) override
Definition: item.cc:10343
 
void store_value(Item *item, longlong val_arg)
Definition: item.cc:10301
 
bool val_time(Time_val *time) override
Evaluate the item and return result as a time value.
Definition: item.cc:10398
 
bool val_date(Date_val *date, my_time_flags_t flags) override
Evaluate the item and return result as a date value.
Definition: item.cc:10363
 
String * val_str(String *str) override
Definition: item.cc:10314
 
bool str_value_cached
If true, cached_string contains a valid value.
Definition: item.h:7294
 
Item_result result_type() const override
Definition: item.h:7273
 
void clear() override
Definition: item.h:7283
 
String cached_string
Used when required in a string context.
Definition: item.h:7292
 
void store(Item *item) override
Assigns to the cache the expression to be cached.
Definition: item.cc:10309
 
bool val_datetime(Datetime_val *dt, my_time_flags_t flags) override
Evaluate the item and return result as a datetime value.
Definition: item.cc:10367
 
bool cache_value_int()
Definition: item.cc:10268
 
Item_cache_datetime(enum_field_types field_type_arg)
Definition: item.h:7257
 
double val_real() override
Definition: item.cc:10426
 
double val_real() override
Definition: item.cc:10621
 
my_decimal decimal_value
Definition: item.h:7129
 
bool cache_value() override
Definition: item.cc:10605
 
longlong val_int() override
Definition: item.cc:10629
 
Item_cache_decimal()
Definition: item.h:7111
 
String * val_str(String *str) override
Definition: item.cc:10637
 
bool val_date(Date_val *date, my_time_flags_t flags) override
Evaluate the item and return result as a date value.
Definition: item.h:7117
 
void store_value(Item *expr, my_decimal *d)
Definition: item.cc:10614
 
my_decimal * val_decimal(my_decimal *) override
Definition: item.cc:10646
 
bool val_datetime(Datetime_val *dt, my_time_flags_t flags) override
Evaluate the item and return result as a datetime value.
Definition: item.h:7121
 
Item_result result_type() const override
Definition: item.h:7124
 
bool val_time(Time_val *time) override
Evaluate the item and return result as a time value.
Definition: item.h:7120
 
bool val_time(Time_val *time) override
Evaluate the item and return result as a time value.
Definition: item.h:7054
 
double val_real() override
Definition: item.cc:10164
 
longlong val_int() override
Definition: item.cc:10171
 
bool val_date(Date_val *date, my_time_flags_t flags) override
Evaluate the item and return result as a date value.
Definition: item.h:7051
 
longlong value
Definition: item.h:7062
 
Item_cache_int(enum_field_types field_type_arg)
Definition: item.h:7038
 
longlong val_date_temporal() override
Return date value of item in packed longlong format.
Definition: item.h:7048
 
Item_result result_type() const override
Definition: item.h:7058
 
Item_cache_int()
Definition: item.h:7037
 
bool cache_value() override
Definition: item.cc:10133
 
my_decimal * val_decimal(my_decimal *) override
Definition: item.cc:10157
 
void store_value(Item *item, longlong val_arg)
Unlike store(), this stores an explicitly provided value, not the one of 'item'; however,...
Definition: item.cc:10142
 
bool val_datetime(Datetime_val *dt, my_time_flags_t flags) override
Evaluate the item and return result as a datetime value.
Definition: item.h:7055
 
String * val_str(String *str) override
Definition: item.cc:10150
 
An item cache for values of type JSON.
Definition: item.h:7298
 
bool val_date(Date_val *date, my_time_flags_t flags) override
Evaluate the item and return result as a date value.
Definition: item.cc:10521
 
Item_result result_type() const override
Definition: item.h:7312
 
bool val_time(Time_val *time) override
Evaluate the item and return result as a time value.
Definition: item.cc:10537
 
my_decimal * val_decimal(my_decimal *val) override
Definition: item.cc:10510
 
bool m_is_sorted
Whether the cached value is array and it is sorted.
Definition: item.h:7302
 
Json_wrapper * m_value
Cached value.
Definition: item.h:7300
 
bool cache_value() override
Read the JSON value and cache it.
Definition: item.cc:10452
 
Item_cache_json()
Definition: item.cc:10439
 
bool val_datetime(Datetime_val *dt, my_time_flags_t flags) override
Evaluate the item and return result as a datetime value.
Definition: item.cc:10525
 
~Item_cache_json() override
Definition: item.cc:10444
 
bool val_json(Json_wrapper *wr) override
Copy the cached JSON value into a wrapper.
Definition: item.cc:10485
 
bool is_sorted()
Returns true when cached value is array and it's sorted.
Definition: item.h:7322
 
void store_value(Item *expr, Json_wrapper *wr)
Definition: item.cc:10469
 
double val_real() override
Definition: item.cc:10500
 
String * val_str(String *str) override
Definition: item.cc:10490
 
void sort()
Sort cached data. Only arrays are affected.
Definition: item.cc:10557
 
longlong val_int() override
Definition: item.cc:10548
 
bool val_date(Date_val *date, my_time_flags_t flags) override
Evaluate the item and return result as a date value.
Definition: item.h:7094
 
Item_cache_real()
Definition: item.h:7088
 
void store_value(Item *expr, double value)
Definition: item.cc:10573
 
double value
Definition: item.h:7106
 
bool val_time(Time_val *time) override
Evaluate the item and return result as a time value.
Definition: item.h:7097
 
bool val_datetime(Datetime_val *dt, my_time_flags_t flags) override
Evaluate the item and return result as a datetime value.
Definition: item.h:7098
 
my_decimal * val_decimal(my_decimal *) override
Definition: item.cc:10598
 
bool cache_value() override
Definition: item.cc:10565
 
Item_result result_type() const override
Definition: item.h:7101
 
double val_real() override
Definition: item.cc:10579
 
String * val_str(String *str) override
Definition: item.cc:10591
 
longlong val_int() override
Definition: item.cc:10585
 
Item * element_index(uint i) override
Definition: item.h:7214
 
longlong val_int() override
Definition: item.h:7187
 
bool val_datetime(Datetime_val *, my_time_flags_t) override
Evaluate the item and return result as a datetime value.
Definition: item.h:7207
 
double val_real() override
Definition: item.h:7183
 
bool null_inside() override
Definition: item.cc:10807
 
Item_result result_type() const override
Definition: item.h:7211
 
Item ** addr(uint i) override
Definition: item.h:7215
 
bool allocate(uint num) override
'allocate' is only used in Item_cache_row::setup()
Definition: item.cc:10737
 
Item_cache_row()
Definition: item.h:7169
 
void bring_value() override
Definition: item.cc:10818
 
my_decimal * val_decimal(my_decimal *) override
Definition: item.h:7195
 
void make_field(Send_field *) override
Definition: item.h:7182
 
void illegal_method_call(const char *) const
Definition: item.cc:10791
 
uint item_count
Definition: item.h:7224
 
bool check_cols(uint c) override
Definition: item.cc:10799
 
bool val_date(Date_val *, my_time_flags_t) override
Evaluate the item and return result as a date value.
Definition: item.h:7199
 
bool cache_value() override
Definition: item.cc:10768
 
uint cols() const override
Definition: item.h:7213
 
bool setup(Item *item) override
Definition: item.cc:10744
 
void store(Item *item) override
Assigns to the cache the expression to be cached.
Definition: item.cc:10757
 
bool val_time(Time_val *) override
Evaluate the item and return result as a time value.
Definition: item.h:7203
 
void cleanup() override
Called for every Item after use (preparation and execution).
Definition: item.h:7219
 
Item_cache ** values
Definition: item.h:7223
 
String * val_str(String *) override
Definition: item.h:7191
 
type_conversion_status save_in_field_inner(Field *field, bool no_conversions) override
Helper function which does all of the work for save_in_field(Field*, bool), except some error checkin...
Definition: item.cc:10723
 
bool cache_value() override
Definition: item.cc:10652
 
Item_result result_type() const override
Definition: item.h:7161
 
void store_value(Item *expr, String &s)
Definition: item.cc:10674
 
String value_buff
Definition: item.h:7134
 
my_decimal * val_decimal(my_decimal *) override
Definition: item.cc:10712
 
const CHARSET_INFO * charset() const
Definition: item.h:7162
 
bool val_date(Date_val *date, my_time_flags_t flags) override
Evaluate the item and return result as a date value.
Definition: item.h:7154
 
double val_real() override
Definition: item.cc:10684
 
bool val_datetime(Datetime_val *dt, my_time_flags_t flags) override
Evaluate the item and return result as a datetime value.
Definition: item.h:7158
 
String * val_str(String *) override
Definition: item.cc:10706
 
longlong val_int() override
Definition: item.cc:10695
 
char buffer[STRING_BUFFER_USUAL_SIZE]
Definition: item.h:7133
 
bool val_time(Time_val *time) override
Evaluate the item and return result as a time value.
Definition: item.h:7157
 
String * value
Definition: item.h:7134
 
bool is_varbinary
Definition: item.h:7135
 
Item_cache_str(const Item *item)
Definition: item.h:7142
 
bool val_time(Time_val *time) override
Evaluate the item and return result as a time value.
Definition: item.cc:10247
 
bool val_date(Date_val *date, my_time_flags_t flags) override
Evaluate the item and return result as a date value.
Definition: item.cc:10232
 
Item_cache_time()
Definition: item.h:7229
 
void store(Item *item) override
Assigns to the cache the expression to be cached.
Definition: item.cc:10222
 
bool val_datetime(Datetime_val *dt, my_time_flags_t flags) override
Evaluate the item and return result as a datetime value.
Definition: item.cc:10236
 
bool cache_value() override
Definition: item.cc:10193
 
Item_result result_type() const override
Definition: item.h:7242
 
Time_val time_value
Definition: item.h:7252
 
void store_value(Time_val time)
Cache a single non-NULL time value.
Definition: item.cc:10202
 
String * val_str(String *str) override
Definition: item.cc:10209
 
longlong val_date_temporal() override
Return date value of item in packed longlong format.
Definition: item.cc:10260
 
longlong val_int() override
Definition: item.cc:10256
 
my_decimal * val_decimal(my_decimal *) override
Definition: item.cc:10224
 
double val_real() override
Definition: item.cc:10258
 
bool walk(Item_processor processor, enum_walk walk, uchar *arg) override
Traverses a tree of Items in prefix and/or postfix order.
Definition: item.cc:10104
 
void cleanup() override
Called for every Item after use (preparation and execution).
Definition: item.cc:10122
 
Field * field()
If this item caches a field value, return pointer to underlying field.
Definition: item.h:6982
 
Item * get_example() const
Definition: item.h:7031
 
bool eq_def(const Field *field)
Definition: item.h:6966
 
Item_field * cached_field
Field that this object will get value from.
Definition: item.h:6908
 
virtual bool allocate(uint)
Definition: item.h:6942
 
Item ** get_example_ptr()
Definition: item.h:7032
 
bool is_non_const_over_literals(uchar *) override
Definition: item.h:7018
 
bool has_value()
Check if saved item has a non-NULL value.
Definition: item.cc:10110
 
Item_result result_type() const override
Definition: item.h:7027
 
friend bool has_rollup_result(Item *item)
Checks if an item has a ROLLUP NULL which needs to be written to temp table.
Definition: sql_executor.cc:371
 
bool basic_const_item() const override
Returns true if this is a simple constant item like an integer, not a constant expression.
Definition: item.h:7007
 
uint64_t hash() override
Generate hash unique to an item depending on its attributes.
Definition: item.cc:10097
 
bool eq(const Item *item) const override
Compare this item with another item for equality.
Definition: item.h:6969
 
void fix_after_pullout(Query_block *parent_query_block, Query_block *removed_query_block) override
Fix after tables have been moved from one query_block level to the parent level, e....
Definition: item.h:6935
 
virtual bool cache_value()=0
 
void store_null()
Force an item to be null.
Definition: item.h:6995
 
Item_cache(enum_field_types field_type_arg)
Definition: item.h:6928
 
table_map used_table_map
Definition: item.h:6902
 
enum Type type() const override
Definition: item.h:6959
 
Item_cache()
Definition: item.h:6923
 
virtual void store(Item *item)
Assigns to the cache the expression to be cached.
Definition: item.cc:10073
 
virtual bool setup(Item *item)
Definition: item.h:6943
 
bool value_cached
Definition: item.h:6916
 
table_map used_tables() const override
Definition: item.h:6962
 
bool is_null() override
The method allows to determine nullness of a complex expression without fully evaluating it,...
Definition: item.h:7015
 
virtual void clear()
Definition: item.h:7011
 
bool check_function_as_value_generator(uchar *args) override
Check if this item is allowed for a virtual column or inside a default expression.
Definition: item.h:7019
 
Item * example
Definition: item.h:6901
 
friend bool replace_contents_of_rollup_wrappers_with_tmp_fields(THD *thd, Query_block *select, Item *item_arg)
For each rollup wrapper below the given item, replace its argument with a temporary field,...
Definition: sql_executor.cc:4557
 
static Item_cache * get_cache(const Item *item)
Definition: item.cc:10027
 
void print(const THD *thd, String *str, enum_query_type query_type) const override
This method is used for to:
Definition: item.cc:10087
 
bool store_and_cache(Item *item)
Definition: item.h:7002
 
uint m_case_expr_id
Definition: item.h:4106
 
Type type() const override
Definition: item.h:4091
 
Item * this_item() override
Definition: item.cc:2041
 
Item_case_expr(uint case_expr_id)
Definition: item.cc:2037
 
uint64_t hash() override
Generate hash unique to an item depending on its attributes.
Definition: item.cc:2066
 
Item ** this_item_addr(THD *thd, Item **) override
Definition: item.cc:2053
 
void print(const THD *thd, String *str, enum_query_type query_type) const override
This method is used for to:
Definition: item.cc:2059
 
Item_result result_type() const override
Definition: item.h:4092
 
longlong val_date_temporal() override
Return date value of item in packed longlong format.
Definition: item.h:6563
 
Item_datetime_with_ref(enum_field_types field_type_arg, uint8 decimals_arg, longlong i, Item *ref_arg)
Constructor for Item_datetime_with_ref.
Definition: item.h:6558
 
Item * clone_item() const override
Definition: item.cc:7330
 
uint64_t hash() override
Generate hash unique to an item depending on its attributes.
Definition: item.cc:3703
 
bool val_datetime(Datetime_val *dt, my_time_flags_t flags) override
Evaluate the item and return result as a datetime value.
Definition: item.h:5454
 
uint decimal_precision() const override
Definition: item.h:5468
 
String * val_str(String *) override
Definition: item.cc:3673
 
void print(const THD *thd, String *str, enum_query_type query_type) const override
This method is used for to:
Definition: item.cc:3679
 
bool eq(const Item *item) const override
Compare this item with another item for equality.
Definition: item.cc:3705
 
Item_result result_type() const override
Definition: item.h:5445
 
longlong val_int() override
Definition: item.cc:3661
 
bool val_date(Date_val *date, my_time_flags_t flags) override
Evaluate the item and return result as a date value.
Definition: item.h:5450
 
enum Type type() const override
Definition: item.h:5444
 
my_decimal * val_decimal(my_decimal *) override
Definition: item.h:5449
 
my_decimal decimal_value
Definition: item.h:5430
 
double val_real() override
Definition: item.cc:3667
 
bool check_partition_func_processor(uchar *) override
Check if a partition function is allowed.
Definition: item.h:5471
 
type_conversion_status save_in_field_inner(Field *field, bool no_conversions) override
Helper function which does all of the work for save_in_field(Field*, bool), except some error checkin...
Definition: item.cc:7299
 
Item_num super
Definition: item.h:5427
 
Item_decimal(const POS &pos, const char *str_arg, uint length, const CHARSET_INFO *charset)
Definition: item.cc:3602
 
Item * clone_item() const override
Definition: item.h:5457
 
Item_num * neg() override
Definition: item.h:5463
 
bool val_time(Time_val *time) override
Evaluate the item and return result as a time value.
Definition: item.h:5453
 
void set_decimal_value(const my_decimal *value_par)
Definition: item.cc:3720
 
uint64_t hash() override
Generate hash unique to an item depending on its attributes.
Definition: item.cc:9448
 
Item * transform(Item_transformer transformer, uchar *args) override
Perform a generic transformation of the Item tree, by adding zero or more additional Item objects to ...
Definition: item.cc:9497
 
type_conversion_status save_in_field_inner(Field *field, bool no_conversions) override
Helper function which does all of the work for save_in_field(Field*, bool), except some error checkin...
Definition: item.cc:9453
 
void print(const THD *thd, String *str, enum_query_type query_type) const override
This method is used for to:
Definition: item.cc:9437
 
bool do_itemize(Parse_context *pc, Item **res) override
The core function that does the actual itemization.
Definition: item.cc:9356
 
Item_default_value(const POS &pos, Item *a=nullptr)
Definition: item.h:6663
 
void bind_fields() override
Bind objects from the current execution context to field objects in item trees.
Definition: item.cc:9427
 
bool walk(Item_processor processor, enum_walk walk, uchar *args) override
Traverses a tree of Items in prefix and/or postfix order.
Definition: item.h:6685
 
Item_field super
Definition: item.h:6656
 
bool check_column_privileges(uchar *) override
Check privileges of base table column.
Definition: item.h:6683
 
table_map used_tables() const override
Definition: item.h:6674
 
bool check_gcol_depend_default_processor(uchar *args) override
Check if a generated expression depends on DEFAULT function with specific column name as argument.
Definition: item.h:6691
 
Item * arg
The argument for this function.
Definition: item.h:6701
 
bool collect_item_field_or_view_ref_processor(uchar *arg) override
Collects fields and view references that have the qualifying table in the specified query block.
Definition: item.cc:6574
 
Item * argument() const
Definition: item.h:6697
 
uchar * m_rowbuffer_saved
Pointer to row buffer that was used to calculate field value offset.
Definition: item.h:6703
 
bool fix_fields(THD *, Item **) override
Resolve the name of a column reference.
Definition: item.cc:9377
 
enum Type type() const override
Definition: item.h:6666
 
Item * replace_item_field(uchar *) override
If this default value is the target of replacement, replace it with the info object's item or,...
Definition: item.cc:6598
 
Item * get_tmp_table_item(THD *thd) override
If an Item is materialized in a temporary table, a different Item may have to be used in the part of ...
Definition: item.h:6675
 
bool eq(const Item *item) const override
Compare this item with another item for equality.
Definition: item.cc:9372
 
void cleanup() override
Called for every Item after use (preparation and execution).
Definition: item.h:6670
 
Item_empty_string – is a utility class to put an item into List<Item> which is then used in protocol....
Definition: item.h:5837
 
void make_field(Send_field *field) override
Definition: item.cc:6703
 
Item_empty_string(const char *header, size_t length, const CHARSET_INFO *cs=nullptr)
Definition: item.h:5839
 
Item * replace_equal_field(uchar *) override
Replace an Item_field for an equal Item_field that evaluated earlier (if any).
Definition: item.cc:6644
 
bool protected_by_any_value() const
See m_protected_by_any_value.
Definition: item.h:4768
 
bool check_column_privileges(uchar *arg) override
Check privileges of base table column.
Definition: item.cc:1364
 
bool collect_outer_field_processor(uchar *arg) override
Definition: item.cc:985
 
bool collect_item_field_or_ref_processor(uchar *arg) override
When collecting information about columns when transforming correlated scalar subqueries using derive...
Definition: item.cc:1017
 
bool check_column_in_window_functions(uchar *arg) override
Check if this column is found in PARTITION clause of all the window functions.
Definition: item.cc:1198
 
bool find_field_processor(uchar *arg) override
Is this an Item_field which references the given Field argument?
Definition: item.h:4646
 
bool alias_name_used() const override
Definition: item.h:4746
 
bool any_privileges
Definition: item.h:4573
 
bool check_partition_func_processor(uchar *) override
Check if a partition function is allowed.
Definition: item.h:4659
 
void set_item_equal_all_join_nests(Item_multi_eq *item_equal)
Definition: item.h:4544
 
bool val_time(Time_val *time) override
Evaluate the item and return result as a time value.
Definition: item.cc:3361
 
enum Type type() const override
Definition: item.h:4589
 
bool add_field_to_cond_set_processor(uchar *) override
Item::walk function.
Definition: item.cc:1064
 
Item_result numeric_context_result_type() const override
Result type when an item appear in a numeric context.
Definition: item.h:4605
 
Item_multi_eq * multi_equality() const
Definition: item.h:4542
 
bool val_datetime(Datetime_val *dt, my_time_flags_t flags) override
Evaluate the item and return result as a datetime value.
Definition: item.cc:3351
 
void set_field(Field *field)
Definition: item.cc:3143
 
bool val_date(Date_val *date, my_time_flags_t flags) override
Evaluate the item and return result as a date value.
Definition: item.cc:3347
 
Item_result cast_to_int_type() const override
Definition: item.h:4609
 
void set_item_was_sp_local_variable()
Sets m_was_sp_local_variable to true.
Definition: item.h:4552
 
const Item_field * base_item_field() const
Definition: item.h:4623
 
bool collect_item_field_processor(uchar *arg) override
Store the pointer to this item field into a list if not already there.
Definition: item.cc:973
 
Item_multi_eq * find_multi_equality(COND_EQUAL *cond_equal) const
Find a field among specified multiple equalities.
Definition: item.cc:6403
 
Item * replace_with_derived_expr_ref(uchar *arg) override
Assuming this expression is part of a condition that would be pushed to the HAVING clause of a materi...
Definition: item.cc:1262
 
uint16 field_index
Index for this field in table->field array.
Definition: item.h:4541
 
const CHARSET_INFO * charset_for_protocol(void) override
Definition: item.h:4692
 
bool subst_argument_checker(uchar **arg) override
Check whether a field can be substituted by an equal item.
Definition: item.cc:6447
 
void print(const THD *thd, String *str, enum_query_type query_type) const override
This method is used for to:
Definition: item.cc:8385
 
Field * result_field
Result field.
Definition: item.h:4489
 
Item_multi_eq * item_equal_all_join_nests
Definition: item.h:4563
 
Item_result result_type() const override
Definition: item.h:4604
 
uint32 max_disp_length()
Definition: item.h:4677
 
void dbug_print() const
Definition: item.h:4697
 
double val_real() override
Definition: item.cc:3317
 
bool find_item_in_field_list_processor(uchar *arg) override
Check if an Item_field references some field from a list of fields.
Definition: item.cc:1093
 
void save_org_in_field(Field *field) override
Set a field's value from a item.
Definition: item.cc:7004
 
void make_field(Send_field *tmp_field) override
Definition: item.cc:6950
 
void set_base_item_field(const Item_field *item)
Definition: item.h:4619
 
bool get_timeval(my_timeval *tm, int *warnings) override
Get timestamp in "struct timeval" format.
Definition: item.cc:3371
 
enum_monotonicity_info get_monotonicity_info() const override
Definition: item.h:4612
 
float get_cond_filter_default_probability(double max_distinct_values, float default_filter) const
Returns the probability for the predicate "col OP <val>" to be true for a row in the case where no in...
Definition: item.cc:8426
 
Item_field * field_for_view_update() override
Definition: item.h:4678
 
const Item_field * m_base_item_field
If this field is derived from another field, e.g.
Definition: item.h:4511
 
void set_result_field(Field *field_arg) override
Definition: item.h:4616
 
bool send(Protocol *protocol, String *str_arg) override
This is only called from items that is not of type item_field.
Definition: item.cc:8350
 
table_map used_tables() const override
Definition: item.cc:3415
 
bool is_null() override
The method allows to determine nullness of a complex expression without fully evaluating it,...
Definition: item.h:4630
 
void reset_field()
Reset all aspect of a field object, so that it can be re-resolved.
Definition: item.cc:6375
 
Field * field
Source field.
Definition: item.h:4485
 
void compute_cost(CostOfItem *root_cost) const override
Compute the cost of evaluating this Item.
Definition: item.h:4770
 
Item_multi_eq * m_multi_equality
Holds a list of items whose values must be equal to the value of this field, during execution.
Definition: item.h:4527
 
Item * update_value_transformer(uchar *select_arg) override
Add the field to the select list and substitute it for the reference to the field.
Definition: item.cc:8371
 
bool check_column_in_group_by(uchar *arg) override
Check if this column is found in GROUP BY.
Definition: item.cc:1232
 
uint32_t last_org_destination_field_memcpyable
Definition: item.h:4503
 
bool returns_array() const override
Whether the item returns array of its data type.
Definition: item.h:4753
 
Item * replace_item_field(uchar *) override
If this field is the target is the target of replacement, replace it with the info object's item or,...
Definition: item.cc:6548
 
longlong val_date_temporal() override
Return date value of item in packed longlong format.
Definition: item.cc:3329
 
void bind_fields() override
Bind objects from the current execution context to field objects in item trees.
Definition: item.cc:6309
 
void set_can_use_prefix_key() override
Definition: item.h:4755
 
uint32_t last_destination_field_memcpyable
Definition: item.h:4504
 
Item * equal_fields_propagator(uchar *arg) override
If field matches a multiple equality, set a pointer to that object in the field.
Definition: item.cc:6504
 
bool fix_outer_field(THD *thd, Field **field, Item_ident **ref_field, bool *complete)
Resolve the name of a column that may be an outer reference.
Definition: item.cc:5682
 
String * val_str(String *) override
Definition: item.cc:3302
 
Item * get_tmp_table_item(THD *thd) override
If an Item is materialized in a temporary table, a different Item may have to be used in the part of ...
Definition: item.cc:3506
 
my_decimal * val_decimal(my_decimal *) override
Definition: item.cc:3341
 
Field::geometry_type get_geometry_type() const override
Definition: item.h:4688
 
Access_bitmask have_privileges
Definition: item.h:4571
 
bool add_field_to_set_processor(uchar *arg) override
Item::walk function.
Definition: item.cc:1055
 
Item * replace_with_derived_expr(uchar *arg) override
Assuming this expression is part of a condition that would be pushed to the WHERE clause of a materia...
Definition: item.cc:1245
 
bool strip_db_table_name_processor(uchar *) override
Generated fields don't need db/table names.
Definition: item.cc:11460
 
bool remove_column_from_bitmap(uchar *arg) override
Visitor interface for removing all column expressions (Item_field) in this expression tree from a bit...
Definition: item.cc:1071
 
bool is_outer_field() const override
Definition: item.h:4684
 
bool repoint_const_outer_ref(uchar *arg) override
If this object is the real_item of an Item_ref, repoint the result_field to field.
Definition: item.cc:11449
 
bool no_constant_propagation
If true, the optimizer's constant propagation will not replace this item with an equal constant.
Definition: item.h:4566
 
bool val_json(Json_wrapper *result) override
Get a JSON value from an Item.
Definition: item.cc:3309
 
bool collect_item_field_or_view_ref_processor(uchar *arg) override
Collects fields and view references that have the qualifying table in the specified query block.
Definition: item.cc:1033
 
bool do_itemize(Parse_context *pc, Item **res) override
The core function that does the actual itemization.
Definition: item.cc:3039
 
bool is_valid_for_pushdown(uchar *arg) override
Check if all the columns present in this expression are from the derived table.
Definition: item.cc:1104
 
Item_ident super
Definition: item.h:4467
 
virtual bool is_asterisk() const
Checks if the current object represents an asterisk select list item.
Definition: item.h:4766
 
Field * tmp_table_field(TABLE *) override
Definition: item.h:4618
 
bool can_use_prefix_key
Definition: item.h:4578
 
bool m_protected_by_any_value
State used for transforming scalar subqueries to JOINs with derived tables, cf.
Definition: item.h:4517
 
void fix_after_pullout(Query_block *parent_query_block, Query_block *removed_query_block) override
Fix after tables have been moved from one query_block level to the parent level, e....
Definition: item.h:4471
 
Item_field(Name_resolution_context *context_arg, const char *db_arg, const char *table_name_arg, const char *field_name_arg)
Constructor used for internal information queries.
Definition: item.cc:3015
 
type_conversion_status save_in_field_inner(Field *field, bool no_conversions) override
Helper function which does all of the work for save_in_field(Field*, bool), except some error checkin...
Definition: item.cc:7019
 
longlong val_date_temporal_at_utc() override
Definition: item.cc:3335
 
void cleanup() override
Called for every Item after use (preparation and execution).
Definition: item.cc:6338
 
longlong val_int() override
Definition: item.cc:3323
 
bool m_was_sp_local_variable
Indicates whether this field should be treated as an outer reference due to being the result of inlin...
Definition: item.h:4534
 
float get_filtering_effect(THD *thd, table_map filter_for_table, table_map read_tables, const MY_BITMAP *fields_to_ignore, double rows_in_table) override
Calculate condition filtering effect for "WHERE field", which implicitly means "WHERE field <> 0".
Definition: item.cc:8414
 
Field * last_org_destination_field
Definition: item.h:4501
 
bool eq(const Item *item) const override
Compare this item with another item for equality.
Definition: item.cc:3377
 
bool used_tables_for_level(uchar *arg) override
Return used table information for the specified query block (level).
Definition: item.cc:3421
 
TYPELIB * get_typelib() const override
Get the typelib information for an item of type set or enum.
Definition: item.cc:3298
 
bool mark_field_in_map(uchar *arg) override
Mark underlying field in read or write map of a table.
Definition: item.h:4650
 
bool check_function_as_value_generator(uchar *args) override
Check if this item is allowed for a virtual column or inside a default expression.
Definition: item.cc:1296
 
bool disable_constant_propagation(uchar *) override
Definition: item.h:4672
 
bool replace_field_processor(uchar *arg) override
A processor that replaces any Fields with a Create_field_wrapper.
Definition: sql_table.cc:7831
 
Field * last_destination_field
Definition: item.h:4502
 
Field * get_tmp_table_field() override
If this Item is being materialized into a temporary table, returns the field that is being materializ...
Definition: item.h:4617
 
longlong val_int_endpoint(bool left_endp, bool *incl_endp) override
Definition: item.cc:3517
 
bool fix_fields(THD *, Item **) override
Resolve the name of a column reference.
Definition: item.cc:6093
 
bool val_time(Time_val *time) override
Evaluate the item and return result as a time value.
Definition: item.h:5542
 
bool val_date(Date_val *date, my_time_flags_t flags) override
Evaluate the item and return result as a date value.
Definition: item.h:5539
 
Item_num super
Definition: item.h:5475
 
uint64_t hash() override
Generate hash unique to an item depending on its attributes.
Definition: item.cc:7448
 
longlong val_int() override
Definition: item.h:5528
 
Name_string presentation
Definition: item.h:5477
 
Item_float(double value_par, uint decimal_par)
Definition: item.h:5508
 
Item_float(const POS &pos, const Name_string name_arg, double val_arg, uint decimal_par, uint length)
Definition: item.h:5497
 
Item * clone_item() const override
Definition: item.h:5546
 
void init(const char *str_arg, uint length)
This function is only called during parsing:
Definition: item.cc:7407
 
Item_float(const char *str_arg, uint length)
Definition: item.h:5482
 
double val_real() override
Definition: item.h:5524
 
type_conversion_status save_in_field_inner(Field *field, bool no_conversions) override
Helper function which does all of the work for save_in_field(Field*, bool), except some error checkin...
Definition: item.cc:7424
 
void print(const THD *thd, String *str, enum_query_type query_type) const override
This method is used for to:
Definition: item.cc:7432
 
Item_num * neg() override
Definition: item.h:5549
 
String * val_str(String *) override
Definition: item.cc:3728
 
my_decimal * val_decimal(my_decimal *) override
Definition: item.cc:3735
 
double value
Definition: item.h:5480
 
Item_float(const Name_string name_arg, double val_arg, uint decimal_par, uint length)
Definition: item.h:5487
 
Item_float(const POS &pos, const char *str_arg, uint length)
Definition: item.h:5483
 
bool eq(const Item *item) const override
Compare this item with another item for equality.
Definition: item.cc:7456
 
bool val_datetime(Datetime_val *dt, my_time_flags_t flags) override
Evaluate the item and return result as a datetime value.
Definition: item.h:5543
 
enum Type type() const override
Definition: item.h:5523
 
Implements the comparison operator equals (=)
Definition: item_cmpfunc.h:1110
 
void print(const THD *, String *str, enum_query_type) const override
This method is used for to:
Definition: item.h:5567
 
const Name_string func_name
Definition: item.h:5560
 
Item_func_pi(const POS &pos)
Definition: item.h:5563
 
Definition: item_func.h:101
 
bool val_time(Time_val *time) override
Evaluate the item and return result as a time value.
Definition: item.h:5891
 
uint decimal_precision() const override
Definition: item.cc:7508
 
Item_result result_type() const override
Definition: item.h:5895
 
Item_result cast_to_int_type() const override
Definition: item.h:5899
 
my_decimal * val_decimal(my_decimal *) override
Definition: item.cc:7583
 
uint64_t hash() override
Generate hash unique to an item depending on its attributes.
Definition: item.cc:7644
 
void hex_string_init(const char *str, uint str_length)
Definition: item.cc:7534
 
Item_result numeric_context_result_type() const override
Result type when an item appear in a numeric context.
Definition: item.h:5896
 
enum Type type() const override
Definition: item.h:5875
 
Item_hex_string()
Definition: item.cc:7474
 
longlong val_int() override
Definition: item.cc:7544
 
bool val_datetime(Datetime_val *dt, my_time_flags_t flags) override
Evaluate the item and return result as a datetime value.
Definition: item.h:5892
 
Item_basic_constant super
Definition: item.h:5861
 
bool val_date(Date_val *date, my_time_flags_t flags) override
Evaluate the item and return result as a date value.
Definition: item.h:5888
 
Item * clone_item() const override
Definition: item.cc:7481
 
bool eq(const Item *item) const override
Compare this item with another item for equality.
Definition: item.cc:7646
 
static LEX_CSTRING make_hex_str(const char *str, size_t str_length)
Definition: item.cc:7492
 
type_conversion_status save_in_field_inner(Field *field, bool no_conversions) override
Helper function which does all of the work for save_in_field(Field*, bool), except some error checkin...
Definition: item.cc:7591
 
double val_real() override
Definition: item.h:5876
 
String * val_str(String *) override
Definition: item.h:5883
 
void print(const THD *thd, String *str, enum_query_type query_type) const override
This method is used for to:
Definition: item.cc:7622
 
bool check_partition_func_processor(uchar *) override
Check if a partition function is allowed.
Definition: item.h:5904
 
Item_hex_string(const POS &pos)
Definition: item.h:5869
 
bool val_date(Date_val *date, my_time_flags_t flags) override
Evaluate the item and return result as a date value.
Definition: item.h:4453
 
my_decimal * val_decimal(my_decimal *dec) override
Definition: item.h:4450
 
const CHARSET_INFO * charset_for_protocol() override
Definition: item.h:4461
 
Item_ident_for_show(Field *par_field, const char *db_arg, const char *table_name_arg)
Definition: item.h:4441
 
const char * table_name
Definition: item.h:4439
 
enum Type type() const override
Definition: item.h:4445
 
longlong val_int() override
Definition: item.h:4448
 
double val_real() override
Definition: item.h:4447
 
Field * field
Definition: item.h:4437
 
String * val_str(String *str) override
Definition: item.h:4449
 
bool fix_fields(THD *thd, Item **ref) override
Definition: item.cc:2965
 
bool val_time(Time_val *time) override
Evaluate the item and return result as a time value.
Definition: item.h:4456
 
void make_field(Send_field *tmp_field) override
Definition: item.cc:2952
 
bool val_datetime(Datetime_val *dt, my_time_flags_t flags) override
Evaluate the item and return result as a datetime value.
Definition: item.h:4457
 
const char * db_name
Definition: item.h:4438
 
bool m_alias_of_expr
if this Item's name is alias of SELECT expression
Definition: item.h:4239
 
uint64_t m_hash_val
To cache the hash value of this item, populated upon hash() invocation.
Definition: item.h:4199
 
virtual bool alias_name_used() const
Definition: item.h:4426
 
const char * original_db_name() const
Definition: item.h:4352
 
void set_alias_of_expr()
Marks that this Item's name is alias of SELECT expression.
Definition: item.h:4410
 
bool is_strong_side_column_not_in_fd(uchar *arg) override
Definition: item.cc:11424
 
Item_ident(Name_resolution_context *context_arg, const char *db_name_arg, const char *table_name_arg, const char *field_name_arg)
Definition: item.h:4301
 
bool is_alias_of_expr() const
Definition: item.h:4408
 
Item_ident(THD *thd, Item_ident *item)
Constructor used by Item_field & Item_*_ref (see Item comment)
Definition: item.h:4329
 
Query_block * depended_from
For a column or reference that is an outer reference, depended_from points to the qualifying query bl...
Definition: item.h:4299
 
void fix_after_pullout(Query_block *parent_query_block, Query_block *removed_query_block) override
Fix after tables have been moved from one query_block level to the parent level, e....
Definition: item.cc:3440
 
const char * m_orig_field_name
Names the field in the source base table.
Definition: item.h:4238
 
void set_original_field_name(const char *name_arg)
Definition: item.h:4349
 
const char * m_orig_table_name
Names the original table that is the source of the field.
Definition: item.h:4228
 
const char * original_table_name() const
Definition: item.h:4353
 
void print(const THD *thd, String *str, enum_query_type query_type) const override
This method is used for to:
Definition: item.h:4361
 
Item_ident(const POS &pos, const char *db_name_arg, const char *table_name_arg, const char *field_name_arg)
Definition: item.h:4314
 
bool update_depended_from(uchar *) override
Definition: item.cc:948
 
bool do_itemize(Parse_context *pc, Item **res) override
The core function that does the actual itemization.
Definition: item.cc:928
 
Table_ref * m_table_ref
Points to the Table_ref object of the table or view that the column or reference is resolved against ...
Definition: item.h:4293
 
const char * table_name
If column is from a non-aliased base table or view, name of base table or view.
Definition: item.h:4268
 
Name_resolution_context * context
For regularly resolved column references, 'context' points to a name resolution context object belong...
Definition: item.h:4254
 
friend bool insert_fields(THD *thd, Name_resolution_context *context, const char *db_name, const char *table_name, mem_root_deque< Item * >::iterator *it, bool any_privileges)
 
const char * db_name
Schema name of the base table or view the column is part of.
Definition: item.h:4260
 
const char * full_name() const override
Definition: item.cc:3199
 
bool aggregate_check_group(uchar *arg) override
Definition: item.cc:11419
 
bool is_column_not_in_fd(uchar *arg) override
Definition: item.cc:11432
 
const char * field_name
If column is aliased, the column alias name.
Definition: item.h:4282
 
uint64_t hash(const char *db_name_arg, const char *table_name_arg)
 
void set_orignal_db_name(const char *name_arg)
Definition: item.h:4345
 
const char * original_field_name() const
Definition: item.h:4354
 
bool change_context_processor(uchar *arg) override
Definition: item.h:4402
 
void set_original_table_name(const char *name_arg)
Definition: item.h:4346
 
Item super
Definition: item.h:4196
 
uint64_t hash() override
Generate hash unique to an item depending on its attributes.
Definition: item.cc:3271
 
const char * m_orig_db_name
The fields m_orig_db_name, m_orig_table_name and m_orig_field_name are maintained so that we can prov...
Definition: item.h:4218
 
bool aggregate_check_distinct(uchar *arg) override
Definition: item.cc:11371
 
Bool3 local_column(const Query_block *sl) const override
Tells if this is a column of a table whose qualifying query block is 'sl'.
Definition: item.cc:11338
 
Representation of IN subquery predicates of the form "left_expr IN (SELECT ...)".
Definition: item_subselect.h:608
 
Item_insert_value(Name_resolution_context *context_arg, Item *a)
Constructs an Item_insert_value that represents a derived table that wraps a table value constructor.
Definition: item.h:6737
 
bool check_function_as_value_generator(uchar *args) override
Check if this item is allowed for a virtual column or inside a default expression.
Definition: item.h:6766
 
bool fix_fields(THD *, Item **) override
Resolve the name of a column reference.
Definition: item.cc:9515
 
Item_insert_value(const POS &pos, Item *a)
Constructs an Item_insert_value that represents a call to the deprecated VALUES function.
Definition: item.h:6728
 
bool do_itemize(Parse_context *pc, Item **res) override
The core function that does the actual itemization.
Definition: item.h:6742
 
uchar * m_rowbuffer_saved
Pointer to row buffer that was used to calculate field value offset.
Definition: item.h:6777
 
const bool m_is_values_function
This flag is true if the item represents a call to the deprecated VALUES function.
Definition: item.h:6783
 
type_conversion_status save_in_field_inner(Field *field_arg, bool no_conversions) override
Helper function which does all of the work for save_in_field(Field*, bool), except some error checkin...
Definition: item.h:6718
 
bool eq(const Item *item) const override
Compare this item with another item for equality.
Definition: item.cc:9510
 
Item * arg
The argument for this function.
Definition: item.h:6775
 
bool walk(Item_processor processor, enum_walk walk, uchar *args) override
Traverses a tree of Items in prefix and/or postfix order.
Definition: item.h:6761
 
table_map used_tables() const override
Definition: item.h:6759
 
enum Type type() const override
Definition: item.h:6747
 
void bind_fields() override
Bind objects from the current execution context to field objects in item trees.
Definition: item.cc:9598
 
void print(const THD *thd, String *str, enum_query_type query_type) const override
This method is used for to:
Definition: item.cc:9626
 
uint64_t hash() override
Generate hash unique to an item depending on its attributes.
Definition: item.cc:9633
 
void cleanup() override
Called for every Item after use (preparation and execution).
Definition: item.cc:9620
 
Item_int with value==0 and length==1.
Definition: item.h:5333
 
Item_int_0()
Definition: item.h:5335
 
Item_int_0(const POS &pos)
Definition: item.h:5336
 
Item * clone_item() const override
Definition: item.cc:7319
 
type_conversion_status save_in_field_inner(Field *field, bool no_conversions) override
Store this item's int-value in a field.
Definition: item.h:6501
 
uint64_t hash() override
Generate hash unique to an item depending on its attributes.
Definition: item.cc:7351
 
const Item * real_item() const override
Definition: item.h:6516
 
Item_int_with_ref(enum_field_types field_type, longlong i, Item *ref_arg, bool unsigned_arg)
Definition: item.h:6507
 
Item * ref
Definition: item.h:6500
 
Item * real_item() override
Definition: item.h:6515
 
Item_result result_type() const override
Definition: item.h:5296
 
Item_int(const POS &pos, const LEX_STRING &num, int dummy_error=0)
Definition: item.h:5279
 
void print(const THD *thd, String *str, enum_query_type query_type) const override
This method is used for to:
Definition: item.cc:3560
 
Item_int(longlong i, uint length=MY_INT64_NUM_DECIMAL_DIGITS)
Definition: item.h:5238
 
my_decimal * val_decimal(my_decimal *) override
Definition: item.cc:3548
 
bool val_datetime(Datetime_val *dt, my_time_flags_t flags) override
Evaluate the item and return result as a datetime value.
Definition: item.h:5311
 
bool check_function_as_value_generator(uchar *) override
Check if this item is allowed for a virtual column or inside a default expression.
Definition: item.h:5327
 
double val_real() override
Definition: item.h:5301
 
Item_int(const POS &pos, const char *str_arg, uint length)
Definition: item.h:5274
 
Item * clone_item() const override
Definition: item.h:5314
 
bool check_partition_func_processor(uchar *) override
Check if a partition function is allowed.
Definition: item.h:5326
 
Item_int(const POS &pos, const Name_string &name_arg, longlong i, uint length)
Definition: item.h:5263
 
longlong value
Definition: item.h:5225
 
Item_int(int32 i, uint length=MY_INT32_NUM_DECIMAL_DIGITS)
Definition: item.h:5226
 
type_conversion_status save_in_field_inner(Field *field, bool no_conversions) override
Store this item's int-value in a field.
Definition: item.cc:7266
 
void init(const char *str_arg, uint length)
Init an item from a string we KNOW points to a valid longlong.
Definition: item.cc:3539
 
uint decimal_precision() const override
Definition: item.h:5322
 
Item_int(const POS &pos, int32 i, uint length=MY_INT32_NUM_DECIMAL_DIGITS)
Definition: item.h:5232
 
bool val_date(Date_val *date, my_time_flags_t flags) override
Evaluate the item and return result as a date value.
Definition: item.h:5307
 
Item_int(const Item_int *item_arg)
Definition: item.h:5250
 
uint64_t hash() override
Generate hash unique to an item depending on its attributes.
Definition: item.cc:3582
 
Item_int(const char *str_arg, uint length)
Definition: item.h:5270
 
void set_max_size(uint length)
Definition: item.h:5285
 
bool val_time(Time_val *time) override
Evaluate the item and return result as a time value.
Definition: item.h:5310
 
static Item_int * narrow(Item *item)
Definition: item.cc:3522
 
String * val_str(String *) override
Definition: item.cc:3553
 
Item_num super
Definition: item.h:5220
 
enum Type type() const override
Definition: item.h:5295
 
Item_int(ulonglong i, uint length=MY_INT64_NUM_DECIMAL_DIGITS)
Definition: item.h:5243
 
bool eq(const Item *item) const override
Compare this item with another item for equality.
Definition: item.cc:7306
 
Item_int(const Name_string &name_arg, longlong i, uint length)
Definition: item.h:5257
 
Item_num * neg() override
Definition: item.h:5318
 
longlong val_int() override
Definition: item.h:5297
 
A class that represents a constant JSON value.
Definition: item.h:7454
 
unique_ptr_destroy_only< Json_wrapper > m_value
Definition: item.h:7455
 
longlong val_int() override
Definition: item.cc:7745
 
bool val_date(Date_val *date, my_time_flags_t flags) override
Evaluate the item and return result as a date value.
Definition: item.cc:7760
 
Item_result result_type() const override
Definition: item.h:7465
 
uint64_t hash() override
Generate hash unique to an item depending on its attributes.
Definition: item.cc:7722
 
bool val_time(Time_val *time) override
Evaluate the item and return result as a time value.
Definition: item.cc:7770
 
void print(const THD *, String *str, enum_query_type) const override
This method is used for to:
Definition: item.cc:7716
 
Item * clone_item() const override
Definition: item.cc:7775
 
Item_json(unique_ptr_destroy_only< Json_wrapper > value, const Item_name_string &name)
Definition: item.cc:7707
 
my_decimal * val_decimal(my_decimal *buf) override
Definition: item.cc:7756
 
bool val_json(Json_wrapper *result) override
Get a JSON value from an Item.
Definition: item.cc:7729
 
bool val_datetime(Datetime_val *dt, my_time_flags_t flags) override
Evaluate the item and return result as a datetime value.
Definition: item.cc:7764
 
double val_real() override
Definition: item.cc:7741
 
String * val_str(String *str) override
Definition: item.cc:7749
 
enum Type type() const override
Definition: item.h:7461
 
The class Item_multi_eq is used to represent conjunctions of equality predicates of the form field1 =...
Definition: item_cmpfunc.h:2702
 
Item * value_item
Definition: item.h:4126
 
bool val_datetime(Datetime_val *dt, my_time_flags_t flags) override
Evaluate the item and return result as a datetime value.
Definition: item.cc:2107
 
bool val_date(Date_val *date, my_time_flags_t flags) override
Evaluate the item and return result as a date value.
Definition: item.cc:2103
 
type_conversion_status save_in_field_inner(Field *field, bool no_conversions) override
Helper function which does all of the work for save_in_field(Field*, bool), except some error checkin...
Definition: item.h:4158
 
Item * name_item
Definition: item.h:4127
 
Item_result result_type() const override
Definition: item.h:4150
 
bool fix_fields(THD *, Item **) override
Definition: item.cc:2171
 
bool is_null() override
The method allows to determine nullness of a complex expression without fully evaluating it,...
Definition: item.cc:2117
 
uint64_t hash() override
Generate hash unique to an item depending on its attributes.
Definition: item.cc:2206
 
bool valid_args
Definition: item.h:4128
 
my_decimal * val_decimal(my_decimal *) override
Definition: item.cc:2096
 
bool cache_const_expr_analyzer(uchar **) override
Check if an item is a constant one and can be cached.
Definition: item.h:4152
 
longlong val_int() override
Definition: item.cc:2082
 
double val_real() override
Definition: item.cc:2075
 
Item_name_const(const POS &pos, Item *name_arg, Item *val)
Definition: item.cc:2119
 
Item super
Definition: item.h:4124
 
void print(const THD *thd, String *str, enum_query_type query_type) const override
This method is used for to:
Definition: item.cc:2197
 
enum Type type() const override
Definition: item.h:4136
 
bool val_time(Time_val *time) override
Evaluate the item and return result as a time value.
Definition: item.cc:2112
 
bool do_itemize(Parse_context *pc, Item **res) override
The core function that does the actual itemization.
Definition: item.cc:2124
 
String * val_str(String *sp) override
Definition: item.cc:2089
 
Storage for Item names.
Definition: item.h:371
 
void set_autogenerated(bool is_autogenerated)
Set m_is_autogenerated flag to the given value.
Definition: item.h:382
 
bool is_autogenerated() const
Return the auto-generated flag.
Definition: item.h:388
 
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:1450
 
Item_name_string()
Definition: item.h:376
 
Item_name_string(const Name_string name)
Definition: item.h:377
 
bool m_is_autogenerated
Definition: item.h:373
 
type_conversion_status save_in_field_inner(Field *field, bool no_conversions) override
Store null in field.
Definition: item.cc:7061
 
Item_null()
Definition: item.h:4841
 
bool send(Protocol *protocol, String *str) override
Pack data in buffer for sending.
Definition: item.cc:7703
 
void print(const THD *, String *str, enum_query_type query_type) const override
This method is used for to:
Definition: item.h:4871
 
bool eq(const Item *item) const override
Compare this item with another item for equality.
Definition: item.cc:3904
 
Item_basic_constant super
Definition: item.h:4828
 
bool val_time(Time_val *) override
Evaluate the item and return result as a time value.
Definition: item.h:4863
 
uint64_t hash() override
Generate hash unique to an item depending on its attributes.
Definition: item.cc:3906
 
Item_result result_type() const override
Definition: item.h:4867
 
Item_null(const POS &pos)
Definition: item.h:4845
 
bool check_partition_func_processor(uchar *) override
Check if a partition function is allowed.
Definition: item.h:4877
 
Item * clone_item() const override
Definition: item.h:4868
 
longlong val_date_temporal() override
Return date value of item in packed longlong format.
Definition: item.h:4859
 
bool is_null() override
The method allows to determine nullness of a complex expression without fully evaluating it,...
Definition: item.h:4869
 
double val_real() override
Definition: item.cc:3908
 
longlong val_int() override
Definition: item.cc:3914
 
bool val_datetime(Datetime_val *, my_time_flags_t) override
Evaluate the item and return result as a datetime value.
Definition: item.h:4864
 
Item_null(const Name_string &name_par)
Definition: item.h:4850
 
bool val_json(Json_wrapper *wr) override
Get a JSON value from an Item.
Definition: item.cc:3930
 
String * val_str(String *str) override
Definition: item.cc:3921
 
my_decimal * val_decimal(my_decimal *) override
Definition: item.cc:3928
 
enum Type type() const override
Definition: item.h:4855
 
bool val_date(Date_val *, my_time_flags_t) override
Evaluate the item and return result as a date value.
Definition: item.h:4862
 
void init()
Definition: item.h:4830
 
virtual Item_num * neg()=0
 
Item_basic_constant super
Definition: item.h:4183
 
bool check_partition_func_processor(uchar *) override
Check if a partition function is allowed.
Definition: item.h:4190
 
Item_num()
Definition: item.h:4186
 
Item_num(const POS &pos)
Definition: item.h:4187
 
bool fix_fields(THD *, Item **) override
Prepare referenced outer field then call usual Item_ref::fix_fields.
Definition: item.cc:9115
 
Item * replace_outer_ref(uchar *) override
Definition: item.cc:9177
 
Query_block * qualifying
Qualifying query of this outer ref (i.e.
Definition: item.h:6399
 
bool found_in_select_list
Definition: item.h:6409
 
Ref_Type ref_type() const override
Definition: item.h:6443
 
Item * outer_ref
Definition: item.h:6402
 
Item_outer_ref(Name_resolution_context *context_arg, Item_ident *ident_arg, Query_block *qualifying)
Definition: item.h:6410
 
Item_ref super
Definition: item.h:6392
 
Item_outer_ref(Name_resolution_context *context_arg, Item **item, const char *db_name_arg, const char *table_name_arg, const char *field_name_arg, bool alias_of_expr_arg, Query_block *qualifying)
Definition: item.h:6425
 
table_map not_null_tables() const override
Return table map of tables that can't be NULL tables (tables that are used in a context where if they...
Definition: item.h:6441
 
table_map used_tables() const override
Definition: item.h:6438
 
void fix_after_pullout(Query_block *parent_query_block, Query_block *removed_query_block) override
Fix after tables have been moved from one query_block level to the parent level, e....
Definition: item.cc:9166
 
Item_sum * in_sum_func
Definition: item.h:6404
 
Dynamic parameters used as placeholders ('?') inside prepared statements.
Definition: item.h:4882
 
bool val_date(Date_val *date, my_time_flags_t flags) override
Evaluate the item and return result as a date value.
Definition: item.cc:4508
 
void set_data_type_actual(enum_field_types data_type, bool unsigned_val)
For use with all field types, especially integer types.
Definition: item.h:5111
 
union Item_param::@61 value
 
enum_field_types data_type_source() const
Definition: item.h:5115
 
void reset()
Resets parameter after execution.
Definition: item.cc:4445
 
void set_null()
Definition: item.cc:4180
 
bool set_value(THD *, sp_rcontext *, Item **it) override
This operation is intended to store some item value in Item_param to be used later.
Definition: item.cc:5202
 
const String * query_val_str(const THD *thd, String *str) const
Return Param item values in string format, for generating the dynamic query used in update/binary log...
Definition: item.cc:4732
 
bool m_json_as_scalar
If true, when retrieving JSON data, attempt to interpret a string value as a scalar JSON value,...
Definition: item.h:5031
 
bool is_type_inherited() const
Definition: item.h:5063
 
my_decimal * val_decimal(my_decimal *) override
Definition: item.cc:4604
 
double real
Definition: item.h:4923
 
void set_param_state(enum enum_item_param_state state)
Definition: item.h:4901
 
bool is_type_pinned() const
Definition: item.h:5069
 
uint64_t hash() override
Generate hash unique to an item depending on its attributes.
Definition: item.cc:5106
 
Mem_root_array< Item_param * > m_clones
If a query expression's text QT or text of a condition (CT) that is pushed down to a derived table,...
Definition: item.h:5216
 
type_conversion_status save_in_field_inner(Field *field, bool no_conversions) override
Helper function which does all of the work for save_in_field(Field*, bool), except some error checkin...
Definition: item.cc:4458
 
String * val_str(String *) override
Definition: item.cc:4633
 
void sync_clones()
This should be called after any modification done to this Item, to propagate the said modification to...
Definition: item.cc:4152
 
void set_collation_actual(const CHARSET_INFO *coll)
Definition: item.h:5078
 
bool val_json(Json_wrapper *result) override
Get a JSON value from an Item.
Definition: item.cc:4669
 
void set_out_param_info(Send_field *info) override
Setter of Item_param::m_out_param_info.
Definition: item.cc:5266
 
bool set_from_user_var(THD *thd, const user_var_entry *entry)
Set parameter value from user variable value.
Definition: item.cc:4353
 
Item_result m_result_type
Result type of parameter.
Definition: item.h:5016
 
uint pos_in_query
Definition: item.h:5047
 
bool is_unsigned_actual() const
Definition: item.h:5072
 
void set_data_type_source(enum_field_types data_type, bool unsigned_val)
Definition: item.h:5102
 
bool add_clone(Item_param *i)
Definition: item.h:5167
 
bool is_null() override
The method allows to determine nullness of a complex expression without fully evaluating it,...
Definition: item.h:5148
 
longlong integer
Definition: item.h:4922
 
void pin_data_type() override
Pin the currently resolved data type for this parameter.
Definition: item.h:5066
 
const CHARSET_INFO * m_collation_source
The character set and collation of the source parameter value.
Definition: item.h:5006
 
bool val_datetime(Datetime_val *dt, my_time_flags_t flags) override
Evaluate the item and return result as a datetime value.
Definition: item.cc:4512
 
bool is_non_const_over_literals(uchar *) override
Definition: item.h:5161
 
String str_value_ptr
Definition: item.h:4919
 
MYSQL_TIME time
Definition: item.h:4924
 
const Send_field * get_out_param_info() const override
Getter of Item_param::m_out_param_info.
Definition: item.cc:5285
 
enum_field_types data_type_actual() const
Definition: item.h:5117
 
my_decimal decimal_value
Definition: item.h:4920
 
Settable_routine_parameter * get_settable_routine_parameter() override
Definition: item.h:5170
 
Item_result result_type() const override
Definition: item.h:5056
 
enum_field_types m_data_type_actual
The actual data type of the parameter value provided by the user.
Definition: item.h:4997
 
void set_decimal(const char *str, ulong length)
Set decimal parameter value from string.
Definition: item.cc:4224
 
void make_field(Send_field *field) override
Fill meta-data information for the corresponding column in a result set.
Definition: item.cc:5297
 
bool is_valid_for_pushdown(uchar *arg) override
Check if all the columns present in this expression are from the derived table.
Definition: item.h:5189
 
enum_item_param_state
Definition: item.h:4890
 
@ STRING_VALUE
Definition: item.h:4895
 
@ DECIMAL_VALUE
Definition: item.h:4898
 
@ NO_VALUE
Definition: item.h:4891
 
@ REAL_VALUE
Definition: item.h:4894
 
@ TIME_VALUE
holds TIME, DATE, DATETIME
Definition: item.h:4896
 
@ LONG_DATA_VALUE
Definition: item.h:4897
 
@ INT_VALUE
Definition: item.h:4893
 
@ NULL_VALUE
Definition: item.h:4892
 
enum_field_types m_data_type_source
Parameter objects have a rather complex handling of data type, in order to consistently handle requir...
Definition: item.h:4976
 
enum Type type() const override
Definition: item.h:5057
 
enum_item_param_state m_param_state
m_param_state is used to indicate that no parameter value is available with NO_VALUE,...
Definition: item.h:5025
 
bool check_function_as_value_generator(uchar *args) override
Check if this item is allowed for a virtual column or inside a default expression.
Definition: item.h:5183
 
void set_int(longlong i)
Definition: item.cc:4189
 
void print(const THD *thd, String *str, enum_query_type query_type) const override
This method is used for to:
Definition: item.cc:5093
 
bool convert_value()
Convert value according to the following rules:
Definition: item.cc:4794
 
void set_data_type_inherited() override
Set the currently resolved data type for this parameter as inherited.
Definition: item.h:5060
 
const CHARSET_INFO * collation_actual() const
Definition: item.h:5086
 
bool fix_fields(THD *thd, Item **ref) override
Definition: item.cc:4020
 
Send_field * m_out_param_info
Definition: item.h:5195
 
bool do_itemize(Parse_context *pc, Item **item) override
The core function that does the actual itemization.
Definition: item.cc:3956
 
void set_collation_source(const CHARSET_INFO *coll)
Definition: item.h:5074
 
const CHARSET_INFO * collation_source() const
Definition: item.h:5083
 
longlong val_int() override
Definition: item.cc:4569
 
bool set_str(const char *str, size_t length)
Definition: item.cc:4284
 
bool m_unsigned_actual
Used when actual value is integer to indicate whether value is unsigned.
Definition: item.h:4999
 
bool m_type_inherited
True if type of parameter is inherited from parent object (like a typecast).
Definition: item.h:4934
 
bool eq(const Item *item) const override
Compare this item with another item for equality.
Definition: item.cc:5089
 
double val_real() override
Definition: item.cc:4530
 
void set_time(MYSQL_TIME *tm, enum_mysql_timestamp_type type)
Set parameter value from MYSQL_TIME value.
Definition: item.cc:4252
 
enum_field_types actual_data_type() const override
Retrieve actual data type for an item.
Definition: item.h:5119
 
enum enum_item_param_state param_state() const
Definition: item.h:4905
 
Item * clone_item() const override
Definition: item.cc:5065
 
const CHARSET_INFO * m_collation_actual
The character set and collation of the value stored in str_value, possibly after being converted from...
Definition: item.h:5014
 
void set_param_type_and_swap_value(Item_param *from)
Preserve the original parameter types and values when re-preparing a prepared statement.
Definition: item.cc:5175
 
bool m_type_pinned
True if type of parameter has been pinned, attempt to use an incompatible actual type will cause erro...
Definition: item.h:4945
 
bool propagate_type(THD *thd, const Type_properties &type) override
Propagate data type specifications into parameters and user variables.
Definition: item.cc:4074
 
void set_double(double i)
Definition: item.cc:4205
 
void mark_json_as_scalar() override
For Items with data type JSON, mark that a string argument is treated as a scalar JSON value.
Definition: item.h:4907
 
bool set_longdata(const char *str, ulong length)
Definition: item.cc:4312
 
void copy_param_actual_type(Item_param *from)
Definition: item.cc:4680
 
Item_param(const POS &pos, MEM_ROOT *root, uint pos_in_query_arg)
Definition: item.cc:3937
 
table_map used_tables() const override
Definition: item.h:5144
 
void set_data_type_actual(enum_field_types data_type)
Definition: item.h:5107
 
bool val_time(Time_val *time) override
Evaluate the item and return result as a time value.
Definition: item.cc:4486
 
Item super
Definition: item.h:4883
 
Item_partition_func_safe_string(const Name_string name, size_t length, const CHARSET_INFO *cs=nullptr)
Definition: item.h:5808
 
bool val_time(Time_val *time) override
Evaluate the item and return result as a time value.
Definition: item.cc:5369
 
Item_ref_null_helper(const Item_ref_null_helper &ref_null_helper, Item **item)
Definition: item.h:6465
 
bool val_datetime(Datetime_val *dt, my_time_flags_t flags) override
Evaluate the item and return result as a datetime value.
Definition: item.cc:5381
 
my_decimal * val_decimal(my_decimal *) override
Definition: item.cc:5351
 
bool val_bool() override
Definition: item.cc:5357
 
String * val_str(String *s) override
Definition: item.cc:5363
 
Item_in_subselect * owner
Definition: item.h:6459
 
Item_ref_null_helper(Name_resolution_context *context_arg, Item_in_subselect *master, Item **item)
Definition: item.h:6462
 
longlong val_date_temporal() override
Return date value of item in packed longlong format.
Definition: item.cc:5345
 
longlong val_int() override
Definition: item.cc:5339
 
void print(const THD *thd, String *str, enum_query_type query_type) const override
This method is used for to:
Definition: item.cc:9036
 
Item_ref super
Definition: item.h:6456
 
double val_real() override
Definition: item.cc:5333
 
Ref_Type ref_type() const override
Definition: item.h:6479
 
table_map used_tables() const override
Definition: item.h:6483
 
bool val_date(Date_val *date, my_time_flags_t flags) override
Evaluate the item and return result as a date value.
Definition: item.cc:5375
 
Item * compile(Item_analyzer analyzer, uchar **arg_p, Item_transformer transformer, uchar *arg_t) override
Compile an Item_ref object with a processor and a transformer callback function.
Definition: item.cc:8868
 
void update_used_tables() override
Updates used tables, not null tables information and accumulates properties up the item tree,...
Definition: item.h:6110
 
bool created_by_in2exists() const override
Whether this Item was created by the IN->EXISTS subquery transformation.
Definition: item.h:6215
 
bool is_null() override
The method allows to determine nullness of a complex expression without fully evaluating it,...
Definition: item.cc:8958
 
bool collect_item_field_or_ref_processor(uchar *arg) override
Definition: item.cc:9047
 
bool is_result_field() const override
Definition: item.h:6131
 
void set_properties()
Definition: item.cc:8802
 
table_map used_tables() const override
Definition: item.h:6102
 
Item_field * field_for_view_update() override
Definition: item.h:6175
 
bool val_date(Date_val *date, my_time_flags_t flags) override
Evaluate the item and return result as a date value.
Definition: item.cc:8965
 
bool eq(const Item *item) const override
Compare this item with another item for equality.
Definition: item.h:6070
 
type_conversion_status save_in_field_inner(Field *field, bool no_conversions) override
Helper function which does all of the work for save_in_field(Field*, bool), except some error checkin...
Definition: item.cc:8992
 
Item_ref(THD *thd, Item_ref *item)
Definition: item.h:6056
 
Item ** addr(uint i) override
Definition: item.h:6189
 
void traverse_cond(Cond_traverser traverser, void *arg, traverse_order order) override
Definition: item.h:6154
 
Item * get_tmp_table_item(THD *thd) override
If an Item is materialized in a temporary table, a different Item may have to be used in the part of ...
Definition: item.cc:9016
 
bool clean_up_after_removal(uchar *arg) override
Clean up after removing the item from the item tree.
Definition: item.cc:8477
 
bool fix_fields(THD *, Item **) override
Resolve the name of a reference to a column reference.
Definition: item.cc:8560
 
bool check_function_as_value_generator(uchar *args) override
Check if this item is allowed for a virtual column or inside a default expression.
Definition: item.h:6221
 
bool is_valid_for_pushdown(uchar *arg) override
Check if all the columns present in this expression are from the derived table.
Definition: item.h:6230
 
Item_result result_type() const override
Definition: item.h:6093
 
void make_field(Send_field *field) override
Definition: item.cc:9000
 
void bring_value() override
Definition: item.h:6202
 
uint cols() const override
Definition: item.h:6181
 
Item ** ref_pointer() const
Definition: item.h:6065
 
bool val_json(Json_wrapper *result) override
Get a JSON value from an Item.
Definition: item.cc:8951
 
bool val_bool() override
Definition: item.cc:8937
 
bool is_outer_field() const override
Definition: item.h:6209
 
bool null_inside() override
Definition: item.h:6198
 
void set_result_field(Field *field) override
Definition: item.h:6130
 
void print(const THD *thd, String *str, enum_query_type query_type) const override
This method is used for to:
Definition: item.cc:8885
 
Item * real_item() override
Definition: item.h:6133
 
longlong val_date_temporal() override
Return date value of item in packed longlong format.
Definition: item.cc:8929
 
Field * get_tmp_table_field() override
If this Item is being materialized into a temporary table, returns the field that is being materializ...
Definition: item.h:6097
 
Item_result cast_to_int_type() const override
Definition: item.h:6227
 
Ref_Type
Definition: item.h:6018
 
@ NULL_HELPER_REF
Definition: item.h:6018
 
@ VIEW_REF
Definition: item.h:6018
 
@ REF
Definition: item.h:6018
 
@ AGGREGATE_REF
Definition: item.h:6018
 
@ OUTER_REF
Definition: item.h:6018
 
String * val_str(String *tmp) override
Definition: item.cc:8944
 
uint64_t hash() override
Generate hash unique to an item depending on its attributes.
Definition: item.cc:8900
 
Field * result_field
Definition: item.h:6024
 
bool explain_subquery_checker(uchar **) override
Definition: item.h:6161
 
void link_referenced_item()
Definition: item.h:6067
 
bool check_column_in_window_functions(uchar *arg) override
Check if all the columns present in this expression are present in PARTITION clause of window functio...
Definition: item.h:6233
 
bool is_non_const_over_literals(uchar *) override
Definition: item.h:6220
 
void cleanup() override
Called for every Item after use (preparation and execution).
Definition: item.cc:8822
 
const Item * real_item() const override
Definition: item.h:6138
 
Item_ref(const POS &pos, const char *db_name_arg, const char *table_name_arg, const char *field_name_arg)
Definition: item.h:6031
 
Field * get_result_field() const override
Definition: item.h:6132
 
TYPELIB * get_typelib() const override
Get the typelib information for an item of type set or enum.
Definition: item.h:6095
 
bool walk(Item_processor processor, enum_walk walk, uchar *arg) override
Traverses a tree of Items in prefix and/or postfix order.
Definition: item.h:6144
 
enum Type type() const override
Definition: item.h:6069
 
bool send(Protocol *prot, String *tmp) override
This is only called from items that is not of type item_field.
Definition: item.cc:8911
 
bool pusheddown_depended_from
Definition: item.h:6021
 
bool check_column_in_group_by(uchar *arg) override
Check if all the columns present in this expression are present in GROUP BY clause of the derived tab...
Definition: item.h:6236
 
void fix_after_pullout(Query_block *parent_query_block, Query_block *removed_query_block) override
Fix after tables have been moved from one query_block level to the parent level, e....
Definition: item.cc:9183
 
virtual Ref_Type ref_type() const
Definition: item.h:6178
 
bool val_time(Time_val *time) override
Evaluate the item and return result as a time value.
Definition: item.cc:8972
 
bool basic_const_item() const override
Returns true if this is a simple constant item like an integer, not a constant expression.
Definition: item.h:6207
 
Item * transform(Item_transformer, uchar *arg) override
Transform an Item_ref object with a transformer callback function.
Definition: item.cc:8838
 
bool repoint_const_outer_ref(uchar *arg) override
The aim here is to find a real_item() which is of type Item_field.
Definition: item.cc:11440
 
table_map not_null_tables() const override
Return table map of tables that can't be NULL tables (tables that are used in a context where if they...
Definition: item.h:6120
 
Item * element_index(uint i) override
Definition: item.h:6185
 
bool check_cols(uint c) override
Definition: item.h:6193
 
Item ** m_ref_item
Indirect pointer to the referenced item.
Definition: item.h:6028
 
longlong val_int() override
Definition: item.cc:8922
 
Item * ref_item() const
Definition: item.h:6062
 
my_decimal * val_decimal(my_decimal *) override
Definition: item.cc:8986
 
double val_real() override
Definition: item.cc:8915
 
bool val_datetime(Datetime_val *dt, my_time_flags_t flags) override
Evaluate the item and return result as a datetime value.
Definition: item.cc:8979
 
Item with result field.
Definition: item.h:5946
 
Item_result_field(const POS &pos)
Definition: item.h:5951
 
Field * tmp_table_field(TABLE *) override
Definition: item.h:5957
 
Field * result_field
Definition: item.h:5948
 
int raise_decimal_overflow()
Definition: item.h:6005
 
longlong raise_integer_overflow()
Definition: item.h:6000
 
Field * get_tmp_table_field() override
If this Item is being materialized into a temporary table, returns the field that is being materializ...
Definition: item.h:5956
 
Item_result_field(THD *thd, const Item_result_field *item)
Definition: item.h:5954
 
virtual bool resolve_type(THD *thd)=0
Resolve type-related information for this item, such as result field type, maximum size,...
 
longlong llrint_with_overflow_check(double realval)
Definition: item.h:5985
 
bool mark_field_in_map(uchar *arg) override
Mark underlying field in read or write map of a table.
Definition: item.h:5977
 
bool check_function_as_value_generator(uchar *) override
Check if this item is allowed for a virtual column or inside a default expression.
Definition: item.h:5976
 
void cleanup() override
Called for every Item after use (preparation and execution).
Definition: item.cc:11279
 
void raise_numeric_overflow(const char *type_name)
Definition: item.cc:11285
 
Item_result_field()=default
 
double raise_float_overflow()
Definition: item.h:5995
 
bool is_result_field() const override
Definition: item.h:5972
 
table_map used_tables() const override
Definition: item.h:5958
 
void set_result_field(Field *field) override
Definition: item.h:5971
 
Field * get_result_field() const override
Definition: item.h:5973
 
Item_return_int(const char *name_arg, uint length, enum_field_types field_type_arg, longlong value_arg=0)
Definition: item.h:5851
 
Class that represents scalar subquery and row subquery.
Definition: item_subselect.h:283
 
bool is_valid_for_pushdown(uchar *arg) override
Check if all the columns present in this expression are from the derived table.
Definition: item.h:3983
 
Item_sp_variable(const Name_string sp_var_name)
Definition: item.cc:1861
 
Name_string m_name
Definition: item.h:3949
 
bool val_json(Json_wrapper *result) override
Get a JSON value from an Item.
Definition: item.cc:1944
 
String * val_str(String *sp) override
Definition: item.cc:1903
 
bool fix_fields(THD *thd, Item **) override
Definition: item.cc:1864
 
bool val_date(Date_val *date, my_time_flags_t flags) override
Evaluate the item and return result as a date value.
Definition: item.cc:1952
 
my_decimal * val_decimal(my_decimal *decimal_value) override
Definition: item.cc:1936
 
void make_field(Send_field *field) override
Definition: item.h:3997
 
bool val_datetime(Datetime_val *dt, my_time_flags_t flags) override
Evaluate the item and return result as a datetime value.
Definition: item.cc:1956
 
type_conversion_status save_in_field_inner(Field *field, bool no_conversions) override
Helper function which does all of the work for save_in_field(Field*, bool), except some error checkin...
Definition: item.h:4003
 
double val_real() override
Definition: item.cc:1887
 
longlong val_int() override
Definition: item.cc:1895
 
table_map used_tables() const override
Definition: item.h:3963
 
bool send(Protocol *protocol, String *str) override
This is only called from items that is not of type item_field.
Definition: item.h:3978
 
bool val_time(Time_val *time) override
Evaluate the item and return result as a time value.
Definition: item.cc:1962
 
sp_head * m_sp
Definition: item.h:3957
 
bool is_null() override
The method allows to determine nullness of a complex expression without fully evaluating it,...
Definition: item.cc:1968
 
bool limit_clause_param
Definition: item.h:4024
 
Item_result result_type() const override
Definition: item.h:4064
 
bool set_value(THD *thd, sp_rcontext *ctx, Item **it) override
Definition: item.cc:2029
 
uint len_in_query
Definition: item.h:4043
 
bool is_splocal() const override
Definition: item.h:4049
 
uint get_var_idx() const
Definition: item.h:4061
 
bool val_json(Json_wrapper *result) override
Get a JSON value from an Item.
Definition: item.cc:2005
 
uint m_var_idx
Definition: item.h:4015
 
Settable_routine_parameter * get_settable_routine_parameter() override
Definition: item.h:4073
 
uint pos_in_query
Definition: item.h:4035
 
Item * this_item() override
Definition: item.cc:1987
 
Item_splocal(const Name_string sp_var_name, uint sp_var_idx, enum_field_types sp_var_type, uint pos_in_q=0, uint len_in_q=0)
Definition: item.cc:1974
 
Type type() const override
Definition: item.h:4063
 
uint64_t hash() override
Generate hash unique to an item depending on its attributes.
Definition: item.cc:2024
 
Item ** this_item_addr(THD *thd, Item **) override
Definition: item.cc:1999
 
void print(const THD *thd, String *str, enum_query_type query_type) const override
This method is used for to:
Definition: item.cc:2012
 
void print(const THD *, String *str, enum_query_type) const override
Definition: item.h:5792
 
Item_static_string_func(const Name_string &name_par, const char *str, size_t length, const CHARSET_INFO *cs, Derivation dv=DERIVATION_COERCIBLE)
Definition: item.h:5780
 
bool check_partition_func_processor(uchar *) override
Check if a partition function is allowed.
Definition: item.h:5796
 
bool check_function_as_value_generator(uchar *args) override
Check if this item is allowed for a virtual column or inside a default expression.
Definition: item.h:5797
 
const Name_string func_name
Definition: item.h:5777
 
Item_static_string_func(const POS &pos, const Name_string &name_par, const char *str, size_t length, const CHARSET_INFO *cs, Derivation dv=DERIVATION_COERCIBLE)
Definition: item.h:5785
 
uint64_t hash() override
Generate hash unique to an item depending on its attributes.
Definition: item.cc:3899
 
Item_string(const POS &pos, const char *str, size_t length, const CHARSET_INFO *cs, Derivation dv=DERIVATION_COERCIBLE, uint repertoire=MY_REPERTOIRE_UNICODE30)
Definition: item.h:5614
 
String * val_str(String *) override
Definition: item.h:5698
 
Item_string(const char *str, size_t length, const CHARSET_INFO *cs, Derivation dv=DERIVATION_COERCIBLE, uint repertoire=MY_REPERTOIRE_UNICODE30)
Definition: item.h:5608
 
void set_cs_specified(bool cs_specified)
Set the value of m_cs_specified attribute.
Definition: item.h:5760
 
bool eq(const Item *item) const override
Compare this item with another item for equality.
Definition: item.cc:1545
 
bool is_cs_specified() const
Return true if character-set-introducer was explicitly specified in the original query for this item ...
Definition: item.h:5748
 
Item_string(const CHARSET_INFO *cs, Derivation dv=DERIVATION_COERCIBLE)
Definition: item.h:5622
 
Item_string(const POS &pos)
Definition: item.h:5576
 
void append(char *str, size_t length)
Definition: item.h:5719
 
bool val_datetime(Datetime_val *dt, my_time_flags_t flags) override
Evaluate the item and return result as a datetime value.
Definition: item.h:5707
 
void init(const char *str, size_t length, const CHARSET_INFO *cs, Derivation dv, uint repertoire)
Definition: item.h:5580
 
bool check_partition_func_processor(uchar *) override
Check if a partition function is allowed.
Definition: item.h:5727
 
Item_string(const POS &pos, const Name_string name_par, const LEX_CSTRING &literal, const CHARSET_INFO *cs, Derivation dv=DERIVATION_COERCIBLE, uint repertoire=MY_REPERTOIRE_UNICODE30)
Definition: item.h:5661
 
bool val_date(Date_val *date, my_time_flags_t flags) override
Evaluate the item and return result as a date value.
Definition: item.h:5703
 
void mark_result_as_const()
Definition: item.h:5764
 
type_conversion_status save_in_field_inner(Field *field, bool no_conversions) override
Helper function which does all of the work for save_in_field(Field*, bool), except some error checkin...
Definition: item.cc:7216
 
Item_result result_type() const override
Definition: item.h:5710
 
Item * clone_item() const override
Definition: item.h:5715
 
bool m_cs_specified
Definition: item.h:5767
 
void print(const THD *thd, String *str, enum_query_type query_type) const override
Definition: item.cc:3765
 
void set_value_collation()
Update collation of string value to be according to item's collation.
Definition: item.h:5689
 
Item_string(const Name_string name_par, const char *str, size_t length, const CHARSET_INFO *cs, Derivation dv=DERIVATION_COERCIBLE, uint repertoire=MY_REPERTOIRE_UNICODE30)
Definition: item.h:5632
 
uint64_t hash() override
Generate hash unique to an item depending on its attributes.
Definition: item.cc:3821
 
Item_basic_constant super
Definition: item.h:5573
 
bool val_time(Time_val *time) override
Evaluate the item and return result as a time value.
Definition: item.h:5706
 
void set_str_with_copy(const char *str_arg, uint length_arg)
Definition: item.h:5681
 
double val_real() override
Definition: item.cc:3839
 
Item_string(const POS &pos, const Name_string name_par, const char *str, size_t length, const CHARSET_INFO *cs, Derivation dv=DERIVATION_COERCIBLE, uint repertoire=MY_REPERTOIRE_UNICODE30)
Definition: item.h:5645
 
void set_repertoire_from_value()
Definition: item.h:5691
 
longlong val_int() override
Definition: item.cc:3888
 
bool eq_binary(const Item_string *item) const
Definition: item.h:5712
 
enum Type type() const override
Definition: item.h:5695
 
my_decimal * val_decimal(my_decimal *) override
Definition: item.cc:3895
 
Base class that is common to all subqueries and subquery predicates.
Definition: item_subselect.h:80
 
Class Item_sum is the base class used for special expressions that SQL calls 'set functions'.
Definition: item_sum.h:399
 
bool val_date(Date_val *, my_time_flags_t) override
Evaluate the item and return result as a date value.
Definition: item.h:6532
 
Item_temporal_with_ref(enum_field_types field_type_arg, uint8 decimals_arg, longlong i, Item *ref_arg, bool unsigned_arg)
Definition: item.h:6524
 
void print(const THD *thd, String *str, enum_query_type query_type) const override
This method is used for to:
Definition: item.cc:7340
 
bool val_time(Time_val *time) override
Evaluate the item and return result as a time value.
Definition: item.h:6536
 
type_conversion_status save_in_field_inner(Field *field, bool no_conversions) override
Store this item's int-value in a field.
Definition: item.cc:7272
 
Item_temporal(enum_field_types field_type_arg, const Name_string &name_arg, longlong i, uint length)
Definition: item.h:5362
 
bool val_date(Date_val *, my_time_flags_t) override
Evaluate the item and return result as a date value.
Definition: item.h:5376
 
Item * clone_item() const override
Definition: item.h:5372
 
Item_temporal(enum_field_types field_type_arg, longlong i)
Definition: item.h:5357
 
bool val_datetime(Datetime_val *, my_time_flags_t) override
Evaluate the item and return result as a datetime value.
Definition: item.h:5384
 
longlong val_date_temporal() override
Return date value of item in packed longlong format.
Definition: item.h:5375
 
bool val_time(Time_val *) override
Evaluate the item and return result as a time value.
Definition: item.h:5380
 
Utility mixin class to be able to walk() only parts of item trees.
Definition: item.h:736
 
bool is_stopped(const Item *i)
Definition: item.h:753
 
const Item * stopped_at_item
Definition: item.h:774
 
void stop_at(const Item *i)
Stops walking children of this item.
Definition: item.h:744
 
Item_tree_walker(const Item_tree_walker &)=delete
 
Item_tree_walker()
Definition: item.h:738
 
Item_tree_walker & operator=(const Item_tree_walker &)=delete
 
~Item_tree_walker()
Definition: item.h:739
 
Represents NEW/OLD version of field of row which is changed/read in trigger.
Definition: item.h:6798
 
SQL_I_List< Item_trigger_field > * next_trig_field_list
Definition: item.h:6808
 
void print(const THD *thd, String *str, enum_query_type query_type) const override
This method is used for to:
Definition: item.cc:9776
 
void setup_field(Table_trigger_field_support *table_triggers, GRANT_INFO *table_grant_info)
Find index of Field object which will be appropriate for item representing field of row being changed...
Definition: item.cc:9660
 
uint field_idx
Definition: item.h:6810
 
GRANT_INFO * table_grants
Definition: item.h:6891
 
bool check_column_privileges(uchar *arg) override
Check privileges of base table column.
Definition: item.cc:9765
 
Item * get_tmp_table_item(THD *thd) override
If an Item is materialized in a temporary table, a different Item may have to be used in the part of ...
Definition: item.h:6847
 
Item_trigger_field(const POS &pos, enum_trigger_variable_type trigger_var_type_arg, const char *field_name_arg, Access_bitmask priv, const bool ro)
Definition: item.h:6825
 
bool set_value(THD *thd, sp_rcontext *ctx, Item **it) override
Definition: item.cc:9681
 
Item_trigger_field(Name_resolution_context *context_arg, enum_trigger_variable_type trigger_var_type_arg, const char *field_name_arg, Access_bitmask priv, const bool ro)
Definition: item.h:6814
 
bool set_value(THD *thd, Item **it)
Definition: item.h:6872
 
bool eq(const Item *item) const override
Compare this item with another item for equality.
Definition: item.cc:9672
 
Settable_routine_parameter * get_settable_routine_parameter() override
Definition: item.h:6868
 
Item_trigger_field * next_trg_field
Definition: item.h:6803
 
void cleanup() override
Called for every Item after use (preparation and execution).
Definition: item.cc:9783
 
Access_bitmask want_privilege
Definition: item.h:6890
 
enum Type type() const override
Definition: item.h:6837
 
Item * copy_or_same(THD *) override
Definition: item.h:6846
 
Table_trigger_field_support * triggers
Definition: item.h:6812
 
Field * get_tmp_table_field() override
If this Item is being materialized into a temporary table, returns the field that is being materializ...
Definition: item.h:6845
 
enum_trigger_variable_type trigger_var_type
Definition: item.h:6801
 
table_map used_tables() const override
Definition: item.h:6844
 
bool fix_fields(THD *, Item **) override
Resolve the name of a column reference.
Definition: item.cc:9708
 
bool read_only
Definition: item.h:6896
 
void bind_fields() override
Bind objects from the current execution context to field objects in item trees.
Definition: item.cc:9744
 
bool check_function_as_value_generator(uchar *args) override
Check if this item is allowed for a virtual column or inside a default expression.
Definition: item.h:6853
 
bool is_valid_for_pushdown(uchar *args) override
Check if all the columns present in this expression are from the derived table.
Definition: item.h:6860
 
void set_required_privilege(Access_bitmask privilege) override
Set required privileges for accessing the parameter.
Definition: item.h:6849
 
Item_type_holder stores an aggregation of name, type and type specification of UNIONS and derived tab...
Definition: item.h:7376
 
Item_aggregate_type super
Definition: item.h:7377
 
enum Type type() const override
Definition: item.h:7385
 
table_map used_tables() const override
Class is used in type aggregation only - this is needed to ensure that it is not attempted to be eval...
Definition: item.h:7391
 
Item_type_holder(THD *thd, Item *item)
Definition: item.h:7383
 
String * val_str(String *) override
Definition: item.cc:11146
 
longlong val_int() override
Definition: item.cc:11136
 
bool val_datetime(Datetime_val *dt, my_time_flags_t flags) override
Evaluate the item and return result as a datetime value.
Definition: item.cc:11156
 
bool val_date(Date_val *date, my_time_flags_t flags) override
Evaluate the item and return result as a date value.
Definition: item.cc:11151
 
double val_real() override
Definition: item.cc:11131
 
my_decimal * val_decimal(my_decimal *) override
Definition: item.cc:11141
 
bool val_time(Time_val *time) override
Evaluate the item and return result as a time value.
Definition: item.cc:11161
 
uint decimal_precision() const override
Definition: item.h:5422
 
Item * clone_item() const override
Definition: item.h:5415
 
Item_num * neg() override
Definition: item.cc:7358
 
Item_uint(const Name_string &name_arg, longlong i, uint length)
Definition: item.h:5405
 
void print(const THD *thd, String *str, enum_query_type query_type) const override
This method is used for to:
Definition: item.cc:3591
 
Item_uint(const POS &pos, const char *str_arg, uint length)
Definition: item.h:5399
 
type_conversion_status save_in_field_inner(Field *field, bool no_conversions) override
Store this item's int-value in a field.
Definition: item.cc:7222
 
uint64_t hash() override
Generate hash unique to an item depending on its attributes.
Definition: item.cc:3600
 
double val_real() override
Definition: item.h:5409
 
String * val_str(String *) override
Definition: item.cc:3584
 
Item_uint(const char *str_arg, uint length)
Definition: item.h:5396
 
Item_uint(ulonglong i)
Definition: item.h:5404
 
Reference item that encapsulates both the type and the contained items of a single column of a VALUES...
Definition: item.h:7417
 
Item_values_column(THD *thd, Item *ref)
Definition: item.cc:11174
 
void set_value(Item *new_value)
Definition: item.h:7448
 
Item * m_value_ref
Definition: item.h:7421
 
table_map used_tables() const override
Definition: item.h:7449
 
bool val_date(Date_val *date, my_time_flags_t flags) override
Evaluate the item and return result as a date value.
Definition: item.cc:11253
 
Item_aggregate_type super
Definition: item.h:7418
 
longlong val_int() override
Definition: item.cc:11189
 
type_conversion_status save_in_field_inner(Field *field, bool no_conversions) override
Helper function which does all of the work for save_in_field(Field*, bool), except some error checkin...
Definition: item.cc:11166
 
my_decimal * val_decimal(my_decimal *) override
Definition: item.cc:11196
 
bool is_null() override
Item_values_column is dualistic in nature: It represents both a set of values, and,...
Definition: item.cc:11238
 
bool eq(const Item *item) const override
Compare this item with another item for equality.
Definition: item.cc:11178
 
bool val_json(Json_wrapper *result) override
Get a JSON value from an Item.
Definition: item.cc:11212
 
enum Type type() const override
Definition: item.h:7447
 
String * val_str(String *tmp) override
Definition: item.cc:11221
 
void add_used_tables(Item *value)
Definition: item.cc:11275
 
bool val_time(Time_val *time) override
Evaluate the item and return result as a time value.
Definition: item.cc:11267
 
double val_real() override
Definition: item.cc:11182
 
bool val_bool() override
Definition: item.cc:11204
 
table_map m_aggregated_used_tables
Definition: item.h:7428
 
bool val_datetime(Datetime_val *dt, my_time_flags_t flags) override
Evaluate the item and return result as a datetime value.
Definition: item.cc:11260
 
Class for fields from derived tables and views.
Definition: item.h:6247
 
Ref_Type ref_type() const override
Definition: item.h:6339
 
Table_ref * first_inner_table
If this column belongs to a view that is an inner table of an outer join, then this field points to t...
Definition: item.h:6379
 
bool mark_field_in_map(uchar *arg) override
Mark underlying field in read or write map of a table.
Definition: item.h:6342
 
Item * get_tmp_table_item(THD *thd) override
If an Item is materialized in a temporary table, a different Item may have to be used in the part of ...
Definition: item.h:6333
 
bool is_null() override
The method allows to determine nullness of a complex expression without fully evaluating it,...
Definition: item.cc:9258
 
Item_view_ref(Name_resolution_context *context_arg, Item **item, const char *db_name_arg, const char *alias_name_arg, const char *table_name_arg, const char *field_name_arg, Table_ref *tr)
Definition: item.h:6251
 
bool collect_item_field_or_view_ref_processor(uchar *arg) override
Collects fields and view references that have the qualifying table in the specified query block.
Definition: item.cc:9277
 
bool has_null_row() const
Definition: item.h:6371
 
type_conversion_status save_in_field_inner(Field *field, bool no_conversions) override
Helper function which does all of the work for save_in_field(Field*, bool), except some error checkin...
Definition: item.cc:9269
 
double val_real() override
Definition: item.cc:9218
 
bool send(Protocol *prot, String *tmp) override
This is only called from items that is not of type item_field.
Definition: item.cc:9264
 
bool fix_fields(THD *, Item **) override
Prepare referenced field then call usual Item_ref::fix_fields .
Definition: item.cc:9067
 
bool val_bool() override
Definition: item.cc:9242
 
Item * replace_item_view_ref(uchar *arg) override
Definition: item.cc:9299
 
longlong val_int() override
Definition: item.cc:9210
 
Item_ref super
Definition: item.h:6248
 
bool subst_argument_checker(uchar **) override
Definition: item.h:6277
 
Table_ref * get_first_inner_table() const
Definition: item.h:6363
 
bool val_json(Json_wrapper *wr) override
Get a JSON value from an Item.
Definition: item.cc:9250
 
table_map used_tables() const override
Takes into account whether an Item in a derived table / view is part of an inner table of an outer jo...
Definition: item.h:6285
 
String * val_str(String *str) override
Definition: item.cc:9234
 
bool check_column_privileges(uchar *arg) override
Check privileges of view column.
Definition: item.cc:1386
 
Item * replace_view_refs_with_clone(uchar *arg) override
Assuming this expression is part of a condition that would be pushed to a materialized derived table,...
Definition: item.cc:9333
 
my_decimal * val_decimal(my_decimal *dec) override
Definition: item.cc:9226
 
bool eq(const Item *item) const override
Compare two view column references for equality.
Definition: item.cc:9199
 
Base class that is used to represent any kind of expression in a relational query.
Definition: item.h:928
 
void increment_ref_count()
Increment reference count.
Definition: item.h:3476
 
virtual double val_real()=0
 
uint32 max_char_length() const
Definition: item.h:3429
 
String * make_empty_result()
Sets the result value of the function an empty string, using the current character set.
Definition: item.h:939
 
virtual const CHARSET_INFO * compare_collation() const
Definition: item.h:2655
 
virtual float get_filtering_effect(THD *thd, table_map filter_for_table, table_map read_tables, const MY_BITMAP *fields_to_ignore, double rows_in_table)
Calculate the filter contribution that is relevant for table 'filter_for_table' for this item.
Definition: item.h:2110
 
virtual Field::geometry_type get_geometry_type() const
Definition: item.h:3412
 
String str_value
str_values's main purpose is to cache the value in save_in_field
Definition: item.h:3636
 
bool skip_itemize(Item **res)
Helper function to skip itemize() for grammar-allocated items.
Definition: item.h:1201
 
void set_nullable(bool nullable)
Definition: item.h:3748
 
bool get_datetime_from_numeric(Datetime_val *dt, my_time_flags_t flags)
Convert a numeric type to datetime.
Definition: item.cc:1643
 
virtual bool change_context_processor(uchar *)
Definition: item.h:2872
 
void set_data_type_date()
Set all type properties for Item of DATE type.
Definition: item.h:1694
 
void set_data_type_blob(enum_field_types type, uint32 max_l)
Set the Item to be of BLOB type.
Definition: item.h:1681
 
virtual bool check_column_in_group_by(uchar *arg)
Check if all the columns present in this expression are present in GROUP BY clause of the derived tab...
Definition: item.h:3186
 
DTCollation collation
Character set and collation properties assigned for this Item.
Definition: item.h:3643
 
ulonglong val_uint()
Definition: item.h:1933
 
bool has_subquery() const
Definition: item.h:3507
 
virtual bool subst_argument_checker(uchar **arg)
Definition: item.h:3113
 
CostOfItem cost() const
Definition: item.h:3418
 
bool contains_item(uchar *arg)
Definition: item.h:2795
 
void set_data_type_bool()
Definition: item.h:1522
 
longlong val_int_from_decimal()
Definition: item.cc:477
 
bool has_stored_program() const
Definition: item.h:3510
 
String * val_string_from_int(String *str)
Definition: item.cc:314
 
int error_int()
Get the value to return from val_int() in case of errors.
Definition: item.h:2196
 
bool get_time_from_datetime(Time_val *time)
Convert datetime to time.
Definition: item.cc:1737
 
virtual bool subq_opt_away_processor(uchar *)
Definition: item.h:3622
 
bool get_date_from_int(Date_val *date, my_time_flags_t flags)
Convert val_int() to date.
Definition: item.cc:1599
 
void set_data_type(enum_field_types data_type)
Set the data type of the current Item.
Definition: item.h:1511
 
bool error_date()
Get the value to return from val_date() in case of errors.
Definition: item.h:2220
 
virtual bool collect_item_field_or_view_ref_processor(uchar *)
Collects fields and view references that have the qualifying table in the specified query block.
Definition: item.h:2842
 
bool has_aggregation() const
Definition: item.h:3515
 
virtual bool find_field_processor(uchar *)
Is this an Item_field which references the given Field argument?
Definition: item.h:2878
 
longlong val_int_from_datetime()
Definition: item.cc:502
 
void set_data_type_string(ulonglong max_char_length_arg)
Set the Item to be variable length string.
Definition: item.h:1615
 
my_decimal * val_decimal_from_string(my_decimal *decimal_value)
Definition: item.cc:377
 
void aggregate_float_properties(enum_field_types type, Item **items, uint nitems)
Set max_length and decimals of function if function is floating point and result length/precision dep...
Definition: item.cc:8105
 
bool is_nullable() const
Definition: item.h:3747
 
void set_data_type_geometry()
Set the data type of the Item to be GEOMETRY.
Definition: item.h:1753
 
double error_real()
Get the value to return from val_real() in case of errors.
Definition: item.h:2208
 
my_decimal * error_decimal(my_decimal *decimal_value)
Get the value to return from val_decimal() in case of errors.
Definition: item.h:2245
 
virtual bool do_itemize(Parse_context *pc, Item **res)
The core function that does the actual itemization.
Definition: item.cc:777
 
void save_in_field_no_error_check(Field *field, bool no_conversions)
A slightly faster value of save_in_field() that returns no error value (you will need to check thd->i...
Definition: item.h:1424
 
virtual enum_field_types actual_data_type() const
Retrieve actual data type for an item.
Definition: item.h:1487
 
static const CHARSET_INFO * default_charset()
Definition: item.cc:1806
 
virtual bool split_sum_func(THD *, Ref_item_array, mem_root_deque< Item * > *)
Definition: item.h:2541
 
void init_make_field(Send_field *tmp_field, enum enum_field_types type)
Definition: item.cc:6678
 
virtual bool propagate_type(THD *thd, const Type_properties &type)
Propagate data type specifications into parameters and user variables.
Definition: item.h:1312
 
virtual Item * replace_func_call(uchar *)
Definition: item.h:3326
 
String * val_string_from_date(String *str)
Definition: item.cc:340
 
bool is_non_deterministic() const
Definition: item.h:2479
 
void set_subquery()
Set the "has subquery" property.
Definition: item.h:3500
 
void fix_char_length(uint32 max_char_length_arg)
Definition: item.h:3450
 
void operator=(Item &)=delete
 
virtual bool is_bool_func() const
Definition: item.h:2626
 
void mark_subqueries_optimized_away()
Definition: item.h:3558
 
String * null_return_str()
Gets the value to return from val_str() when returning a NULL value.
Definition: item.h:2269
 
double val_real_from_decimal()
Definition: item.cc:459
 
virtual bool disable_constant_propagation(uchar *)
Definition: item.h:3122
 
Item()
Item constructor for general use.
Definition: item.cc:162
 
bool has_grouping_set_dep() const
Definition: item.h:3533
 
uint8 m_data_type
Data type assigned to Item.
Definition: item.h:3727
 
bool get_time_from_decimal(Time_val *time)
Convert val_decimal() to time.
Definition: item.cc:1715
 
void set_data_type_float()
Set the data type of the Item to be single precision floating point.
Definition: item.h:1585
 
void reset_aggregation()
Reset the "has aggregation" property.
Definition: item.h:3521
 
virtual Item * this_item()
Definition: item.h:3224
 
void print_for_order(const THD *thd, String *str, enum_query_type query_type, const char *used_alias) const
Prints the item when it's part of ORDER BY and GROUP BY.
Definition: item.cc:885
 
bool is_temporal_with_date() const
Definition: item.h:3372
 
virtual bool strip_db_table_name_processor(uchar *)
Definition: item.h:3611
 
static Item_result type_to_result(enum_field_types type)
Definition: item.h:1040
 
virtual table_map used_tables() const
Definition: item.h:2379
 
String * val_string_from_datetime(String *str)
Definition: item.cc:329
 
virtual bool equality_substitution_analyzer(uchar **)
Definition: item.h:3061
 
virtual bool find_item_in_field_list_processor(uchar *)
Definition: item.h:2871
 
virtual longlong val_date_temporal_at_utc()
Definition: item.h:2356
 
bool get_datetime_from_non_temporal(Datetime_val *dt, my_time_flags_t flags)
Convert a non-temporal type to datetime.
Definition: item.cc:1664
 
virtual bool val_date(Date_val *date, my_time_flags_t flags)=0
Evaluate the item and return result as a date value.
 
virtual bool created_by_in2exists() const
Whether this Item was created by the IN->EXISTS subquery transformation.
Definition: item.h:3556
 
static enum_field_types string_field_type(uint32 max_bytes)
Determine correct string field type, based on string length.
Definition: item.h:1810
 
bool error_json()
Get the value to return from val_json() in case of errors.
Definition: item.h:2129
 
virtual void cleanup()
Called for every Item after use (preparation and execution).
Definition: item.h:1273
 
virtual Item * real_item()
Definition: item.h:2639
 
virtual Item * equality_substitution_transformer(uchar *)
Definition: item.h:3063
 
void set_stored_program()
Set the "has stored program" property.
Definition: item.h:3503
 
virtual bool eq(const Item *) const
Compare this item with another item for equality.
Definition: item.cc:1476
 
virtual bool supports_partial_update(const Field_json *field) const
Check if this expression can be used for partial update of a given JSON column.
Definition: item.h:3828
 
virtual enum_field_types default_data_type() const
Get the default data (output) type for the specific item.
Definition: item.h:1500
 
void set_data_type_string(uint32 max_l, const CHARSET_INFO *cs)
Set the Item to be variable length string.
Definition: item.h:1633
 
virtual bool explain_subquery_checker(uchar **)
Definition: item.h:3117
 
bool get_datetime_from_time(Datetime_val *dt)
Convert val_time() to datetime.
Definition: item.cc:1616
 
uint m_ref_count
Number of references to this item.
Definition: item.h:3724
 
virtual Field * make_string_field(TABLE *table) const
Create a field to hold a string value from an item.
Definition: item.cc:6800
 
virtual bool replace_equal_field_checker(uchar **)
Definition: item.h:3129
 
virtual my_decimal * val_decimal(my_decimal *decimal_buffer)=0
 
void add_accum_properties(const Item *item)
Add more accumulated properties to an Item.
Definition: item.h:3495
 
virtual bool check_valid_arguments_processor(uchar *)
Definition: item.h:3135
 
longlong val_int_from_date()
Definition: item.cc:495
 
virtual Settable_routine_parameter * get_settable_routine_parameter()
Definition: item.h:3369
 
virtual Item * equal_fields_propagator(uchar *)
Definition: item.h:3120
 
bool error_bool()
Get the value to return from val_bool() in case of errors.
Definition: item.h:2184
 
virtual type_conversion_status save_in_field_inner(Field *field, bool no_conversions)
Helper function which does all of the work for save_in_field(Field*, bool), except some error checkin...
Definition: item.cc:7098
 
virtual bool remove_column_from_bitmap(uchar *arg)
Visitor interface for removing all column expressions (Item_field) in this expression tree from a bit...
Definition: item.h:2868
 
virtual bool update_depended_from(uchar *)
Definition: item.h:3045
 
void set_data_type_double()
Set the data type of the Item to be double precision floating point.
Definition: item.h:1577
 
my_decimal * val_decimal_from_int(my_decimal *decimal_value)
Definition: item.cc:370
 
void set_data_type_year()
Set the data type of the Item to be YEAR.
Definition: item.h:1772
 
virtual uint decimal_precision() const
Definition: item.cc:797
 
Item_result cmp_context
Comparison context.
Definition: item.h:3706
 
virtual void allow_array_cast()
A helper function to ensure proper usage of CAST(.
Definition: item.h:3841
 
virtual Item * truth_transformer(THD *thd, Bool_test test)
Informs an item that it is wrapped in a truth test, in case it wants to transforms itself to implemen...
Definition: item.h:3251
 
bool get_time_from_date(Time_val *time)
Convert date to time.
Definition: item.cc:1728
 
Item(const Item &)=delete
 
virtual Item * replace_equal_field(uchar *)
Definition: item.h:3128
 
virtual Item * element_index(uint)
Definition: item.h:3235
 
virtual bool check_function_as_value_generator(uchar *args)
Check if this item is allowed for a virtual column or inside a default expression.
Definition: item.cc:935
 
virtual void traverse_cond(Cond_traverser traverser, void *arg, traverse_order)
Definition: item.h:2776
 
bool get_time_from_numeric(Time_val *time)
Convert a numeric type to time.
Definition: item.cc:1746
 
uint float_length(uint decimals_par) const
Definition: item.h:2415
 
Field * tmp_table_field_from_field_type(TABLE *table, bool fixed_length) const
Create a field based on field_type of argument.
Definition: item.cc:6835
 
virtual Item * copy_andor_structure(THD *)
Definition: item.h:2633
 
virtual bool val_json(Json_wrapper *result)
Get a JSON value from an Item.
Definition: item.h:2082
 
virtual longlong val_int()=0
 
virtual Item_field * field_for_view_update()
Definition: item.h:3244
 
static constexpr uint8 PROP_GROUPING_FUNC
Set if the item or one or more of the underlying items is a GROUPING function.
Definition: item.h:3812
 
virtual void print(const THD *, String *str, enum_query_type) const
This method is used for to:
Definition: item.h:2503
 
enum_field_types data_type() const
Retrieve the derived data type of the Item.
Definition: item.h:1479
 
virtual bool collect_outer_field_processor(uchar *)
Definition: item.h:2800
 
static constexpr uint8 PROP_SUBQUERY
Set of properties that are calculated by accumulation from underlying items.
Definition: item.h:3799
 
Item_name_string item_name
Name from query.
Definition: item.h:3644
 
void set_data_type_int(enum_field_types type, bool unsigned_prop, uint32 max_width)
Set the data type of the Item to be a specific integer type.
Definition: item.h:1536
 
const Item * unwrap_for_eq() const
Unwrap an Item argument so that Item::eq() can see the "real" item, and not just the wrapper.
Definition: item.cc:1492
 
bool eq_by_collation(Item *item, const CHARSET_INFO *cs)
Compare two items using a given collation.
Definition: item.cc:6773
 
void print_item_w_name(const THD *thd, String *, enum_query_type query_type) const
Definition: item.cc:855
 
virtual String * val_str_ascii(String *str)
Definition: item.cc:274
 
virtual Item * get_tmp_table_item(THD *thd)
If an Item is materialized in a temporary table, a different Item may have to be used in the part of ...
Definition: item.h:2652
 
virtual bool fix_fields(THD *, Item **)
Definition: item.cc:5324
 
virtual bool check_column_privileges(uchar *thd)
Check privileges.
Definition: item.h:2937
 
bool fixed
True if item has been resolved.
Definition: item.h:3736
 
static bool bit_func_returns_binary(const Item *a, const Item *b)
Definition: item_func.cc:3339
 
enum_const_item_cache
How to cache constant JSON data.
Definition: item.h:996
 
@ CACHE_NONE
Don't cache.
Definition: item.h:998
 
@ CACHE_JSON_VALUE
Source data is a JSON string, parse and cache result.
Definition: item.h:1000
 
@ CACHE_JSON_ATOM
Source data is SQL scalar, convert and cache result.
Definition: item.h:1002
 
virtual Item_result result_type() const
Definition: item.h:1449
 
bool const_item() const
Returns true if item is constant, regardless of query evaluation state.
Definition: item.h:2440
 
longlong val_int_from_time()
Definition: item.cc:486
 
bool null_value
True if item is null.
Definition: item.h:3773
 
Type
Definition: item.h:963
 
@ SUBQUERY_ITEM
A subquery or predicate referencing a subquery.
Definition: item.h:979
 
@ ROW_ITEM
A row of other items.
Definition: item.h:980
 
@ INVALID_ITEM
Definition: item.h:964
 
@ INSERT_VALUE_ITEM
A value from a VALUES function (deprecated).
Definition: item.h:978
 
@ CACHE_ITEM
An internal item used to cache values.
Definition: item.h:981
 
@ REAL_ITEM
A floating-point literal value.
Definition: item.h:972
 
@ TRIGGER_FIELD_ITEM
An OLD or NEW field, used in trigger definitions.
Definition: item.h:985
 
@ SUM_FUNC_ITEM
A grouped aggregate function, or window function.
Definition: item.h:967
 
@ TYPE_HOLDER_ITEM
An internal item used to help aggregate a type.
Definition: item.h:982
 
@ NAME_CONST_ITEM
A NAME_CONST expression.
Definition: item.h:988
 
@ REF_ITEM
An indirect reference to another item.
Definition: item.h:977
 
@ FIELD_ITEM
A reference to a field (column) in a table.
Definition: item.h:965
 
@ INT_ITEM
An integer literal value.
Definition: item.h:970
 
@ FUNC_ITEM
A function call reference.
Definition: item.h:966
 
@ COND_ITEM
An AND or OR condition.
Definition: item.h:976
 
@ XPATH_NODESET_ITEM
Used in XPATH expressions.
Definition: item.h:986
 
@ PARAM_ITEM
A dynamic parameter used in a prepared statement.
Definition: item.h:983
 
@ ROUTINE_FIELD_ITEM
A variable inside a routine (proc, func, trigger)
Definition: item.h:984
 
@ DECIMAL_ITEM
A decimal literal value.
Definition: item.h:971
 
@ VALUES_COLUMN_ITEM
A value from a VALUES clause.
Definition: item.h:987
 
@ HEX_BIN_ITEM
A hexadecimal or binary literal value.
Definition: item.h:974
 
@ NULL_ITEM
A NULL value.
Definition: item.h:973
 
@ AGGR_FIELD_ITEM
A special field for certain aggregate operations.
Definition: item.h:968
 
@ DEFAULT_VALUE_ITEM
A default value for a column.
Definition: item.h:975
 
@ STRING_ITEM
A string literal value.
Definition: item.h:969
 
void set_data_type_bit(uint32 max_bits)
Set the data type of the Item to be bit.
Definition: item.h:1785
 
virtual bool collect_scalar_subqueries(uchar *)
Definition: item.h:3042
 
virtual Field * tmp_table_field(TABLE *)
Definition: item.h:2373
 
virtual uint64_t hash()
Generate hash unique to an item depending on its attributes.
Definition: item.h:2515
 
virtual bool check_cols(uint c)
Definition: item.cc:1412
 
virtual bool itemize(Parse_context *pc, Item **res) final
The same as contextualize() but with additional parameter.
Definition: item.h:1247
 
const bool is_parser_item
true if allocated directly by parser
Definition: item.h:3726
 
bool is_temporal_with_time() const
Definition: item.h:3378
 
bool get_datetime_from_string(Datetime_val *dt, my_time_flags_t flags)
Convert val_str() to datetime.
Definition: item.cc:1555
 
virtual bool visitor_processor(uchar *arg)
A processor to handle the select lex visitor framework.
Definition: item.cc:904
 
Parse_tree_node super
Definition: item.h:929
 
virtual Item * replace_item_view_ref(uchar *)
Definition: item.h:3327
 
bool cleanup_processor(uchar *)
cleanup() item if it is resolved ('fixed').
Definition: item.h:2791
 
void set_data_type_datetime(uint8 fsp)
Set all properties for Item of DATETIME type.
Definition: item.h:1719
 
virtual Item * replace_with_derived_expr_ref(uchar *arg)
Assuming this expression is part of a condition that would be pushed to the HAVING clause of a materi...
Definition: item.h:3207
 
virtual const CHARSET_INFO * charset_for_protocol()
Definition: item.h:2661
 
void set_aggregation()
Set the "has aggregation" property.
Definition: item.h:3518
 
virtual uint time_precision()
TIME precision of the item: 0..6.
Definition: item.cc:822
 
void delete_self()
Delete this item.
Definition: item.h:3360
 
bool m_in_check_constraint_exec_ctx
True if item is a top most element in the expression being evaluated for a check constraint.
Definition: item.h:3789
 
virtual uint datetime_precision()
DATETIME precision of the item: 0..6.
Definition: item.cc:837
 
virtual bool send(Protocol *protocol, String *str)
This is only called from items that is not of type item_field.
Definition: item.cc:7787
 
bool has_compatible_context(Item *item) const
Check whether this and the given item has compatible comparison context.
Definition: item.h:3393
 
virtual Item * replace_view_refs_with_clone(uchar *arg)
Assuming this expression is part of a condition that would be pushed to a materialized derived table,...
Definition: item.h:3217
 
virtual void pin_data_type()
Pin the data type for the item.
Definition: item.h:1476
 
virtual bool cache_const_expr_analyzer(uchar **cache_item)
Check if an item is a constant one and can be cached.
Definition: item.cc:7975
 
bool get_datetime_from_int(Datetime_val *dt, my_time_flags_t flags)
Convert val_int() to datetime.
Definition: item.cc:1593
 
virtual void apply_is_true()
Apply the IS TRUE truth property, meaning that an UNKNOWN result and a FALSE result are treated the s...
Definition: item.h:2617
 
Item * next_free
Intrusive list pointer for free list.
Definition: item.h:3632
 
virtual bool collect_item_field_or_ref_processor(uchar *)
Definition: item.h:2799
 
virtual bool val_bool()
Definition: item.cc:246
 
String * error_str()
Get the value to return from val_str() in case of errors.
Definition: item.h:2259
 
static enum_field_types type_for_variable(enum_field_types src_type)
Provide data type for a user or system variable, based on the type of the item that is assigned to th...
Definition: item.h:1099
 
uint8 m_accum_properties
Definition: item.h:3814
 
type_conversion_status save_str_value_in_field(Field *field, String *result)
Definition: item.cc:568
 
virtual bool check_column_in_window_functions(uchar *arg)
Check if all the columns present in this expression are present in PARTITION clause of window functio...
Definition: item.h:3178
 
void set_data_type_vector(uint32 max_l)
Set the data type of the Item to be VECTOR.
Definition: item.h:1743
 
virtual Item * update_value_transformer(uchar *)
Definition: item.h:3255
 
virtual Item * replace_outer_ref(uchar *)
Definition: item.h:3329
 
virtual bool reset_wf_state(uchar *arg)
Reset execution state for such window function types as determined by arg.
Definition: item.h:2913
 
void set_accum_properties(const Item *item)
Set accumulated properties for an Item.
Definition: item.h:3490
 
virtual bool repoint_const_outer_ref(uchar *arg)
This function applies only to Item_field objects referred to by an Item_ref object that has been mark...
Definition: item.h:3608
 
virtual bool cast_incompatible_args(uchar *)
Wrap incompatible arguments in CAST nodes to the expected data types.
Definition: item.h:2880
 
bool get_datetime_from_real(Datetime_val *dt, my_time_flags_t flags)
Convert val_real() to datetime.
Definition: item.cc:1573
 
virtual longlong val_date_temporal()
Return date value of item in packed longlong format.
Definition: item.cc:414
 
bool visit_all_analyzer(uchar **)
Definition: item.h:3057
 
virtual table_map not_null_tables() const
Return table map of tables that can't be NULL tables (tables that are used in a context where if they...
Definition: item.h:2392
 
virtual Item_result numeric_context_result_type() const
Result type when an item appear in a numeric context.
Definition: item.h:1454
 
my_decimal * val_decimal_from_date(my_decimal *decimal_value)
Definition: item.cc:396
 
longlong val_temporal_with_round(enum_field_types type, uint8 dec)
Get date or time value in packed longlong format.
Definition: item.cc:426
 
virtual void compute_cost(CostOfItem *root_cost) const
Compute the cost of evaluating this Item.
Definition: item.h:3617
 
bool can_be_substituted_for_gc(bool array=false) const
Check if this item is of a type that is eligible for GC substitution.
Definition: item.cc:8055
 
virtual Item * compile(Item_analyzer analyzer, uchar **arg_p, Item_transformer transformer, uchar *arg_t)
Perform a generic "compilation" of the Item tree, ie transform the Item tree by adding zero or more I...
Definition: item.h:2770
 
type_conversion_status save_in_field_no_warnings(Field *field, bool no_conversions)
Save the item into a field but do not emit any warnings.
Definition: item.cc:1818
 
bool error_time()
Get the value to return from val_time() in case of errors.
Definition: item.h:2232
 
virtual TYPELIB * get_typelib() const
Get the typelib information for an item of type set or enum.
Definition: item.h:1820
 
bool has_wf() const
Definition: item.h:3524
 
my_decimal * val_decimal_from_real(my_decimal *decimal_value)
Definition: item.cc:362
 
virtual bool collect_subqueries(uchar *)
Definition: item.h:3044
 
void aggregate_bit_properties(Item **items, uint nitems)
Set data type and properties of a BIT column.
Definition: item.cc:8273
 
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:3541
 
virtual void fix_after_pullout(Query_block *parent_query_block, Query_block *removed_query_block)
Fix after tables have been moved from one query_block level to the parent level, e....
Definition: item.h:1292
 
void set_data_type_char(uint32 max_l)
Set the Item to be fixed length string.
Definition: item.h:1656
 
bool get_date_from_real(Date_val *date, my_time_flags_t flags)
Convert val_real() to date.
Definition: item.cc:1567
 
virtual bool null_inside()
Definition: item.h:3239
 
bool get_time_from_int(Time_val *time)
Convert val_int() to time.
Definition: item.cc:1722
 
void set_data_type_json()
Set the data type of the Item to be JSON.
Definition: item.h:1762
 
bool unsigned_flag
Definition: item.h:3774
 
virtual bool aggregate_check_group(uchar *)
Definition: item.h:2988
 
bool propagate_type(THD *thd, enum_field_types def=MYSQL_TYPE_VARCHAR, bool pin=false, bool inherit=false)
Wrapper for easier calling of propagate_type(const Type_properties &).
Definition: item.h:1326
 
bool is_blob_field() const
Check if an item either is a blob field, or will be represented as a BLOB field if a field is created...
Definition: item.cc:1846
 
bool is_outer_reference() const
Definition: item.h:2486
 
bool get_date_from_string(Date_val *date, my_time_flags_t flags)
Convert val_str() to date.
Definition: item.cc:1563
 
virtual bool is_null()
The method allows to determine nullness of a complex expression without fully evaluating it,...
Definition: item.h:2598
 
bool const_for_execution() const
Returns true if item is constant during one query execution.
Definition: item.h:2452
 
void aggregate_temporal_properties(enum_field_types type, Item **items, uint nitems)
Set data type and fractional seconds precision for temporal functions.
Definition: item.cc:8159
 
longlong val_int_from_string()
Definition: item.cc:516
 
item_marker
< Values for member 'marker'
Definition: item.h:3663
 
@ MARKER_FUNC_DEP_NOT_NULL
When analyzing functional dependencies for only_full_group_by (says whether a nullable column can be ...
Definition: item.h:3677
 
@ MARKER_GROUP_BY_BIT
When creating an internal temporary table: marking group by fields.
Definition: item.h:3674
 
@ MARKER_TRAVERSAL
Used during traversal to avoid deleting an item twice.
Definition: item.h:3685
 
@ MARKER_DISTINCT_GROUP
When we change DISTINCT to GROUP BY: used for book-keeping of fields.
Definition: item.h:3680
 
@ MARKER_IMPLICIT_NE_ZERO
When contextualization or itemization adds an implicit comparison '0<>' (see make_condition()),...
Definition: item.h:3668
 
@ MARKER_NONE
Definition: item.h:3664
 
@ MARKER_COND_DERIVED_TABLE
When pushing conditions down to derived table: it says a condition contains only derived table's colu...
Definition: item.h:3683
 
@ MARKER_CONST_PROPAG
When doing constant propagation (e.g.
Definition: item.h:3671
 
@ MARKER_ICP_COND_USES_INDEX_ONLY
When pushing index conditions: it says whether a condition uses only indexed columns.
Definition: item.h:3688
 
virtual bool is_valid_for_pushdown(uchar *arg)
Check if all the columns present in this expression are from the derived table.
Definition: item.h:3167
 
virtual Item * copy_or_same(THD *)
Definition: item.h:2632
 
Item_name_string orig_name
Original item name (if it was renamed)
Definition: item.h:3645
 
virtual bool collect_grouped_aggregates(uchar *)
Definition: item.h:3043
 
virtual bool clean_up_after_removal(uchar *arg)
Clean up after removing the item from the item tree.
Definition: item.cc:8042
 
virtual cond_result eq_cmp_result() const
Definition: item.h:2414
 
bool get_time_from_non_temporal(Time_val *time)
Convert a non-temporal type to time.
Definition: item.cc:1769
 
uint32 max_char_length(const CHARSET_INFO *cs) const
Definition: item.h:3443
 
virtual Item * explain_subquery_propagator(uchar *)
Definition: item.h:3118
 
virtual void update_used_tables()
Updates used tables, not null tables information and accumulates properties up the item tree,...
Definition: item.h:2539
 
virtual bool aggregate_check_distinct(uchar *)
Definition: item.h:2986
 
bool evaluate(THD *thd, String *str)
Evaluate scalar item, possibly using the supplied buffer.
Definition: item.cc:7895
 
void set_wf()
Set the "has window function" property.
Definition: item.h:3527
 
virtual bool returns_array() const
Whether the item returns array of its data type.
Definition: item.h:3836
 
virtual void make_field(Send_field *field)
Definition: item.cc:6699
 
virtual Field * get_tmp_table_field()
If this Item is being materialized into a temporary table, returns the field that is being materializ...
Definition: item.h:2368
 
virtual bool is_outer_field() const
Definition: item.h:3458
 
void set_grouping_func()
Set the property: this item is a call to GROUPING.
Definition: item.h:3553
 
virtual void set_result_field(Field *)
Definition: item.h:2623
 
bool is_abandoned() const
Definition: item.h:3619
 
cond_result
Definition: item.h:991
 
@ COND_UNDEF
Definition: item.h:991
 
@ COND_TRUE
Definition: item.h:991
 
@ COND_FALSE
Definition: item.h:991
 
@ COND_OK
Definition: item.h:991
 
virtual bool walk(Item_processor processor, enum_walk walk, uchar *arg)
Traverses a tree of Items in prefix and/or postfix order.
Definition: item.h:2686
 
type_conversion_status save_time_in_field(Field *field)
Definition: item.cc:526
 
item_marker marker
This member has several successive meanings, depending on the phase we're in (.
Definition: item.h:3705
 
Item_result temporal_with_date_as_number_result_type() const
Similar to result_type() but makes DATE, DATETIME, TIMESTAMP pretend to be numbers rather than string...
Definition: item.h:1461
 
traverse_order
Definition: item.h:993
 
@ POSTFIX
Definition: item.h:993
 
@ PREFIX
Definition: item.h:993
 
virtual bool is_strong_side_column_not_in_fd(uchar *)
Definition: item.h:2990
 
virtual bool intro_version(uchar *)
Definition: item.h:2788
 
bool m_abandoned
true if item has been fully de-referenced
Definition: item.h:3725
 
virtual bool inform_item_in_cond_of_tab(uchar *)
Definition: item.h:2940
 
static constexpr uint8 PROP_STORED_PROGRAM
Definition: item.h:3800
 
virtual const Item * real_item() const
Definition: item.h:2640
 
bool is_temporal() const
Definition: item.h:3381
 
bool is_temporal_with_date_and_time() const
Definition: item.h:3375
 
virtual const char * full_name() const
Definition: item.h:2374
 
auto walk_helper_thunk(uchar *arg)
Definition: item.h:2694
 
void set_data_type_null()
Definition: item.h:1515
 
uint8 decimals
Number of decimals in result when evaluating this item.
Definition: item.h:3745
 
virtual bool val_datetime(Datetime_val *dt, my_time_flags_t flags)=0
Evaluate the item and return result as a datetime value.
 
virtual Item ** addr(uint)
Definition: item.h:3236
 
virtual Item * clone_item() const
Definition: item.h:2413
 
void set_data_type_string(uint32 max_l)
Set the Item to be variable length string.
Definition: item.h:1598
 
virtual void set_can_use_prefix_key()
Definition: item.h:1301
 
void set_data_type_timestamp(uint8 fsp)
Set all properties for Item of TIMESTAMP type.
Definition: item.h:1732
 
bool do_contextualize(Parse_context *) override
Definition: item.h:1187
 
void set_data_type_string(uint32 max_l, const DTCollation &coll)
Set the Item to be variable length string.
Definition: item.h:1645
 
virtual std::optional< ContainedSubquery > get_contained_subquery(const Query_block *outer_query_block)
If this item represents a IN/ALL/ANY/comparison_operator subquery, return that (along with data on ho...
Definition: item.h:1364
 
uint decrement_ref_count()
Decrement reference count.
Definition: item.h:3482
 
Item * convert_charset(THD *thd, const CHARSET_INFO *tocs, bool ignore_errors=false)
Convert constant string in this object into the specified character set.
Definition: item.cc:1510
 
virtual bool find_item_processor(uchar *arg)
Definition: item.h:2873
 
virtual void no_rows_in_result()
Definition: item.h:2631
 
virtual bool add_field_to_set_processor(uchar *)
Item::walk function.
Definition: item.h:2850
 
virtual bool add_field_to_cond_set_processor(uchar *)
Item::walk function.
Definition: item.h:2859
 
virtual Item * replace_with_derived_expr(uchar *arg)
Assuming this expression is part of a condition that would be pushed to the WHERE clause of a materia...
Definition: item.h:3196
 
uint reference_count() const
Definition: item.h:3473
 
bool get_time_from_real(Time_val *time)
Convert val_real() to time.
Definition: item.cc:1709
 
static enum_field_types result_to_type(Item_result result)
Definition: item.h:1020
 
virtual Item * replace_scalar_subquery(uchar *)
When walking the item tree seeing an Item_singlerow_subselect matching a target, replace it with a su...
Definition: item.h:3317
 
type_conversion_status save_in_field(Field *field, bool no_conversions)
Save a temporal value in packed longlong format into a Field.
Definition: item.cc:7066
 
virtual bool check_gcol_depend_default_processor(uchar *args)
Check if a generated expression depends on DEFAULT function with specific column name as argument.
Definition: item.h:3158
 
virtual bool is_splocal() const
Definition: item.h:3363
 
virtual bool val_time(Time_val *time)=0
Evaluate the item and return result as a time value.
 
Bool_test
< Modifier for result transformation
Definition: item.h:1006
 
@ BOOL_NOT_FALSE
Definition: item.h:1011
 
@ BOOL_IS_UNKNOWN
Definition: item.h:1009
 
@ BOOL_NOT_TRUE
Definition: item.h:1010
 
@ BOOL_IS_TRUE
Definition: item.h:1007
 
@ BOOL_ALWAYS_FALSE
Definition: item.h:1016
 
@ BOOL_NOT_UNKNOWN
Definition: item.h:1012
 
@ BOOL_ALWAYS_TRUE
Definition: item.h:1015
 
@ BOOL_IS_FALSE
Definition: item.h:1008
 
@ BOOL_IDENTITY
Definition: item.h:1013
 
@ BOOL_NEGATED
Definition: item.h:1014
 
String * check_well_formed_result(String *str, bool send_error, bool truncate)
Verifies that the input string is well-formed according to its character set.
Definition: item.cc:6722
 
virtual bool replace_field_processor(uchar *)
A processor that replaces any Fields with a Create_field_wrapper.
Definition: item.h:3578
 
virtual bool update_aggr_refs(uchar *)
A walker processor overridden by Item_aggregate_ref, q.v.
Definition: item.h:3341
 
bool get_date_from_time(Date_val *date)
Convert val_time() to date.
Definition: item.cc:1605
 
virtual void notify_removal()
Called when an item has been removed, can be used to notify external objects about the removal,...
Definition: item.h:1279
 
bool may_evaluate_const(const THD *thd) const
Return true if this is a const item that may be evaluated in the current phase of statement processin...
Definition: item.cc:1404
 
bool aggregate_type(const char *name, Item **items, uint count)
Aggregates data types from array of items into current item.
Definition: item.cc:609
 
virtual Item * replace_aggregate(uchar *)
Definition: item.h:3328
 
virtual String * val_str(String *str)=0
 
bool m_nullable
True if this item may hold the NULL value(if null_value may be set to true).
Definition: item.h:3770
 
virtual Item * replace_item_field(uchar *)
Transform processor used by Query_block::transform_grouped_to_derived to replace fields which used to...
Definition: item.h:3325
 
virtual bool mark_field_in_map(uchar *arg)
Mark underlying field in read or write map of a table.
Definition: item.h:2886
 
virtual bool basic_const_item() const
Returns true if this is a simple constant item like an integer, not a constant expression.
Definition: item.h:2401
 
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:3784
 
virtual bool get_timeval(my_timeval *tm, int *warnings)
Get timestamp in "struct timeval" format.
Definition: item.cc:1792
 
bool m_is_window_function
True if item represents window func.
Definition: item.h:3775
 
bool may_eval_const_item(const THD *thd) const
Definition: item.cc:237
 
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:1797
 
bool get_datetime_from_decimal(Datetime_val *dt, my_time_flags_t flags)
Convert val_decimal() to datetime.
Definition: item.cc:1586
 
static bool mark_field_in_map(Mark_field *mark_field, Field *field)
Helper function for mark_field_in_map(uchar *arg).
Definition: item.h:2895
 
Item * cache_const_expr_transformer(uchar *item)
Cache item if needed.
Definition: item.cc:8290
 
String * val_string_from_time(String *str)
Definition: item.cc:351
 
virtual Item ** this_item_addr(THD *, Item **addr_arg)
Definition: item.h:3231
 
virtual bool is_result_field() const
Definition: item.h:2624
 
virtual const Item * this_item() const
Definition: item.h:3225
 
void aggregate_decimal_properties(Item **items, uint nitems)
Set data type, precision and scale of item of type decimal from list of items.
Definition: item.cc:8139
 
virtual Item * transform(Item_transformer transformer, uchar *arg)
Perform a generic transformation of the Item tree, by adding zero or more additional Item objects to ...
Definition: item.cc:924
 
virtual enum_monotonicity_info get_monotonicity_info() const
Definition: item.h:1832
 
virtual bool collect_item_field_processor(uchar *)
Definition: item.h:2798
 
virtual bool has_aggregate_ref_in_group_by(uchar *)
Check if an aggregate is referenced from within the GROUP BY clause of the query block in which it is...
Definition: item.h:3055
 
uint32 max_length
Maximum length of result of evaluating this item, in number of bytes.
Definition: item.h:3661
 
bool get_date_from_numeric(Date_val *date, my_time_flags_t flags)
Convert a numeric type to date.
Definition: item.cc:1627
 
bool get_date_from_decimal(Date_val *date, my_time_flags_t flags)
Convert val_decimal() to date.
Definition: item.cc:1579
 
void set_data_type_longlong()
Set the data type of the Item to be longlong.
Definition: item.h:1553
 
static constexpr uint8 PROP_WINDOW_FUNCTION
Definition: item.h:3802
 
auto analyze_helper_thunk(uchar **arg)
See CompileItem.
Definition: item.h:2700
 
double val_real_from_string()
Definition: item.cc:468
 
bool update_null_value()
Make sure the null_value member has a correct value.
Definition: item.cc:7876
 
virtual bool gc_subst_analyzer(uchar **)
Analyzer function for GC substitution.
Definition: item.h:3566
 
void rename(char *new_name)
rename item (used for views, cleanup() return original name).
Definition: item.cc:915
 
bool aggregate_string_properties(enum_field_types type, const char *name, Item **items, uint nitems)
Aggregate string properties (character set, collation and maximum length) for string function.
Definition: item.cc:8215
 
virtual bool is_column_not_in_fd(uchar *)
Definition: item.h:2992
 
virtual longlong val_int_endpoint(bool left_endp, bool *incl_endp)
Definition: item.h:1870
 
virtual enum Type type() const =0
 
virtual uint cols() const
Definition: item.h:3234
 
virtual Item * gc_subst_transformer(uchar *)
Transformer function for GC substitution.
Definition: item.h:3570
 
virtual Bool3 local_column(const Query_block *) const
Definition: item.h:2993
 
virtual void bring_value()
Definition: item.h:3241
 
void set_data_type_time(uint8 fsp)
Set all type properties for Item of TIME type.
Definition: item.h:1706
 
void set_data_type_decimal(uint8 precision, uint8 scale)
Set the data type of the Item to be decimal.
Definition: item.h:1567
 
CostOfItem m_cost
The cost of evaluating this item.
Definition: item.h:3733
 
void quick_fix_field()
Definition: item.h:1300
 
virtual bool used_tables_for_level(uchar *arg)
Return used table information for the specified query block (level).
Definition: item.h:2929
 
my_decimal * val_decimal_from_time(my_decimal *decimal_value)
Definition: item.cc:405
 
virtual Item_result cast_to_int_type() const
Definition: item.h:1822
 
type_conversion_status save_date_in_field(Field *field)
Definition: item.cc:535
 
bool split_sum_func2(THD *thd, Ref_item_array ref_item_array, mem_root_deque< Item * > *fields, Item **ref, bool skip_registered)
Definition: item.cc:2395
 
bool get_time_from_string(Time_val *time)
Convert val_str() to time.
Definition: item.cc:1701
 
String * val_string_from_real(String *str)
Definition: item.cc:291
 
virtual bool is_non_const_over_literals(uchar *)
Definition: item.h:2874
 
virtual void mark_json_as_scalar()
For Items with data type JSON, mark that a string argument is treated as a scalar JSON value.
Definition: item.h:1353
 
void set_data_type_char(uint32 max_l, const CHARSET_INFO *cs)
Set the Item to be fixed length string.
Definition: item.h:1670
 
bool has_grouping_func() const
Definition: item.h:3548
 
virtual void save_org_in_field(Field *field)
Definition: item.h:1429
 
static constexpr uint8 PROP_AGGREGATION
Definition: item.h:3801
 
virtual Field * get_result_field() const
Definition: item.h:2625
 
longlong int_sort_key()
Produces a key suitable for filesort.
Definition: item.h:1912
 
int decimal_int_part() const
Definition: item.h:2420
 
virtual void set_data_type_inherited()
Set data type for item as inherited.
Definition: item.h:1470
 
String * val_string_from_decimal(String *str)
Definition: item.cc:321
 
virtual bool check_partition_func_processor(uchar *)
Check if a partition function is allowed.
Definition: item.h:3112
 
static constexpr uint8 PROP_HAS_GROUPING_SET_DEP
Set if the item or one or more of the underlying items contains a GROUP BY modifier (such as ROLLUP).
Definition: item.h:3807
 
virtual void bind_fields()
Bind objects from the current execution context to field objects in item trees.
Definition: item.h:2946
 
bool get_date_from_non_temporal(Date_val *date, my_time_flags_t flags)
Convert a non-temporal type to date.
Definition: item.cc:1683
 
Abstraction for accessing JSON values irrespective of whether they are (started out as) binary JSON v...
Definition: json_dom.h:1225
 
Definition: sql_list.h:494
 
Class used as argument to Item::walk() together with mark_field_in_map()
Definition: item.h:260
 
Mark_field(TABLE *table, enum_mark_columns mark)
Definition: item.h:262
 
Mark_field(enum_mark_columns mark)
Definition: item.h:263
 
TABLE *const table
If == NULL, update map of any table.
Definition: item.h:269
 
const enum_mark_columns mark
How to mark the map.
Definition: item.h:271
 
A typesafe replacement for DYNAMIC_ARRAY.
Definition: mem_root_array.h:432
 
Table_ref * save_next_local
Definition: item.h:523
 
void save_state(Name_resolution_context *context, Table_ref *table_list)
Definition: item.h:527
 
Table_ref * save_next_name_resolution_table
Definition: item.h:521
 
void update_next_local(Table_ref *table_list)
Definition: item.h:544
 
Table_ref * get_first_name_resolution_table()
Definition: item.h:548
 
Table_ref * save_table_list
Definition: item.h:519
 
bool save_resolve_in_select_list
Definition: item.h:522
 
Table_ref * save_first_name_resolution_table
Definition: item.h:520
 
void restore_state(Name_resolution_context *context, Table_ref *table_list)
Definition: item.h:536
 
Storage for name strings.
Definition: item.h:296
 
void copy(const char *str)
Definition: item.h:333
 
Name_string(const char *str, size_t length)
Definition: item.h:312
 
void copy(const LEX_STRING lex)
Definition: item.h:336
 
void set_or_copy(const char *str, size_t length, bool is_null_terminated)
Definition: item.h:298
 
bool eq_safe(const Name_string name) const
Definition: item.h:351
 
Name_string(const LEX_STRING str, bool is_null_terminated)
Definition: item.h:319
 
bool eq_safe(const char *str) const
Definition: item.h:346
 
Name_string(const LEX_STRING str)
Definition: item.h:313
 
Name_string()
Definition: item.h:306
 
bool eq(const char *str) const
Compare name to another name in C string, case insensitively.
Definition: item.h:342
 
void copy(const char *str, size_t length)
Variants for copy(), for various argument combinations.
Definition: item.h:330
 
Name_string(const LEX_CSTRING str)
Definition: item.h:314
 
Name_string(const char *str, size_t length, bool is_null_terminated)
Definition: item.h:315
 
void copy(const char *str, size_t length, const CHARSET_INFO *cs)
Allocate space using sql_strmake() or sql_strmake_with_convert().
Definition: item.cc:1422
 
bool eq(const Name_string name) const
Compare name to another name in Name_string, case insensitively.
Definition: item.h:350
 
void copy(const Name_string str)
Definition: item.h:338
 
void copy(const LEX_STRING *lex)
Definition: item.h:337
 
Base class for parse tree nodes (excluding the Parse_tree_root hierarchy)
Definition: parse_tree_node_base.h:231
 
bool end_parse_tree(Show_parse_tree *tree)
Definition: parse_tree_node_base.h:400
 
bool begin_parse_tree(Show_parse_tree *tree)
Definition: parse_tree_node_base.h:385
 
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:1179
 
Simple intrusive linked list.
Definition: sql_list.h:48
 
A set of THD members describing the current authenticated user.
Definition: sql_security_ctx.h:54
 
bool field
Definition: field.h:4494
 
virtual void set_out_param_info(Send_field *info)
Definition: item.h:694
 
virtual ~Settable_routine_parameter()=default
 
Settable_routine_parameter()=default
 
virtual void set_required_privilege(Access_bitmask privilege)
Set required privileges for accessing the parameter.
Definition: item.h:675
 
virtual bool set_value(THD *thd, sp_rcontext *ctx, Item **it)=0
 
virtual const Send_field * get_out_param_info() const
Definition: item.h:696
 
Holds the json parse tree being generated by the SHOW PARSE_TREE command.
Definition: parse_tree_node_base.h:140
 
A wrapper class for null-terminated constant strings.
Definition: sql_string.h:74
 
const char * ptr() const
Return string buffer.
Definition: sql_string.h:105
 
bool is_set() const
Check if m_ptr is set.
Definition: sql_string.h:109
 
size_t length() const
Return name length.
Definition: sql_string.h:113
 
void set(const char *str_arg, size_t length_arg)
Initialize from a C string whose length is already known.
Definition: sql_string.h:83
 
Using this class is fraught with peril, and you need to be very careful when doing so.
Definition: sql_string.h:169
 
bool append(const String &s)
Definition: sql_string.cc:419
 
const CHARSET_INFO * charset() const
Definition: sql_string.h:242
 
void set_charset(const CHARSET_INFO *charset_arg)
Definition: sql_string.h:241
 
const char * ptr() const
Definition: sql_string.h:251
 
bool set_or_copy_aligned(const char *s, size_t arg_length, const CHARSET_INFO *cs)
Definition: sql_string.cc:332
 
void mark_as_const()
Definition: sql_string.h:249
 
size_t length() const
Definition: sql_string.h:243
 
size_t numchars() const
Definition: sql_string.cc:538
 
bool copy()
Definition: sql_string.cc:198
 
void set(String &str, size_t offset, size_t arg_length)
Definition: sql_string.h:304
 
For each client connection we create a separate thread with THD serving as a thread/connection descri...
Definition: sql_lexer_thd.h:36
 
Table_ref * outer_join_nest() const
Returns the outer join nest that this Table_ref belongs to, if any.
Definition: table.h:3539
 
table_map map() const
Return table map derived from table number.
Definition: table.h:4122
 
bool is_view() const
Return true if this represents a named view.
Definition: table.h:3195
 
bool is_inner_table_of_outer_join() const
Return true if this table is an inner table of some outer join.
Definition: table.h:3554
 
bool outer_join
True if right argument of LEFT JOIN; false in other cases (i.e.
Definition: table.h:3949
 
Table_ref * next_local
Definition: table.h:3639
 
Table_ref * any_outer_leaf_table()
Return any leaf table that is not an inner table of an outer join.
Definition: table.h:3380
 
TABLE * table
Definition: table.h:3722
 
Table_ref * next_name_resolution_table
Definition: table.h:3719
 
This is an interface to be used from Item_trigger_field to access information about table trigger fie...
Definition: table_trigger_field_support.h:44
 
virtual TABLE * get_subject_table()=0
 
Time_val is a temporal type that represents only time.
Definition: my_temporal.h:55
 
int64_t for_comparison() const
Definition: my_temporal.h:116
 
Type properties, used to collect type information for later assignment to an Item object.
Definition: item.h:625
 
const uint32 m_max_length
Definition: item.h:656
 
const bool m_unsigned_flag
Definition: item.h:655
 
const DTCollation m_collation
Definition: item.h:657
 
Type_properties(enum_field_types type_arg)
Constructor for any signed numeric type or date type Defaults are provided for attributes like signed...
Definition: item.h:629
 
Type_properties(enum_field_types type_arg, const CHARSET_INFO *charset)
Constructor for character type, with explicit character set.
Definition: item.h:647
 
Type_properties(enum_field_types type_arg, bool unsigned_arg)
Constructor for any numeric type, with explicit signedness.
Definition: item.h:637
 
const enum_field_types m_type
Definition: item.h:654
 
Class used as argument to Item::walk() together with used_tables_for_level()
Definition: item.h:277
 
Used_tables(Query_block *select)
Definition: item.h:279
 
table_map used_tables
Accumulated used tables data.
Definition: item.h:282
 
Query_block *const select
Level for which data is accumulated.
Definition: item.h:281
 
Definition: item_cmpfunc.h:1917
 
Definition: mem_root_deque.h:289
 
A (partial) implementation of std::deque allocating its blocks on a MEM_ROOT.
Definition: mem_root_deque.h:111
 
iterator begin()
Definition: mem_root_deque.h:440
 
iterator end()
Definition: mem_root_deque.h:441
 
my_decimal class limits 'decimal_t' type to what we need in MySQL.
Definition: my_decimal.h:97
 
uint precision() const
Definition: my_decimal.h:135
 
bool sign() const
Definition: my_decimal.h:133
 
sp_head represents one instance of a stored program.
Definition: sp_head.h:389
 
Definition: sp_rcontext.h:77
 
Definition: item_func.h:3150
 
static MEM_ROOT mem_root
Definition: client_plugin.cc:114
 
#define L
Definition: ctype-tis620.cc:74
 
#define U
Definition: ctype-tis620.cc:73
 
#define E_DEC_OVERFLOW
Definition: decimal.h:149
 
static constexpr int DECIMAL_NOT_SPECIFIED
Definition: dtoa.h:54
 
enum_query_type
Query type constants (usable as bitmap flags).
Definition: enum_query_type.h:31
 
@ QT_NORMALIZED_FORMAT
Change all Item_basic_constant to ? (used by query rewrite to compute digest.) Un-resolved hints will...
Definition: enum_query_type.h:69
 
bool is_temporal_type_with_time(enum_field_types type)
Tests if field type is temporal and has time part, i.e.
Definition: field_common_properties.h:137
 
bool is_temporal_type(enum_field_types type)
Tests if field type is temporal, i.e.
Definition: field_common_properties.h:115
 
bool is_string_type(enum_field_types type)
Tests if field type is a string type.
Definition: field_common_properties.h:89
 
bool is_numeric_type(enum_field_types type)
Tests if field type is a numeric type.
Definition: field_common_properties.h:65
 
bool is_temporal_type_with_date(enum_field_types type)
Tests if field type is temporal and has date part, i.e.
Definition: field_common_properties.h:156
 
bool is_temporal_type_with_date_and_time(enum_field_types type)
Tests if field type is temporal and has date and time parts, i.e.
Definition: field_common_properties.h:177
 
This file contains the field type.
 
enum_field_types
Column types for MySQL Note: Keep include/mysql/components/services/bits/stored_program_bits....
Definition: field_types.h:55
 
@ MYSQL_TYPE_BOOL
Currently just a placeholder.
Definition: field_types.h:79
 
@ MYSQL_TYPE_TIME2
Internal to MySQL.
Definition: field_types.h:75
 
@ MYSQL_TYPE_VARCHAR
Definition: field_types.h:71
 
@ MYSQL_TYPE_LONGLONG
Definition: field_types.h:64
 
@ MYSQL_TYPE_LONG_BLOB
Definition: field_types.h:86
 
@ MYSQL_TYPE_VAR_STRING
Definition: field_types.h:88
 
@ MYSQL_TYPE_BLOB
Definition: field_types.h:87
 
@ MYSQL_TYPE_TINY
Definition: field_types.h:57
 
@ MYSQL_TYPE_TIME
Definition: field_types.h:67
 
@ MYSQL_TYPE_SET
Definition: field_types.h:83
 
@ MYSQL_TYPE_NEWDATE
Internal to MySQL.
Definition: field_types.h:70
 
@ MYSQL_TYPE_VECTOR
Definition: field_types.h:77
 
@ MYSQL_TYPE_JSON
Definition: field_types.h:80
 
@ MYSQL_TYPE_STRING
Definition: field_types.h:89
 
@ MYSQL_TYPE_NULL
Definition: field_types.h:62
 
@ MYSQL_TYPE_ENUM
Definition: field_types.h:82
 
@ MYSQL_TYPE_TINY_BLOB
Definition: field_types.h:84
 
@ MYSQL_TYPE_LONG
Definition: field_types.h:59
 
@ MYSQL_TYPE_BIT
Definition: field_types.h:72
 
@ MYSQL_TYPE_INVALID
Definition: field_types.h:78
 
@ MYSQL_TYPE_GEOMETRY
Definition: field_types.h:90
 
@ MYSQL_TYPE_NEWDECIMAL
Definition: field_types.h:81
 
@ MYSQL_TYPE_DECIMAL
Definition: field_types.h:56
 
@ MYSQL_TYPE_TYPED_ARRAY
Used for replication only.
Definition: field_types.h:76
 
@ MYSQL_TYPE_DOUBLE
Definition: field_types.h:61
 
@ MYSQL_TYPE_MEDIUM_BLOB
Definition: field_types.h:85
 
@ MYSQL_TYPE_DATETIME2
Internal to MySQL.
Definition: field_types.h:74
 
@ MYSQL_TYPE_SHORT
Definition: field_types.h:58
 
@ MYSQL_TYPE_DATE
Definition: field_types.h:66
 
@ MYSQL_TYPE_FLOAT
Definition: field_types.h:60
 
@ MYSQL_TYPE_TIMESTAMP
Definition: field_types.h:63
 
@ MYSQL_TYPE_INT24
Definition: field_types.h:65
 
@ MYSQL_TYPE_DATETIME
Definition: field_types.h:68
 
@ MYSQL_TYPE_TIMESTAMP2
Definition: field_types.h:73
 
@ MYSQL_TYPE_YEAR
Definition: field_types.h:69
 
static const std::string dec("DECRYPTION")
 
void my_error(int nr, myf MyFlags,...)
Fill in and print a previously registered error message.
Definition: my_error.cc:217
 
static int flags[50]
Definition: hp_test1.cc:40
 
enum_mysql_timestamp_type
Definition: mysql_time.h:45
 
#define MY_COLL_ALLOW_SUPERSET_CONV
Definition: item.h:175
 
const Name_string null_name_string
 
monotonicity_info
Definition: item.h:579
 
@ NON_MONOTONIC
Definition: item.h:580
 
@ MONOTONIC_STRICT_INCREASING
Definition: item.h:583
 
@ MONOTONIC_INCREASING_NOT_NULL
Definition: item.h:582
 
@ MONOTONIC_INCREASING
Definition: item.h:581
 
@ MONOTONIC_STRICT_INCREASING_NOT_NULL
Definition: item.h:584
 
Item * GetNthVisibleField(const mem_root_deque< Item * > &fields, size_t index)
Definition: item.h:7504
 
constexpr float COND_FILTER_STALE_NO_CONST
A special subcase of the above:
Definition: item.h:142
 
constexpr uint16 NO_FIELD_INDEX((uint16)(-1))
 
std::string ItemToString(const Item *item, enum_query_type q_type)
Definition: item.cc:11466
 
bool agg_item_charsets(DTCollation &c, const char *name, Item **items, uint nitems, uint flags)
Definition: item.cc:2946
 
longlong longlong_from_string_with_check(const CHARSET_INFO *cs, const char *cptr, const char *end, int unsigned_target)
Converts a string to a longlong integer, with warnings.
Definition: item.cc:3855
 
Bounds_checked_array< Item * > Ref_item_array
Definition: item.h:98
 
Item * TransformItem(Item *item, T &&transformer)
Same as WalkItem, but for Item::transform().
Definition: item.h:3904
 
#define MY_COLL_ALLOW_NONE
Definition: item.h:177
 
#define ITEM_TO_QUERY_SUBSTRING_CHAR_LIMIT
Max length of an Item string for its use in an error message.
Definition: item.h:363
 
Item_result numeric_context_result_type(enum_field_types data_type, Item_result result_type, uint8 decimals)
Definition: item.h:150
 
bool WalkItem(Item *item, enum_walk walk, T &&functor)
A helper class to give in a functor to Item::walk().
Definition: item.h:3869
 
Cached_item * new_Cached_item(THD *thd, Item *item)
Create right type of Cached_item for an item.
Definition: item_buff.cc:55
 
bool agg_item_charsets_for_comparison(DTCollation &c, const char *name, Item **items, uint nitems)
Definition: item.h:4176
 
Item * CompileItem(Item *item, T &&analyzer, U &&transformer)
Same as WalkItem, but for Item::compile().
Definition: item.h:3891
 
bool ItemsAreEqual(const Item *a, const Item *b)
Returns true iff the two items are equal, as in a->eq(b), after unwrapping refs and Item_cache object...
Definition: item.cc:11568
 
bool agg_item_charsets_for_string_result(DTCollation &c, const char *name, Item **items, uint nitems)
Definition: item.h:4169
 
size_t CountHiddenFields(const mem_root_deque< Item * > &fields)
Definition: item.h:7499
 
constexpr float COND_FILTER_EQUALITY
Filtering effect for equalities: col1 = col2.
Definition: item.h:115
 
static uint32 char_to_byte_length_safe(uint32 char_length_arg, uint32 mbmaxlen_arg)
Definition: item.h:144
 
void convert_and_print(const String *from_str, String *to_str, const CHARSET_INFO *to_cs)
Helper method: Convert string to the given charset, then print.
Definition: item.cc:11301
 
bool(Item::* Item_analyzer)(uchar **argp)
Definition: item.h:710
 
Item_field * FindEqualField(Item_field *item_field, table_map reachable_tables, bool replace, bool *found)
Definition: item.cc:11519
 
enum monotonicity_info enum_monotonicity_info
 
void item_init(void)
Init all special items.
Definition: item.cc:157
 
size_t CountVisibleFields(const mem_root_deque< Item * > &fields)
Definition: item.h:7494
 
constexpr float COND_FILTER_STALE
Value is out-of-date, will need recalculation.
Definition: item.h:126
 
bool convert_const_strings(DTCollation &coll, Item **args, uint nargs)
Convert constant strings according to a specific character set/collation.
Definition: item.cc:2860
 
bool agg_item_collations_for_comparison(DTCollation &c, const char *name, Item **items, uint nitems)
Aggregate collations for items used in a comparison operations.
Definition: item.cc:2840
 
Item_result item_cmp_type(Item_result a, Item_result b)
Definition: item.cc:9793
 
void(* Cond_traverser)(const Item *item, void *arg)
Definition: item.h:720
 
Item *(Item::* Item_transformer)(uchar *arg)
Type for transformers used by Item::transform and Item::compile.
Definition: item.h:719
 
std::string ItemToQuerySubstrNoCharLimit(const Item *item)
 
#define NAME_STRING(x)
Definition: item.h:356
 
bool is_null_on_empty_table(THD *thd, Item_field *i)
Check if the column reference that is currently being resolved, will be set to NULL if its qualifying...
Definition: item.cc:5978
 
constexpr float COND_FILTER_BETWEEN
Filtering effect for between: col1 BETWEEN a AND b.
Definition: item.h:119
 
constexpr float COND_FILTER_ALLPASS
Default condition filtering (selectivity) values used by get_filtering_effect() and friends when bett...
Definition: item.h:113
 
const String my_null_string
 
void SafeIncrement(T *num)
Increment *num if it is less than its maximal value.
Definition: item.h:779
 
bool AllItemsAreEqual(const Item *const *a, const Item *const *b, int num_items)
Returns true iff all items in the two arrays (which must be of the same size) are equal,...
Definition: item.cc:11572
 
double double_from_string_with_check(const CHARSET_INFO *cs, const char *cptr, const char *end)
Definition: item.cc:3823
 
#define MY_COLL_ALLOW_NUMERIC_CONV
Definition: item.h:178
 
constexpr float COND_FILTER_INEQUALITY
Filtering effect for inequalities: col1 > col2.
Definition: item.h:117
 
int stored_field_cmp_to_item(THD *thd, Field *field, Item *item)
Compare the value stored in field with the expression from the query.
Definition: item.cc:9952
 
#define MY_COLL_ALLOW_COERCIBLE_CONV
Definition: item.h:176
 
bool resolve_const_item(THD *thd, Item **ref, Item *cmp_item)
Substitute a const item with a simpler const item, if possible.
Definition: item.cc:9818
 
std::string ItemToQuerySubstr(const Item *item, const LEX *lex=nullptr, uint32 char_limit=ITEM_TO_QUERY_SUBSTRING_CHAR_LIMIT)
Definition: item.cc:11508
 
#define T
Definition: jit_executor_value.cc:373
 
A better implementation of the UNIX ctype(3) library.
 
static constexpr uint32_t MY_CS_PUREASCII
Definition: m_ctype.h:140
 
int my_strcasecmp(const CHARSET_INFO *cs, const char *s1, const char *s2)
Definition: m_ctype.h:651
 
static constexpr uint32_t MY_REPERTOIRE_UNICODE30
Definition: m_ctype.h:156
 
MYSQL_STRINGS_EXPORT CHARSET_INFO my_charset_bin
Definition: ctype-bin.cc:499
 
MYSQL_STRINGS_EXPORT CHARSET_INFO my_charset_utf8mb4_bin
Definition: ctype-utf8.cc:7813
 
MYSQL_STRINGS_EXPORT unsigned my_string_repertoire(const CHARSET_INFO *cs, const char *str, size_t len)
Definition: ctype.cc:799
 
static constexpr uint32_t MY_REPERTOIRE_ASCII
Definition: m_ctype.h:152
 
MYSQL_STRINGS_EXPORT CHARSET_INFO my_charset_utf8mb3_general_ci
Definition: ctype-utf8.cc:5785
 
MYSQL_PLUGIN_IMPORT CHARSET_INFO * system_charset_info
Definition: mysqld.cc:1574
 
Various macros useful for communicating with memory debuggers, such as Valgrind.
 
void TRASH(void *ptr, size_t length)
Put bad content in memory to be sure it will segfault if dereferenced.
Definition: memory_debugging.h:71
 
This file follows Google coding style, except for the name MEM_ROOT (which is kept for historical rea...
 
std::unique_ptr< T, Destroy_only< T > > unique_ptr_destroy_only
std::unique_ptr, but only destroying.
Definition: my_alloc.h:480
 
static void bitmap_set_bit(MY_BITMAP *map, uint bit)
Definition: my_bitmap.h:80
 
Header for compiler-dependent features.
 
#define MY_COMPILER_MSVC_DIAGNOSTIC_IGNORE(X)
Definition: my_compiler.h:247
 
#define MY_COMPILER_DIAGNOSTIC_PUSH()
save the compiler's diagnostic (enabled warnings, errors, ...) state
Definition: my_compiler.h:277
 
#define MY_COMPILER_DIAGNOSTIC_POP()
restore the compiler's diagnostic (enabled warnings, errors, ...) state
Definition: my_compiler.h:278
 
#define DBUG_FILE
Definition: my_dbug.h:194
 
#define DBUG_TRACE
Definition: my_dbug.h:146
 
It is interface module to fixed precision decimals library.
 
int my_decimal_int_part(uint precision, uint decimals)
Definition: my_decimal.h:85
 
void my_decimal_neg(decimal_t *arg)
Definition: my_decimal.h:337
 
int my_decimal_set_zero(my_decimal *d)
Definition: my_decimal.h:259
 
static constexpr int DECIMAL_MAX_PRECISION
maximum guaranteed precision of number in decimal digits (number of our digits * number of decimal di...
Definition: my_decimal.h:71
 
uint32 my_decimal_precision_to_length_no_truncation(uint precision, uint8 scale, bool unsigned_flag)
Definition: my_decimal.h:193
 
Utility functions for converting between ulonglong and double.
 
static constexpr double LLONG_MAX_DOUBLE
Definition: my_double2ulonglong.h:57
 
#define ulonglong2double(A)
Definition: my_double2ulonglong.h:46
 
Some integer typedefs for easier portability.
 
unsigned long long int ulonglong
Definition: my_inttypes.h:56
 
uint8_t uint8
Definition: my_inttypes.h:63
 
unsigned char uchar
Definition: my_inttypes.h:52
 
long long int longlong
Definition: my_inttypes.h:55
 
int8_t int8
Definition: my_inttypes.h:62
 
#define MY_INT32_NUM_DECIMAL_DIGITS
Definition: my_inttypes.h:100
 
#define MYF(v)
Definition: my_inttypes.h:97
 
int32_t int32
Definition: my_inttypes.h:66
 
uint16_t uint16
Definition: my_inttypes.h:65
 
#define MY_INT64_NUM_DECIMAL_DIGITS
Definition: my_inttypes.h:103
 
uint32_t uint32
Definition: my_inttypes.h:67
 
#define UINT_MAX32
Definition: my_inttypes.h:79
 
MYSQL_STRINGS_EXPORT long long my_strtoll10(const char *nptr, const char **endptr, int *error)
Definition: my_strtoll10.cc:87
 
Common header for many mysys elements.
 
uint64_t table_map
Definition: my_table_map.h:30
 
Server classes for temporal handling (DATE, TIME, DATETIME)
 
Interface for low level time utilities.
 
constexpr const int DATETIME_MAX_DECIMALS
Definition: my_time.h:134
 
unsigned int my_time_flags_t
Flags to str_to_datetime and number_to_datetime.
Definition: my_time.h:85
 
static int count
Definition: myisam_ftdump.cc:45
 
Common definition between mysql server & client.
 
#define MAX_BLOB_WIDTH
Default width for blob in bytes.
Definition: mysql_com.h:907
 
#define MAX_CHAR_WIDTH
Max width for a CHAR column, in number of characters.
Definition: mysql_com.h:905
 
static bool ignore_errors
Definition: mysqlcheck.cc:62
 
static bool replace
Definition: mysqlimport.cc:70
 
std::string str(const mysqlrouter::ConfigGenerator::Options::Endpoint &ep)
Definition: config_generator.cc:1078
 
static PFS_engine_table_share_proxy table
Definition: pfs.cc:61
 
Definition: buf0block_hint.cc:30
 
const std::string charset("charset")
 
Definition: commit_order_queue.h:34
 
PT & ref(PT *tp)
Definition: tablespace_impl.cc:359
 
bool length(const dd::Spatial_reference_system *srs, const Geometry *g1, double *length, bool *null) noexcept
Computes the length of linestrings and multilinestrings.
Definition: length.cc:76
 
bool index(const std::string &value, const String &search_for, uint32_t *idx)
Definition: contains.h:76
 
ValueType value(const std::optional< ValueType > &v)
Definition: gtid.h:83
 
ValueType max(X &&first)
Definition: gtid.h:103
 
size_t size(const char *const c)
Definition: base64.h:46
 
Cursor end()
A past-the-end Cursor.
Definition: rules_table_service.cc:192
 
std::string truncate(const std::string &str, const size_t max_length)
Truncates the given string to max_length code points.
Definition: utils_string.cc:418
 
std::string type_name(Value_type type)
Definition: jit_executor_value.cc:830
 
std::map< Key, Value, Compare, ut::allocator< std::pair< const Key, Value > > > map
Specialization of map which uses ut_allocator.
Definition: ut0new.h:2898
 
#define NullS
Definition of the null string (a null pointer of type char *), used in some of our string handling co...
Definition: nulls.h:33
 
type_conversion_status
Status when storing a value in a field or converting from one datatype to another.
Definition: field.h:197
 
#define MY_REPERTOIRE_NUMERIC
Definition: field.h:253
 
enum_field_types real_type_to_type(enum_field_types real_type)
Convert temporal real types as returned by field->real_type() to field type as returned by field->typ...
Definition: field.h:388
 
Value_generator_source
Enum to indicate source for which value generator is used.
Definition: field.h:468
 
@ VGS_DEFAULT_EXPRESSION
Definition: field.h:470
 
@ VGS_GENERATED_COLUMN
Definition: field.h:469
 
#define my_charset_numeric
Definition: field.h:252
 
Derivation
For use.
Definition: field.h:173
 
@ DERIVATION_COERCIBLE
Definition: field.h:177
 
@ DERIVATION_SYSCONST
Definition: field.h:178
 
@ DERIVATION_EXPLICIT
Definition: field.h:181
 
@ DERIVATION_NONE
Definition: field.h:174
 
@ DERIVATION_NUMERIC
Definition: field.h:176
 
@ DERIVATION_NULL
Definition: field.h:175
 
@ DERIVATION_IMPLICIT
Definition: field.h:179
 
File containing constants that can be used throughout the server.
 
constexpr const table_map RAND_TABLE_BIT
Definition: sql_const.h:113
 
constexpr const int MAX_TIME_WIDTH
-838:59:59
Definition: sql_const.h:70
 
constexpr const int MAX_DATE_WIDTH
YYYY-MM-DD.
Definition: sql_const.h:68
 
constexpr const size_t STRING_BUFFER_USUAL_SIZE
Definition: sql_const.h:126
 
constexpr const table_map OUTER_REF_TABLE_BIT
Definition: sql_const.h:112
 
constexpr const int MAX_DOUBLE_STR_LENGTH
-[digits].E+###
Definition: sql_const.h:158
 
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
 
constexpr const int MAX_DATETIME_WIDTH
YYYY-MM-DD HH:MM:SS.
Definition: sql_const.h:76
 
enum_mark_columns
Definition: sql_const.h:232
 
int stringcmp(const String *s, const String *t)
Definition: sql_string.cc:712
 
Our own string classes, used pervasively throughout the executor.
 
case opt name
Definition: sslopt-case.h:29
 
Access paths are a query planning structure that correspond 1:1 to iterators, in that an access path ...
Definition: access_path.h:238
 
Definition: m_ctype.h:421
 
unsigned mbmaxlen
Definition: m_ctype.h:445
 
Definition: item_cmpfunc.h:2856
 
Struct used to pass around arguments to/from check_function_as_value_generator.
Definition: item.h:486
 
int err_code
the error code found during check(if any)
Definition: item.h:493
 
int col_index
the order of the column in table
Definition: item.h:491
 
const char * banned_function_name
the name of the function which is not allowed
Definition: item.h:500
 
Value_generator_source source
Definition: item.h:498
 
int get_unnamed_function_error_code() const
Return the correct error code, based on whether or not if we are checking for disallowed functions in...
Definition: item.h:505
 
Check_function_as_value_generator_parameters(int default_error_code, Value_generator_source val_gen_src)
Definition: item.h:487
 
This class represents a subquery contained in some subclass of Item_subselect,.
Definition: item.h:860
 
Strategy strategy
The strategy for executing the subquery.
Definition: item.h:894
 
Strategy
The strategy for executing the subquery.
Definition: item.h:862
 
@ kMaterializable
An independent subquery that is materialized, e.g.
 
@ kIndependentSingleRow
An independent single-row subquery that is evaluated once, e.g.
 
@ kNonMaterializable
A subquery that is reevaluated for each row, e.g.
 
AccessPath * path
The root path of the subquery.
Definition: item.h:891
 
int row_width
The width (in bytes) of the subquery's rows.
Definition: item.h:900
 
The current state of the privilege checking process for the current user, SQL statement and SQL objec...
Definition: table.h:384
 
Aggregate_ref_update(Item_sum *target, Query_block *owner)
Definition: item.h:3334
 
Query_block * m_owner
Definition: item.h:3333
 
Item_sum * m_target
Definition: item.h:3332
 
Aggregate_replacement(Item_sum *target, Item_field *replacement)
Definition: item.h:3307
 
Item_field * m_replacement
Definition: item.h:3306
 
Item_sum * m_target
Definition: item.h:3305
 
Context struct used by walk method collect_scalar_subqueries to accumulate information about scalar s...
Definition: item.h:3029
 
Item * m_join_condition_context
Definition: item.h:3035
 
Location
Definition: item.h:3030
 
@ L_JOIN_COND
Definition: item.h:3030
 
@ L_HAVING
Definition: item.h:3030
 
@ L_SELECT
Definition: item.h:3030
 
@ L_WHERE
Definition: item.h:3030
 
bool m_collect_unconditionally
Definition: item.h:3036
 
int8 m_location
we are currently looking at this kind of clause, cf. enum Location
Definition: item.h:3034
 
Collect_scalar_subquery_info()=default
 
std::vector< Css_info > m_list
accumulated all scalar subqueries found
Definition: item.h:3032
 
Minion class under Collect_scalar_subquery_info ("Css").
Definition: item.h:3001
 
int8 m_locations
set of locations
Definition: item.h:3003
 
Item * m_join_condition
Where did we find item above? Used when m_location == L_JOIN_COND, nullptr for other locations.
Definition: item.h:3009
 
bool m_add_coalesce
If true, add a COALESCE around replaced subquery: used for implicitly grouped COUNT() in subquery sel...
Definition: item.h:3014
 
table_map m_correlation_map
Definition: item.h:3006
 
uint m_having_idx
Index of the having expression copied to select list.
Definition: item.h:3019
 
Item_singlerow_subselect * item
the scalar subquery
Definition: item.h:3005
 
bool m_add_having_compensation
Set iff m_add_coalesce is true: we may get a NULL anyway even for COUNT if a HAVING clause is false i...
Definition: item.h:3017
 
bool m_implicitly_grouped_and_no_union
If true, we can forego cardinality checking of the derived table.
Definition: item.h:3011
 
Mode m_default_value
Definition: item.h:3275
 
Item_field * m_outer_field
Definition: item.h:3269
 
Field * m_target
The field to be replaced.
Definition: item.h:3266
 
Item_field_replacement(Field *target, Item_field *item, Query_block *select, Mode default_value=Mode::CONFLATE)
Definition: item.h:3276
 
Mode
Definition: item.h:3270
 
Item_field * m_item
The replacement field replacement field iff outer ref.
Definition: item.h:3267
 
Item_func * m_target
The function call to be replaced.
Definition: item.h:3285
 
Item_func_call_replacement(Item_func *func_target, Item_field *item, Query_block *select)
Definition: item.h:3287
 
Item_field * m_item
The replacement field.
Definition: item.h:3286
 
Item_replacement(Query_block *transformed_block, Query_block *current_block)
Definition: item.h:3262
 
Query_block * m_curr_block
Transformed query block or a contained.
Definition: item.h:3259
 
Query_block * m_trans_block
Transformed query block.
Definition: item.h:3258
 
Item * m_target
The item identifying the view_ref to be replaced.
Definition: item.h:3295
 
Field * m_field
The replacement field.
Definition: item.h:3296
 
Item_view_ref_replacement(Item *target, Field *field, Query_block *select)
Definition: item.h:3300
 
Item_field * m_outer_field
replacement field if outer ref
Definition: item.h:3297
 
List< Item_func > stack
Definition: item.h:3126
 
< Argument object to change_context_processor
Definition: item.h:4398
 
Name_resolution_context * m_context
Definition: item.h:4399
 
Change_context(Name_resolution_context *context)
Definition: item.h:4400
 
Argument structure for walk processor Item::update_depended_from.
Definition: item.h:4415
 
Query_block * old_depended_from
Definition: item.h:4416
 
Query_block * new_depended_from
Definition: item.h:4417
 
The LEX object currently serves three different purposes:
Definition: sql_lex.h:3999
 
The MEM_ROOT is a simple arena, where allocations are carved out of larger blocks.
Definition: my_alloc.h:83
 
void * Alloc(size_t length)
Allocate memory.
Definition: my_alloc.h:145
 
Definition: mysql_lex_string.h:40
 
const char * str
Definition: mysql_lex_string.h:41
 
size_t length
Definition: mysql_lex_string.h:42
 
Definition: mysql_lex_string.h:35
 
char * str
Definition: mysql_lex_string.h:36
 
size_t length
Definition: mysql_lex_string.h:37
 
Definition: mysql_time.h:82
 
Definition: my_bitmap.h:43
 
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:413
 
Name_resolution_context * next_context
Link to next name res context with the same query block as the base.
Definition: item.h:420
 
Table_ref * view_error_handler_arg
Definition: item.h:458
 
Name_resolution_context * outer_context
The name resolution context to search in when an Item cannot be resolved in this context (the context...
Definition: item.h:418
 
Security_context * security_ctx
Security context of this name resolution context.
Definition: item.h:474
 
Table_ref * first_name_resolution_table
In most cases the two table references below replace 'table_list' above for the purpose of name resol...
Definition: item.h:438
 
Table_ref * last_name_resolution_table
Last table to search in the list of leaf table references that begins with first_name_resolution_tabl...
Definition: item.h:443
 
Query_block * query_block
Query_block item belong to, in case of merged VIEW it can differ from Query_block where item was crea...
Definition: item.h:450
 
bool resolve_in_select_list
When true, items are resolved in this context against Query_block::item_list, SELECT_lex::group_list ...
Definition: item.h:468
 
bool view_error_handler
Definition: item.h:457
 
Table_ref * table_list
List of tables used to resolve the items of this context.
Definition: item.h:430
 
void resolve_in_table_list_only(Table_ref *tables)
Definition: item.h:476
 
Environment data for the contextualization phase.
Definition: parse_tree_node_base.h:422
 
const char * alias
alias or table name
Definition: table.h:1687
 
bool has_null_row() const
Definition: table.h:2203
 
MY_BITMAP * fields_set_during_insert
A pointer to the bitmap of table fields (columns), which are explicitly set in the INSERT INTO statem...
Definition: table.h:1766
 
bool alias_name_used
Definition: table.h:1892
 
bool is_nullable() const
Return whether table is nullable.
Definition: table.h:2105
 
Definition: completion_hash.h:35
 
Descriptor of what and how to cache for Item::cache_const_expr_transformer/analyzer.
Definition: item.h:3850
 
Item * cache_item
Item to cache. Used as a binary flag, but kept as Item* for assertion.
Definition: item.h:3855
 
List< Item > stack
Path from the expression's top to the current item in item tree used to track parent of current item ...
Definition: item.h:3853
 
Item::enum_const_item_cache cache_arg
How to cache JSON data.
Definition: item.h:3857
 
Replacement of system's struct timeval to ensure we can carry 64 bit values even on a platform which ...
Definition: my_time_t.h:45
 
This file defines all base public constants related to triggers in MySQL.
 
enum_trigger_variable_type
Enum constants to designate NEW and OLD trigger pseudo-variables.
Definition: trigger_def.h:73
 
Item_result
Type of the user defined function return slot and arguments.
Definition: udf_registration_types.h:39
 
@ STRING_RESULT
not valid for UDFs
Definition: udf_registration_types.h:41
 
@ DECIMAL_RESULT
not valid for UDFs
Definition: udf_registration_types.h:45
 
@ REAL_RESULT
char *
Definition: udf_registration_types.h:42
 
@ INT_RESULT
double
Definition: udf_registration_types.h:43
 
@ INVALID_RESULT
Definition: udf_registration_types.h:40
 
@ ROW_RESULT
long long
Definition: udf_registration_types.h:44