147#define store_record(A, B) \
148 memcpy((A)->B, (A)->record[0], (size_t)(A)->s->reclength)
149#define restore_record(A, B) \
150 memcpy((A)->record[0], (A)->B, (size_t)(A)->s->reclength)
151#define cmp_record(A, B) \
152 memcmp((A)->record[0], (A)->B, (size_t)(A)->s->reclength)
154#define tmp_file_prefix "#sql"
155#define tmp_file_prefix_length 4
156#define TMP_TABLE_KEY_EXTRA 8
157#define PLACEHOLDER_TABLE_ROW_ESTIMATE 2
633 uint deadlock_weight_arg)
1085 memcpy(key_buff,
key, key_length);
1193 uint deadlock_weight);
1369#define STATUS_NOT_STARTED 1
1375#define STATUS_NOT_FOUND 2
1377#define STATUS_UPDATED 16
1382#define STATUS_NULL_ROW 32
1384#define STATUS_DELETED 64
1932 uint *blob_fld,
bool is_virtual);
1939 uint key_parts = 0)
const;
1998 assert(index_no < s->
keys);
2015 assert((
file ==
nullptr && file_arg !=
nullptr) ||
2016 (
file !=
nullptr && file_arg ==
nullptr));
2214 Key_map *covering_prefix_keys);
2472 if (
table->s->null_bytes > 0)
2473 memset(
table->null_flags, 255,
table->s->null_bytes);
2476#define MY_I_S_MAYBE_NULL 1
2477#define MY_I_S_UNSIGNED 2
2532#define VIEW_SUID_INVOKER 0
2533#define VIEW_SUID_DEFINER 1
2534#define VIEW_SUID_DEFAULT 2
2537#define VIEW_CHECK_NONE 0
2538#define VIEW_CHECK_LOCAL 1
2539#define VIEW_CHECK_CASCADED 2
2542#define VIEW_CHECK_OK 0
2543#define VIEW_CHECK_ERROR 1
2544#define VIEW_CHECK_SKIP 2
2547#define MAX_TDC_BLOB_SIZE 65536
2867 const char *table_name_arg,
size_t table_name_length_arg,
2885 alias, lock_type) {}
2928 alias(table_name_arg),
2939 const char *table_name_arg,
size_t table_name_length_arg,
2944 alias(table_name_arg),
2955 const char *table_name_arg,
size_t table_name_length_arg,
2959 alias(table_name_arg),
2970 const char *table_name_arg,
size_t table_name_length_arg,
2984 const char *table_name_arg,
size_t table_name_length_arg,
3000 const char *table_name_arg,
size_t table_name_length_arg,
3031 assert(cond ==
nullptr || cond == (
Item *)1 ||
m_join_cond !=
nullptr);
3217 tr->m_updated =
true;
3226 tr->m_inserted =
true;
3235 tr->m_deleted =
true;
3462 if (emb->outer_join)
return true;
4035 const char *
name()
override;
4053 const char *
name()
override;
4074 void next()
override;
4109 void next()
override;
4171 MY_BITMAP *write_set [[maybe_unused]]) {
4173 save[0] = read_set->bitmap;
4174 save[1] = write_set->bitmap;
4224 const char *source_name,
Field *field,
4225 bool is_create_table,
bool *error_reported);
4243 handlerton *engine_type,
bool is_create_table);
4246 uint db_stat, uint prgflag, uint ha_open_flags,
4247 TABLE *outparam,
bool is_create_table,
4250 const char *
key,
size_t key_length,
4251 bool open_secondary);
4259 bool preserve_lettercase);
4269int set_zone(
int nr,
int min_zone,
int max_zone);
4326 return (!strcmp(
"performance_schema", tl->
db) &&
4328 strstr(tl->
table_name,
"setup_") ==
nullptr);
4335 const char *
name =
table->s->table_name.str;
4343 uint *usable_parts,
bool use_extended_sk);
4345 uint primary_key_n,
KEY *keyinfo, uint key_n,
4346 uint key_part_n, uint *usable_parts,
4347 bool part_of_key_not_extended);
4363 if (!tl->
table)
return false;
4370 if (!tl->
table->
s)
return false;
4432 if (cte ==
nullptr) {
4439 while (ref_idx < cte->tmp_tables.size()) {
4488 return !
table->const_table && !(
table->is_nullable() &&
table->null_row);
4581 const char *db,
const char *
table,
4582 bool is_fix_view_cols_and_deps);
Kerberos Client Authentication nullptr
Definition: auth_kerberos_client_plugin.cc:250
int64 query_id_t
Definition: binlog.h:71
Per internal schema ACL access rules.
Definition: auth_common.h:143
Per internal table ACL access rules.
Definition: auth_common.h:105
RAII class to reset TABLE::autoinc_field_has_explicit_non_null_value after processing individual row ...
Definition: table.h:4461
TABLE * m_table
Definition: table.h:4470
Autoinc_field_has_explicit_non_null_value_reset_guard(TABLE *table)
Definition: table.h:4463
~Autoinc_field_has_explicit_non_null_value_reset_guard()
Definition: table.h:4465
Class that represents a single change to a column value in partial update of a JSON column.
Definition: table.h:1313
const char * old_data(const Field *field) const
Get a pointer to the start of the old data to be replaced.
Definition: table.cc:7715
size_t length() const
Definition: table.h:1334
size_t m_length
The size of the portion that is to be replaced.
Definition: table.h:1318
const char * new_data(const Field *field) const
Get a pointer to the start of the replacement data.
Definition: table.cc:7706
Binary_diff(size_t offset, size_t length)
Create a new Binary_diff object.
Definition: table.h:1327
size_t m_offset
The offset of the start of the change.
Definition: table.h:1315
size_t offset() const
Definition: table.h:1331
Definition: sql_bitmap.h:153
Class is used as a BLOB field value storage for intermediate GROUP_CONCAT results.
Definition: table.h:1273
bool truncated_value
Sign that some values were cut during saving into the storage.
Definition: table.h:1280
Blob_mem_storage()
Definition: table.cc:4090
void reset()
Definition: table.h:1286
void set_truncated_value(bool is_truncated_value)
Definition: table.h:1303
MEM_ROOT storage
Definition: table.h:1275
~Blob_mem_storage()
Definition: table.cc:4094
bool is_truncated_value() const
Definition: table.h:1306
char * store(const char *from, size_t length)
Function creates duplicate of 'from' string in 'storage' MEM_ROOT.
Definition: table.h:1300
Definition: item_cmpfunc.h:2703
After parsing, a Common Table Expression is accessed through a Table_ref.
Definition: table.h:4383
Common_table_expr(MEM_ROOT *mem_root)
Definition: table.h:4385
LEX_STRING name
Name of the WITH block. Used only for EXPLAIN FORMAT=tree.
Definition: table.h:4409
TABLE * clone_tmp_table(THD *thd, Table_ref *tl)
Produces, from the first tmp TABLE object, a clone TABLE object for Table_ref 'tl',...
Definition: sql_derived.cc:169
bool clear_all_references()
Empties the materialized CTE and informs all of its clones.
Definition: sql_union.cc:1592
bool recursive
True if it's a recursive CTE.
Definition: table.h:4400
Mem_root_array< Table_ref * > references
All references to this CTE in the statement, except those inside the query expression defining this C...
Definition: table.h:4398
void remove_table(Table_ref *tr)
Remove one table reference.
Definition: sql_derived.cc:252
bool substitute_recursive_reference(THD *thd, Query_block *sl)
Replaces the recursive reference in query block 'sl' with a clone of the first tmp table.
Definition: sql_derived.cc:239
Mem_root_array< Table_ref * > tmp_tables
List of all TABLE_LISTSs reading/writing to the tmp table created to materialize this CTE.
Definition: table.h:4407
API for getting cost estimates for server operations that are not directly related to a table object.
Definition: opt_costmodel.h:53
API for getting cost estimates for operations on table data.
Definition: opt_costmodel.h:241
void init(const Cost_model_server *cost_model_server, const TABLE *table)
Initializes the cost model object.
Definition: opt_costmodel.cc:67
Default_object_creation_ctx – default implementation of Object_creation_ctx.
Definition: table.h:222
const CHARSET_INFO * get_client_cs()
Definition: table.h:224
void change_env(THD *thd) const override
Definition: table.cc:218
void delete_backup_ctx() override
Definition: table.cc:216
Default_object_creation_ctx(THD *thd)
Definition: table.cc:203
const CHARSET_INFO * get_connection_cl()
Definition: table.h:226
Object_creation_ctx * create_backup_ctx(THD *thd) const override
Definition: table.cc:211
const CHARSET_INFO * m_connection_cl
connection_cl stores the value of collation_connection session variable.
Definition: table.h:260
const CHARSET_INFO * m_client_cs
client_cs stores the value of character_set_client session variable.
Definition: table.h:250
This structure is used to keep info about possible key for the result table of a derived table/view.
Definition: table.h:2804
table_map referenced_by
Definition: table.h:2806
Field_map used_fields
Definition: table.h:2807