144#define store_record(A, B) \
145 memcpy((A)->B, (A)->record[0], (size_t)(A)->s->reclength)
146#define restore_record(A, B) \
147 memcpy((A)->record[0], (A)->B, (size_t)(A)->s->reclength)
148#define cmp_record(A, B) \
149 memcmp((A)->record[0], (A)->B, (size_t)(A)->s->reclength)
151#define tmp_file_prefix "#sql"
152#define tmp_file_prefix_length 4
153#define TMP_TABLE_KEY_EXTRA 8
154#define PLACEHOLDER_TABLE_ROW_ESTIMATE 2
630 uint deadlock_weight_arg)
1084 memcpy(key_buff,
key, key_length);
1192 uint deadlock_weight);
1368#define STATUS_NOT_STARTED 1
1374#define STATUS_NOT_FOUND 2
1376#define STATUS_UPDATED 16
1381#define STATUS_NULL_ROW 32
1383#define STATUS_DELETED 64
1865 uint *blob_fld,
bool is_virtual);
1872 uint key_parts = 0)
const;
1931 assert(index_no < s->
keys);
1948 assert((
file ==
nullptr && file_arg !=
nullptr) ||
1949 (
file !=
nullptr && file_arg ==
nullptr));
2147 Key_map *covering_prefix_keys);
2393#define MY_I_S_MAYBE_NULL 1
2394#define MY_I_S_UNSIGNED 2
2449#define VIEW_SUID_INVOKER 0
2450#define VIEW_SUID_DEFINER 1
2451#define VIEW_SUID_DEFAULT 2
2454#define VIEW_CHECK_NONE 0
2455#define VIEW_CHECK_LOCAL 1
2456#define VIEW_CHECK_CASCADED 2
2459#define VIEW_CHECK_OK 0
2460#define VIEW_CHECK_ERROR 1
2461#define VIEW_CHECK_SKIP 2
2464#define MAX_TDC_BLOB_SIZE 65536
2782 const char *table_name_arg,
size_t table_name_length_arg,
2800 alias, lock_type) {}
2843 alias(table_name_arg),
2854 const char *table_name_arg,
size_t table_name_length_arg,
2859 alias(table_name_arg),
2870 const char *table_name_arg,
size_t table_name_length_arg,
2874 alias(table_name_arg),
2885 const char *table_name_arg,
size_t table_name_length_arg,
2899 const char *table_name_arg,
size_t table_name_length_arg,
2915 const char *table_name_arg,
size_t table_name_length_arg,
2946 assert(cond ==
nullptr || cond == (
Item *)1 ||
m_join_cond !=
nullptr);
3132 tr->m_updated =
true;
3141 tr->m_inserted =
true;
3150 tr->m_deleted =
true;
3374 if (emb->outer_join)
return true;
3947 const char *
name()
override;
3965 const char *
name()
override;
3986 void next()
override;
4021 void next()
override;
4083 MY_BITMAP *write_set [[maybe_unused]]) {
4085 save[0] = read_set->bitmap;
4086 save[1] = write_set->bitmap;
4136 const char *source_name,
Field *field,
4137 bool is_create_table,
bool *error_reported);
4155 handlerton *engine_type,
bool is_create_table);
4159 TABLE *outparam,
bool is_create_table,
4162 const char *
key,
size_t key_length,
4163 bool open_secondary);
4171 bool preserve_lettercase);
4181int set_zone(
int nr,
int min_zone,
int max_zone);
4238 return (!strcmp(
"performance_schema", tl->
db) &&
4240 strstr(tl->
table_name,
"setup_") ==
nullptr);
4255 uint *usable_parts,
bool use_extended_sk);
4258 uint key_part_n,
uint *usable_parts,
4259 bool part_of_key_not_extended);
4275 if (!tl->
table)
return false;
4282 if (!tl->
table->
s)
return false;
4344 if (cte ==
nullptr) {
4351 while (ref_idx < cte->tmp_tables.size()) {
4353 if (table !=
nullptr)
return table;
4493 const char *db,
const char *table,
4494 bool is_fix_view_cols_and_deps);
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:4373
TABLE * m_table
Definition: table.h:4382
Autoinc_field_has_explicit_non_null_value_reset_guard(TABLE *table)
Definition: table.h:4375
~Autoinc_field_has_explicit_non_null_value_reset_guard()
Definition: table.h:4377
Class that represents a single change to a column value in partial update of a JSON column.
Definition: table.h:1312
const char * old_data(const Field *field) const
Get a pointer to the start of the old data to be replaced.
Definition: table.cc:7659
size_t length() const
Definition: table.h:1333
size_t m_length
The size of the portion that is to be replaced.
Definition: table.h:1317
const char * new_data(const Field *field) const
Get a pointer to the start of the replacement data.
Definition: table.cc:7650
Binary_diff(size_t offset, size_t length)
Create a new Binary_diff object.
Definition: table.h:1326
size_t m_offset
The offset of the start of the change.
Definition: table.h:1314
size_t offset() const
Definition: table.h:1330
Definition: sql_bitmap.h:137
Class is used as a BLOB field value storage for intermediate GROUP_CONCAT results.
Definition: table.h:1272
bool truncated_value
Sign that some values were cut during saving into the storage.
Definition: table.h:1279
Blob_mem_storage()
Definition: table.cc:4056
void reset()
Definition: table.h:1285
void set_truncated_value(bool is_truncated_value)
Definition: table.h:1302
MEM_ROOT storage
Definition: table.h:1274
~Blob_mem_storage()
Definition: table.cc:4060
bool is_truncated_value() const
Definition: table.h:1305
char * store(const char *from, size_t length)
Function creates duplicate of 'from' string in 'storage' MEM_ROOT.
Definition: table.h:1299
Definition: item_cmpfunc.h:2696
After parsing, a Common Table Expression is accessed through a Table_ref.
Definition: table.h:4295
Common_table_expr(MEM_ROOT *mem_root)
Definition: table.h:4297
LEX_STRING name
Name of the WITH block. Used only for EXPLAIN FORMAT=tree.
Definition: table.h:4321
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:1585
bool recursive
True if it's a recursive CTE.
Definition: table.h:4312
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:4310
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:4319
API for getting cost estimates for server operations that are not directly related to a table object.
Definition: opt_costmodel.h:51
API for getting cost estimates for operations on table data.
Definition: opt_costmodel.h:239
void init(const Cost_model_server *cost_model_server, const TABLE *table)
Initializes the cost model object.
Definition: opt_costmodel.cc:60
Default_object_creation_ctx – default implementation of Object_creation_ctx.
Definition: table.h:219
const CHARSET_INFO * get_client_cs()
Definition: table.h:221
void change_env(THD *thd) const override
Definition: table.cc:211
void delete_backup_ctx() override
Definition: table.cc:209
Default_object_creation_ctx(THD *thd)
Definition: table.cc:196
const CHARSET_INFO * get_connection_cl()
Definition: table.h:223
Object_creation_ctx * create_backup_ctx(THD *thd) const override
Definition: table.cc:204
const CHARSET_INFO * m_connection_cl
connection_cl stores the value of collation_connection session variable.
Definition: table.h:257
const CHARSET_INFO * m_client_cs
client_cs stores the value of character_set_client session variable.
Definition: table.h:247
This structure is used to keep info about possible key for the result table of a derived table/view.
Definition: table.h:2719
table_map referenced_by
Definition: table.h:2721
Field_map used_fields
Definition: table.h:2722
uint key_part_count
Definition: table.h:2723
This iterates on those references to a derived table / view / CTE which are materialized.
Definition: table.h:4334
bool is_first() const
Definition: table.h:4362
TABLE * get_next()
Definition: table.h:4340
Table_ref *const start
The reference provided in construction.
Definition: table.h:4335
Derived_refs_iterator(Table_ref *start_arg)
Definition: table.h:4339
bool m_is_first
True when at first reference in list.
Definition: table.h:4337
size_t ref_idx
Current index in cte->tmp_tables.
Definition: table.h:4336
void rewind()
Definition: table.h:4357
These members were removed from TABLE_SHARE as they are not used in in the code.
Definition: table.h:4419
utype
Definition: table.h:4434
@ CASEUP
Definition: table.h:4439
@ NO
Definition: table.h:4444
@ NONE
Definition: table.h:4435
@ REL
Definition: table.h:4445
@ NEXT_NUMBER
Definition: table.h:4451
@ DATE
Definition: table.h:4436
@ PNR
Definition: table.h:4440
@ BIT_FIELD
Definition: table.h:4453
@ TIMESTAMP_OLD_FIELD
Definition: table.h:4454
@ GENERATED_FIELD
Definition: table.h:4460
@ INTERVAL_FIELD
Definition: table.h:4452
@ TIMESTAMP_UN_FIELD
Definition: table.h:4458
@ NOEMPTY
Definition: table.h:4438
@ CHECK
Definition: table.h:4446
@ YES
Definition: table.h:4443
@ TIMESTAMP_DNUN_FIELD
Definition: table.h:4459
@ BLOB_FIELD
Definition: table.h:4456
@ UNKNOWN_FIELD
Definition: table.h:4449
@ CASEDN
Definition: table.h:4450
@ TIMESTAMP_DN_FIELD
Definition: table.h:4457
@ PGNR
Definition: table.h:4442
@ EMPTY_VAL
Definition: table.h:4447
@ CAPITALIZE
Definition: table.h:4455
@ SHIELD
Definition: table.h:4437
@ BGNR
Definition: table.h:4441
bool null_field_first
Definition: table.h:4430
uchar frm_version
Definition: table.h:4468
handlerton * default_part_db_type
Definition: table.h:4429