154#define store_record(A, B) \
155 memcpy((A)->B, (A)->record[0], (size_t)(A)->s->reclength)
156#define restore_record(A, B) \
157 memcpy((A)->record[0], (A)->B, (size_t)(A)->s->reclength)
158#define cmp_record(A, B) \
159 memcmp((A)->record[0], (A)->B, (size_t)(A)->s->reclength)
161#define tmp_file_prefix "#sql"
162#define tmp_file_prefix_length 4
163#define TMP_TABLE_KEY_EXTRA 8
164#define PLACEHOLDER_TABLE_ROW_ESTIMATE 2
650 uint deadlock_weight_arg)
1114 memcpy(key_buff,
key, key_length);
1222 uint deadlock_weight);
1398#define STATUS_NOT_STARTED 1
1404#define STATUS_NOT_FOUND 2
1406#define STATUS_UPDATED 16
1411#define STATUS_NULL_ROW 32
1413#define STATUS_DELETED 64
1984 uint *blob_fld,
bool is_virtual);
1991 uint key_parts = 0)
const;
2050 assert(index_no < s->
keys);
2067 assert((
file ==
nullptr && file_arg !=
nullptr) ||
2068 (
file !=
nullptr && file_arg ==
nullptr));
2266 Key_map *covering_prefix_keys);
2530 if (
table->s->null_bytes > 0)
2531 memset(
table->null_flags, 255,
table->s->null_bytes);
2534#define MY_I_S_MAYBE_NULL 1
2535#define MY_I_S_UNSIGNED 2
2590#define VIEW_SUID_INVOKER 0
2591#define VIEW_SUID_DEFINER 1
2592#define VIEW_SUID_DEFAULT 2
2595#define VIEW_CHECK_NONE 0
2596#define VIEW_CHECK_LOCAL 1
2597#define VIEW_CHECK_CASCADED 2
2600#define VIEW_CHECK_OK 0
2601#define VIEW_CHECK_ERROR 1
2602#define VIEW_CHECK_SKIP 2
2605#define MAX_TDC_BLOB_SIZE 65536
2925 const char *table_name_arg,
size_t table_name_length_arg,
2943 alias, lock_type) {}
2986 alias(table_name_arg),
2997 const char *table_name_arg,
size_t table_name_length_arg,
3002 alias(table_name_arg),
3013 const char *table_name_arg,
size_t table_name_length_arg,
3017 alias(table_name_arg),
3028 const char *table_name_arg,
size_t table_name_length_arg,
3042 const char *table_name_arg,
size_t table_name_length_arg,
3058 const char *table_name_arg,
size_t table_name_length_arg,
3089 assert(cond ==
nullptr || cond == (
Item *)1 ||
m_join_cond !=
nullptr);
3278 tr->m_updated =
true;
3287 tr->m_inserted =
true;
3296 tr->m_deleted =
true;
3523 if (emb->outer_join)
return true;
3828 Item *sampling_percentage_arg) {
4141 const char *
name()
override;
4159 const char *
name()
override;
4180 void next()
override;
4215 void next()
override;
4279 MY_BITMAP *write_set [[maybe_unused]]) {
4281 save[0] = read_set->bitmap;
4282 save[1] = write_set->bitmap;
4332 const char *source_name,
Field *field,
4333 bool is_create_table,
bool *error_reported);
4351 handlerton *engine_type,
bool is_create_table);
4354 uint db_stat, uint prgflag, uint ha_open_flags,
4355 TABLE *outparam,
bool is_create_table,
4358 const char *
key,
size_t key_length,
4359 bool open_secondary);
4367 bool preserve_lettercase);
4377int set_zone(
int nr,
int min_zone,
int max_zone);
4434 return (!strcmp(
"performance_schema", tl->
db) &&
4436 strstr(tl->
table_name,
"setup_") ==
nullptr);
4443 const char *
name =
table->s->table_name.str;
4451 uint *usable_parts,
bool use_extended_sk);
4453 uint primary_key_n,
KEY *keyinfo, uint key_n,
4454 uint key_part_n, uint *usable_parts,
4455 bool part_of_key_not_extended);
4471 if (!tl->
table)
return false;
4478 if (!tl->
table->
s)
return false;
4536 :
start(start_arg) {}
4541 if (cte ==
nullptr) {
4548 while (ref_idx < cte->tmp_tables.size()) {
4597 return !
table->const_table && !(
table->is_nullable() &&
table->null_row);
4690 const char *db,
const char *
table,
4691 bool is_fix_view_cols_and_deps);
uint32_t Access_bitmask
Definition: auth_acls.h:34
Kerberos Client Authentication nullptr
Definition: auth_kerberos_client_plugin.cc:247
int64 query_id_t
Definition: binlog.h:72
Per internal schema ACL access rules.
Definition: auth_common.h:148
Per internal table ACL access rules.
Definition: auth_common.h:110
RAII class to reset TABLE::autoinc_field_has_explicit_non_null_value after processing individual row ...
Definition: table.h:4570
TABLE * m_table
Definition: table.h:4579
Autoinc_field_has_explicit_non_null_value_reset_guard(TABLE *table)
Definition: table.h:4572
~Autoinc_field_has_explicit_non_null_value_reset_guard()
Definition: table.h:4574
Class that represents a single change to a column value in partial update of a JSON column.
Definition: table.h:1342
const char * old_data(const Field *field) const
Get a pointer to the start of the old data to be replaced.
Definition: table.cc:8016
size_t length() const
Definition: table.h:1363
size_t m_length
The size of the portion that is to be replaced.
Definition: table.h:1347
const char * new_data(const Field *field) const
Get a pointer to the start of the replacement data.
Definition: table.cc:8007
Binary_diff(size_t offset, size_t length)
Create a new Binary_diff object.
Definition: table.h:1356
size_t m_offset
The offset of the start of the change.
Definition: table.h:1344
size_t offset() const
Definition: table.h:1360
Definition: sql_bitmap.h:154
Class is used as a BLOB field value storage for intermediate GROUP_CONCAT results.
Definition: table.h:1302
bool truncated_value
Sign that some values were cut during saving into the storage.
Definition: table.h:1309
Blob_mem_storage()
Definition: table.cc:4119
void reset()
Definition: table.h:1315
void set_truncated_value(bool is_truncated_value)
Definition: table.h:1332
MEM_ROOT storage
Definition: table.h:1304
~Blob_mem_storage()
Definition: table.cc:4123
bool is_truncated_value() const
Definition: table.h:1335
char * store(const char *from, size_t length)
Function creates duplicate of 'from' string in 'storage' MEM_ROOT.
Definition: table.h:1329
After parsing, a Common Table Expression is accessed through a Table_ref.
Definition: table.h:4491
Common_table_expr(MEM_ROOT *mem_root)
Definition: table.h:4493
LEX_STRING name
Name of the WITH block. Used only for EXPLAIN FORMAT=tree.
Definition: table.h:4517
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:171
bool clear_all_references()
Empties the materialized CTE and informs all of its clones.
Definition: sql_union.cc:948
bool recursive
True if it's a recursive CTE.
Definition: table.h:4508
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:4506
void remove_table(Table_ref *tr)
Remove one table reference.
Definition: sql_derived.cc:260
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:247
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:4515
API for getting cost estimates for server operations that are not directly related to a table object.
Definition: opt_costmodel.h:54
API for getting cost estimates for operations on table data.
Definition: opt_costmodel.h:242
void init(const Cost_model_server *cost_model_server, const TABLE *table)
Initializes the cost model object.
Definition: opt_costmodel.cc:68
Default_object_creation_ctx – default implementation of Object_creation_ctx.
Definition: table.h:229
const CHARSET_INFO * get_client_cs()
Definition: table.h:231
void change_env(THD *thd) const override
Definition: table.cc:221
void delete_backup_ctx() override
Definition: table.cc:219
Default_object_creation_ctx(THD *thd)
Definition: table.cc:206
const CHARSET_INFO * get_connection_cl()
Definition: table.h:233
Object_creation_ctx * create_backup_ctx(THD *thd) const override
Definition: table.cc:214
const CHARSET_INFO * m_connection_cl
connection_cl stores the value of collation_connection session variable.
Definition: table.h:267
const CHARSET_INFO * m_client_cs
client_cs stores the value of character_set_client session variable.
Definition: table.h:257
This structure is used to keep info about possible key for the result table of a derived table/view.
Definition: table.h:2862
table_map referenced_by
Definition: table.h:2864
Field_map used_fields
Definition: table.h:2865
uint key_part_count
Definition: table.h:2866
This iterates on those references to a derived table / view / CTE which are materialized.
Definition: table.h:4530
bool is_first() const
Definition: table.h:4559
TABLE * get_next()
Definition: table.h:4537
Derived_refs_iterator(const Table_ref *start_arg)
Definition: table.h:4535
const Table_ref * start
The reference provided in construction.
Definition: table.h:4531
bool m_is_first
True when at first reference in list.
Definition: table.h:4533
size_t ref_idx
Current index in cte->tmp_tables.
Definition: table.h:4532
void rewind()
Definition: table.h:4554
These members were removed from TABLE_SHARE as they are not used in in the code.
Definition: table.h:4616
utype
Definition: table.h:4631
@ CASEUP
Definition: table.h:4636
@ NO
Definition: table.h:4641
@ NONE
Definition: table.h:4632
@ REL
Definition: table.h:4642
@ NEXT_NUMBER
Definition: table.h:4648
@ DATE
Definition: table.h:4633
@ PNR
Definition: table.h:4637
@ BIT_FIELD
Definition: table.h:4650
@ TIMESTAMP_OLD_FIELD
Definition: table.h:4651
@ GENERATED_FIELD
Definition: table.h:4657
@ INTERVAL_FIELD
Definition: table.h:4649
@ TIMESTAMP_UN_FIELD
Definition: table.h:4655
@ NOEMPTY
Definition: table.h:4635
@ CHECK
Definition: table.h:4643
@ YES
Definition: table.h:4640
@ TIMESTAMP_DNUN_FIELD
Definition: table.h:4656
@ BLOB_FIELD
Definition: table.h:4653
@ UNKNOWN_FIELD
Definition: table.h:4646
@ CASEDN
Definition: table.h:4647
@ TIMESTAMP_DN_FIELD
Definition: table.h:4654
@ PGNR
Definition: table.h:4639
@ EMPTY_VAL
Definition: table.h:4644
@ CAPITALIZE
Definition: table.h:4652
@ SHIELD
Definition: table.h:4634
@ BGNR
Definition: table.h:4638
bool null_field_first
Definition: table.h:4627
uchar frm_version
Definition: table.h:4665
handlerton * default_part_db_type
Definition: table.h:4626
TYPELIB fieldnames
Definition: table.h:4666
const File_parser * view_def
For shares representing views File_parser object with view definition read from .FRM file.
Definition: table.h:4664
uint stored_fields
Definition: table.h:4628
FRM_context()
Definition: table.h:4618
~Field_iterator_natural_join() override=default
Natural_join_column * column_ref()
Definition: table.h:4187
void next() override
Definition: table.cc:5178
void set(Table_ref *table) override
Definition: table.cc:5172
Natural_join_column * cur_column_ref
Definition: table.h:4174
Field_iterator_natural_join()
Definition: table.h:4177
const char * name() override
Definition: table.h:4182
Item_ident * create_item(THD *thd) override
Definition: table.h:4183
List_iterator_fast< Natural_join_column > column_ref_it
Definition: table.h:4173
bool end_of_fields() override
Definition: table.h:4181
Field * field() override
Definition: table.h:4186
Generic iterator over the fields of an arbitrary table reference.
Definition: table.h:4204
Field_iterator * field_it
Definition: table.h:4209
Field_iterator_view view_field_it
Definition: table.h:4207
Table_ref * table_ref
Definition: table.h:4205
const char * get_table_name()
Definition: table.cc:5251
Field * field() override
Definition: table.h:4226
const char * get_db_name()
Definition: table.cc:5258
Field_iterator_table_ref()
Definition: table.h:4213
void set(Table_ref *table) override
Definition: table.cc:5228
Natural_join_column * get_or_create_column_ref(THD *thd, Table_ref *parent_table_ref)
Create new or return existing column reference to a column of a natural/using join.
Definition: table.cc:5319
Table_ref * first_leaf
Definition: table.h:4205
GRANT_INFO * grant()
Definition: table.cc:5278
void next() override
Definition: table.cc:5237
Field_iterator_table table_field_it
Definition: table.h:4206
Table_ref * last_leaf
Definition: table.h:4205
const char * name() override
Definition: table.h:4219
Natural_join_column * get_natural_column_ref()
Return an existing reference to a column of a natural/using join.
Definition: table.cc:5399
void set_field_iterator()
Definition: table.cc:5185
Item_ident * create_item(THD *thd) override
Definition: table.h:4223
bool end_of_fields() override
Definition: table.h:4216
Field_iterator_natural_join natural_join_it
Definition: table.h:4208
Item_ident * create_item(THD *thd) override
Definition: table.cc:5098
const char * name() override
Definition: table.cc:5096
Field ** ptr
Definition: table.h:4133
void set_table(TABLE *table)
Definition: table.h:4138
void next() override
Definition: table.h:4139
Field_iterator_table()
Definition: table.h:4136
bool end_of_fields() override
Definition: table.h:4140
void set(Table_ref *table) override
Definition: table.h:4137
Field * field() override
Definition: table.h:4143
Iterator over the fields of a merged derived table or view.
Definition: table.h:4150
void next() override
Definition: table.h:4157
Item_ident * create_item(THD *thd) override
Definition: table.cc:5116
Item * item()
Definition: table.h:4163
Table_ref * view
Definition: table.h:4152
Field_iterator_view()
Definition: table.h:4155
Field_translator * field_translator()
Definition: table.h:4164
Item ** item_ptr()
Definition: table.h:4161
void set(Table_ref *table) override
Definition: table.cc:5089
Field * field() override
Definition: table.h:4162
Field_translator * array_end
Definition: table.h:4151
const char * name() override
Definition: table.cc:5114
Field_translator * ptr
Definition: table.h:4151
bool end_of_fields() override
Definition: table.h:4158
virtual const char * name()=0
virtual Field * field()=0
virtual void set(Table_ref *)=0
virtual ~Field_iterator()=default
virtual Item_ident * create_item(THD *)=0
virtual bool end_of_fields()=0
A field that stores a JSON value.
Definition: field.h:3996
Definition: parse_file.h:87
Definition: sql_auth_cache.h:476
Base class to be used by handlers different shares.
Definition: handler.h:4162
Intrusive parameterized list.
Definition: sql_plist.h:75
Definition: sql_lex.h:501
A wrapper Item that normally returns its parameter, but becomes NULL when processing rows for rollup.
Definition: item_func.h:1719
Base class that is used to represent any kind of expression in a relational query.
Definition: item.h:930
Query optimization plan node.
Definition: sql_select.h:602
Vector of logical diffs describing changes to a JSON column.
Definition: json_diff.h:141
A path expression which can be used to seek to a position inside a JSON value.
Definition: json_path.h:295
Abstraction for accessing JSON values irrespective of whether they are (started out as) binary JSON v...
Definition: json_dom.h:1150
ulong flags
dupp key and pack flags
Definition: key.h:118
Definition: sql_list.h:654
Definition: sql_list.h:494
Context of the owner of metadata locks.
Definition: mdl.h:1415
A pending metadata lock request.
Definition: mdl.h:805
void set_type(enum_mdl_type type_arg)
Set type of lock request.
Definition: mdl.h:856
A granted metadata lock.
Definition: mdl.h:988
An abstract class for inspection of a connected subgraph of the wait-for graph.
Definition: mdl.h:923
Abstract class representing an edge in the waiters graph to be traversed by deadlock detection algori...
Definition: mdl.h:949
This class caches table_paths for materialized tables.
Definition: table.cc:7539
A typesafe replacement for DYNAMIC_ARRAY.
Definition: mem_root_array.h:432
Storage for name strings.
Definition: item.h:298
Item_field * table_field
Definition: table.h:2629
Field_translator * view_field
Definition: table.h:2628
Natural_join_column(Field_translator *field_param, Table_ref *tab)
Definition: table.cc:5018
const char * name()
Definition: table.cc:5041
Table_ref * table_ref
Definition: table.h:2630
bool is_common
Definition: table.h:2638
const char * db_name()
Definition: table.cc:5073
GRANT_INFO * grant()
Definition: table.cc:5087
Field * field()
Definition: table.cc:5060
const char * table_name()
Definition: table.cc:5068
Item_ident * create_item(THD *thd)
Definition: table.cc:5050
Object_creation_ctx – interface for creation context of database objects (views, stored routines,...
Definition: table.h:205
void restore_env(THD *thd, Object_creation_ctx *backup_ctx)
Definition: table.cc:194
Object_creation_ctx()=default
virtual Object_creation_ctx * create_backup_ctx(THD *thd) const =0
virtual void change_env(THD *thd) const =0
virtual void delete_backup_ctx()=0
virtual ~Object_creation_ctx()=default
Object_creation_ctx * set_n_backup(THD *thd)
Definition: table.cc:184
Query block level hints.
Definition: opt_hints.h:378
Table level hints.
Definition: opt_hints.h:567
Definition: sql_executor.h:256
This class represents a query block, aka a query specification, which is a query consisting of a SELE...
Definition: sql_lex.h:1174
This class represents a query expression (one query block or several query blocks combined with UNION...
Definition: sql_lex.h:638
Definition: sql_union.h:40
This class represents a buffer that can be used for multi-row reads.
Definition: record_buffer.h:47
A set of THD members describing the current authenticated user.
Definition: sql_security_ctx.h:54
Definition: sql_sort.h:156
An adapter that takes in another RowIterator and produces the same rows, just in sorted order.
Definition: sorting_iterator.h:58
Class to represent check constraint in the TABLE_SHARE.
Definition: sql_check_constraint.h:110
Class to represent check constraint in the TABLE instance.
Definition: sql_check_constraint.h:145
Using this class is fraught with peril, and you need to be very careful when doing so.
Definition: sql_string.h:167
For each client connection we create a separate thread with THD serving as a thread/connection descri...
Definition: sql_lexer_thd.h:36
Element that represents the table in the specific table cache.
Definition: table_cache.h:265
Cache for open TABLE objects.
Definition: table_cache.h:74
Table_check_intact()
Definition: table.h:619
bool has_keys
Definition: table.h:615
virtual void report_error(uint code, const char *fmt,...)=0
bool check(THD *thd, TABLE *table, const TABLE_FIELD_DEF *table_def)
Checks whether a table is intact.
Definition: table.cc:3786
virtual ~Table_check_intact()=default
Class representing a table function.
Definition: table_function.h:53
The Table_histograms_collection manages a collection of reference-counted snapshots of histogram stat...
Definition: table_histograms.h:239
The Table_histograms class represents a snapshot of the collection of histograms associated with a ta...
Definition: table_histograms.h:145
bool m_inserted
True if table is target of INSERT statement.
Definition: table.h:3892
LEX_STRING view_body_utf8
Definition: table.h:3999
bool force_index_group_saved
Definition: table.h:4105
bool view_no_explain
if true, EXPLAIN can't explain view due to insufficient rights.
Definition: table.h:4028
AccessPath * GetCachedMaterializedPath(const AccessPath *table_path)
Search m_materialized_path_cache for a materialization path for 'table_path'.
Definition: table.cc:7619
Common_table_expr * m_common_table_expr
If non-NULL, the CTE which this table is derived from.
Definition: table.h:3741
bool is_base_table() const
Definition: table.h:3187
bool m_is_sj_or_aj_nest
Definition: table.h:3640
const char * get_table_name() const
Returns the name of the table that this Table_ref represents.
Definition: table.h:3471
Key_map keys_in_use_for_group_by_saved
Definition: table.h:4100
List< String > * join_using_fields
Definition: table.h:3665
void set_privileges(Access_bitmask privilege)
Set granted privileges for a table.
Definition: table.h:3588
Item * derived_where_cond
WHERE condition from derived table.
Definition: table.h:3820
char timestamp_buffer[20]
Definition: table.h:3941
bool process_index_hints(const THD *thd, TABLE *table)
Compiles the tagged hints list and fills up TABLE::keys_in_use_for_query, TABLE::keys_in_use_for_grou...
Definition: table.cc:6403
MY_BITMAP read_set_saved
Definition: table.h:4107
bool is_updatable() const
Return true if table is updatable.
Definition: table.h:3261
ulonglong with_check
WITH CHECK OPTION.
Definition: table.h:3862
bool generate_keys(THD *thd)
Generate keys for a materialized derived table/view.
Definition: table.cc:7058
void set_lock(const Lock_descriptor &descriptor)
Definition: table.h:3617
Table_ref(TABLE *table_arg, const char *alias_arg)
This constructor can be used when a Table_ref is needed for an existing temporary table.
Definition: table.h:2952
Lock_descriptor m_lock_descriptor
Definition: table.h:3867
bool prepare_replace_filter(THD *thd)
Prepare replace filter for a view (used for REPLACE command)
Definition: table.cc:4741
bool can_push_condition_to_derived(THD *thd)
Check if we can push outer where condition to this derived table.
Definition: sql_derived.cc:1088
COND_EQUAL * cond_equal
Used with outer join.
Definition: table.h:4070
bool materializable_is_const(THD *thd) const
Checks if this is a table that contains zero rows or one row, and that can be materialized during opt...
Definition: table.cc:6554
bool setup_table_function(THD *thd)
Setup a table function to use materialization.
Definition: sql_derived.cc:1004
bool is_aj_nest() const
Definition: table.h:3097
table_map sj_inner_tables
Definition: table.h:3649
LEX * view_query() const
Return the valid LEX object for a view.
Definition: table.h:3367
Table_ref * first_leaf_table()
Return first leaf table of a base table or a view/derived table.
Definition: table.h:3335
enum Table_ref::@195 OPEN_NORMAL
Indicates that if Table_ref object corresponds to the table/view which requires special handling.
table_map m_map
Table map, derived from m_tableno.
Definition: table.h:3632
const Create_col_name_list * derived_column_names() const
Definition: table.h:4052
Table_ref * first_leaf_for_name_resolution()
Retrieve the first (left-most) leaf in a nested join tree with respect to name resolution.
Definition: table.cc:4879
const Create_col_name_list * m_derived_column_names
If the user has specified column names with the syntaxes "table name parenthesis column names": WITH ...
Definition: table.h:3752
Field_translator * field_translation
Array of selected expressions from a derived table or view.
Definition: table.h:3779
bool join_order_swapped
True if was originally the left argument of a RIGHT JOIN, before we made it the right argument of a L...
Definition: table.h:3879
Table_ref(TABLE *table_arg, const char *db_name_arg, size_t db_length_arg, const char *table_name_arg, size_t table_name_length_arg, const char *alias_arg, enum thr_lock_type lock_type_arg)
Creates a Table_ref object with pre-allocated strings for database, table and alias.
Definition: table.h:2924
bool is_multiple_tables() const
Return true if this is a view or derived table that is defined over more than one base table,...
Definition: table.h:3321
ulonglong m_table_ref_version
See comments for TABLE_SHARE::get_table_ref_version()
Definition: table.h:4089
Table_ref * outer_join_nest() const
Returns the outer join nest that this Table_ref belongs to, if any.
Definition: table.h:3505
bool has_tablesample() const
Definition: table.h:3833
double sampling_percentage_val
Definition: table.h:3730
void set_updatable()
Set table as updatable. (per default, a table is non-updatable)
Definition: table.h:3264
bool prepare_security(THD *thd)
Prepare security context for a view.
Definition: table.cc:4995
void set_deleted()
Set table and all referencing views as being deleted from.
Definition: table.h:3294
bool check_option_processed
true <=> VIEW CHECK OPTION condition is processed (also for prep. stmts)
Definition: table.h:3936
bool check_single_table(Table_ref **table_ref, table_map map)
Check which single table inside a view that matches a table map.
Definition: table.cc:4807
bool is_external() const
Is this table only available in an external storage engine?
Definition: table.cc:7466
void set_derived_query_expression(Query_expression *query_expr)
Set the query expression of a derived table or view.
Definition: table.h:3376
Query_block * schema_query_block
Definition: table.h:3765
ST_SCHEMA_TABLE * schema_table
Definition: table.h:3764
enum_table_ref_type m_table_ref_type
See comments for set_metadata_id()
Definition: table.h:4087
ulonglong updatable_view
VIEW can be updated.
Definition: table.h:3851
table_map map() const
Return table map derived from table number.
Definition: table.h:4043
Item * m_join_cond
If this table or join nest is the Y in "X [LEFT] JOIN Y ON C", this member points to C.
Definition: table.h:3639
bool cacheable_table
stop PS caching
Definition: table.h:3927
bool is_derived_unfinished_materialization() const
Definition: table.cc:7456
void set_derived_column_names(const Create_col_name_list *d)
Definition: table.h:4055
Table_ref * embedding
The nested join containing this table reference.
Definition: table.h:3923
bool is_placeholder() const
Definition: table.h:3213
bool schema_table_filled
Definition: table.h:4023
void set_updated()
Set table and all referencing views as being updated.
Definition: table.h:3276
void set_uses_materialization()
Set table to be materialized.
Definition: table.h:3253
Table_ref(const char *db_name, size_t db_length_arg, const char *table_name_arg, size_t table_name_length_arg, const char *alias_arg, enum thr_lock_type lock_type_arg, enum enum_mdl_type mdl_request_type)
Definition: table.h:3041
Field_translator * field_translation_end
pointer to element after last one in translation table above
Definition: table.h:3782
Security_context * find_view_security_context(THD *thd)
Find security context of current view.
Definition: table.cc:4964
Key_map merge_keys_saved
Definition: table.h:4098
bool setup_materialized_derived_tmp_table(THD *thd)
Sets up the tmp table to contain the derived table's rows.
Definition: sql_derived.cc:880
mem_root_deque< Table_ref * > * join_list
The join list immediately containing this table reference.
Definition: table.h:3925
bool is_mergeable() const
Return true if view or derived table and can be merged.
Definition: table.cc:6535
mem_root_deque< Table_ref * > * view_tables
Definition: table.h:3794
uint m_tableno
The members below must be kept aligned so that (1 << m_tableno) == m_map.
Definition: table.h:3631
void print(const THD *thd, String *str, enum_query_type query_type) const
Produce a textual identification of this object.
Definition: sql_lex.cc:2926
Table_ref * referencing_view
Definition: table.h:3801
void set_fulltext_searched()
Set table as full-text search (default is not fulltext searched)
Definition: table.h:3300
Table_ref * correspondent_table
Definition: table.h:3699
bool is_view() const
Return true if this represents a named view.
Definition: table.h:3166
List< Natural_join_column > * join_columns
Definition: table.h:3670
int view_check_option(THD *thd) const
Evaluate the check option of a view.
Definition: table.cc:4784
const char * get_db_name() const
Returns the name of the database that the referenced table belongs to.
Definition: table.h:3463
bool updating
True for tables and views being changed in a data change statement.
Definition: table.h:3904
bool m_insertable
True if VIEW/TABLE is insertable, based on analysis of query (SQL rules).
Definition: table.h:3888
void set_readonly()
Set table as readonly, ie it is neither updatable, insertable nor deletable during this statement.
Definition: table.h:3312
bool is_updated() const
Return true if table is being updated.
Definition: table.h:3273
bool m_updatable
True if VIEW/TABLE is updatable, based on analysis of query (SQL rules).
Definition: table.h:3886
void set_tableno(uint tableno)
Set table number.
Definition: table.h:4034
enum_view_algorithm effective_algorithm
The view algorithm that is actually used, if this is a view.
Definition: table.h:3866
bool is_inner_table_of_outer_join() const
Return true if this table is an inner table of some outer join.
Definition: table.h:3520
Table_ref * belong_to_view
Definition: table.h:3796
LEX * view
Definition: table.h:3775
bool set_insert_values(MEM_ROOT *mem_root)
Allocate a buffer for inserted column values.
Definition: table.cc:4828
MY_BITMAP read_set_internal_saved
Definition: table.h:4109
bool is_derived() const
Return true if this represents a derived table (an unnamed view)
Definition: table.h:3169
bool derived_keys_ready
true <=> all possible keys for a derived table were collected and could be re-used while statement re...
Definition: table.h:4079
const Table_ref * updatable_base_table() const
Return the base table entry of an updatable table.
Definition: table.h:3533
void restore_properties()
Restore persistent properties into TABLE from Table_ref.
Definition: table.cc:4512
Table_ref ** prev_global
Definition: table.h:3603
Query_block * query_block
Definition: table.h:3772
const Table_ref * top_table() const
Return the outermost view this table belongs to, or itself.
Definition: table.h:3147
void set_merged()
Set table to be merged.
Definition: table.h:3242
void set_insertable()
Set table as insertable-into. (per default, a table is not insertable)
Definition: table.h:3270
uint tableno() const
Return table number.
Definition: table.h:4040
size_t db_length
Definition: table.h:3881
List< Index_hint > * index_hints
Definition: table.h:3683
LEX_STRING select_stmt
text of (CREATE/SELECT) statement
Definition: table.h:3823
Table_ref(const char *db_name_arg, size_t db_length_arg, const char *table_name_arg, size_t table_name_length_arg, const char *alias_arg, enum thr_lock_type lock_type_arg)
Definition: table.h:3057
bool is_natural_join
Definition: table.h:3663
@ OPEN_IF_EXISTS
Definition: table.h:3955
@ OPEN_STUB
Definition: table.h:3962
@ OPEN_FOR_CREATE
Definition: table.h:3960
Query_expression * derived
This field is set to non-null for derived tables and views.
Definition: table.h:3738
MY_BITMAP lock_partitions_saved
Definition: table.h:4106
bool is_fulltext_searched() const
Returns true if a MATCH function references this table.
Definition: table.h:3303
Table_ref * natural_join
Definition: table.h:3657
bool outer_join
True if right argument of LEFT JOIN; false in other cases (i.e.
Definition: table.h:3876
Table_ref * parent_l
Definition: table.h:3803
bool is_table_function() const
Return true if this represents a table function.
Definition: table.h:3175
bool m_updated
True if table is target of UPDATE statement, or updated in IODKU stmt.
Definition: table.h:3890
bool optimized_away
true <=> this table is a const one and was optimized away.
Definition: table.h:4073
bool is_insertable() const
Return true if table is insertable-into.
Definition: table.h:3267
bool is_alias
true if an alias for this table was specified in the SQL.
Definition: table.h:3966
bool straight
Definition: table.h:3897
int fetch_number_of_rows(ha_rows fallback_estimate=PLACEHOLDER_TABLE_ROW_ESTIMATE)
Retrieve number of rows in the table.
Definition: table.cc:6600
void set_join_cond(Item *val)
Definition: table.h:3078
bool is_system_view
Definition: table.h:4002
uint8 trg_event_map
Indicates what triggers we need to pre-load for this Table_ref when opening an associated TABLE.
Definition: table.h:4022
Table_ref * last_leaf_for_name_resolution()
Retrieve the last (right-most) leaf in a nested join tree with respect to name resolution.
Definition: table.cc:4895
bool schema_table_reformed
Definition: table.h:3770
bool is_sj_or_aj_nest() const
Definition: table.h:3099
Key_map keys_in_use_for_query_saved
Definition: table.h:4099
MY_BITMAP write_set_saved
Definition: table.h:4108
List< String > * partition_names
Definition: table.h:4031
bool force_index_order_saved
Definition: table.h:4104
Query_expression * derived_query_expression() const
Return the query expression of a derived table or view.
Definition: table.h:3381
bool ignore_leaves
preload only non-leaf nodes (IS THIS USED???)
Definition: table.h:3906
Table_ref * next_leaf
Definition: table.h:3819
bool is_leaf_for_name_resolution() const
Test if this is a leaf with respect to name resolution.
Definition: table.cc:4856
Table_ref * next_local
Definition: table.h:3601
Table_ref * merge_underlying_list
Definition: table.h:3788
LEX_CSTRING target_tablespace_name
Definition: table.h:3609
dd::enum_table_type required_type
Definition: table.h:3940
static Table_ref * new_nested_join(MEM_ROOT *allocator, const char *alias, Table_ref *embedding, mem_root_deque< Table_ref * > *belongs_to, Query_block *select)
Create a Table_ref object representing a nested join.
Definition: table.cc:4384
bool m_was_scalar_subquery
If true, this table is a derived (materialized) table which was created from a scalar subquery,...
Definition: table.h:3976
bool is_recursive_reference() const
Definition: table.h:3184
GRANT_INFO grant
Definition: table.h:3870
Table_ref * top_table()
Definition: table.h:3151
bool is_table_ref_id_equal(TABLE_SHARE *s) const
Compare the version of metadata from the previous execution (if any) with values obtained from the cu...
Definition: table.h:3425
void set_sj_or_aj_nest()
Makes the next a semi/antijoin nest.
Definition: table.h:3101
bool validate_tablesample_clause(THD *thd)
Definition: table.cc:7480
void set_table_ref_id(enum_table_ref_type table_ref_type_arg, ulonglong table_ref_version_arg)
Definition: table.h:3440
void set_tablesample(tablesample_type sampling_type_arg, Item *sampling_percentage_arg)
Definition: table.h:3827
bool is_internal() const
Definition: table.h:3203
bool prepare_view_security_context(THD *thd)
Load security context information for this view.
Definition: table.cc:4919
const Lock_descriptor & lock_descriptor() const
Definition: table.h:3621
bool nullable_saved
Definition: table.h:4102
NESTED_JOIN * nested_join
Is non-NULL if this table reference is a nested join, ie it represents the inner tables of an outer j...
Definition: table.h:3921
Table_ref(TABLE *table_arg, const char *alias_arg, enum_mdl_type mdl_type)
Sets an explicit enum_mdl_type value, without initializing m_lock_descriptor.
Definition: table.h:2969
const char * db
Definition: table.h:3604
Security_context * security_ctx
Definition: table.h:3808
bool is_inserted() const
Return true if table is being inserted into.
Definition: table.h:3282
Table_ref(const char *db_name, size_t db_length_arg, const char *table_name_arg, size_t table_name_length_arg, enum thr_lock_type lock_type_arg, enum enum_mdl_type mdl_request_type)
Definition: table.h:2996
bool materialize_derived(THD *thd)
Materialize derived table.
Definition: sql_derived.cc:1760
MaterializedPathCache * m_materialized_path_cache
If we've previously made an access path for “derived”, it is cached here.
Definition: table.h:3761
Security_context * view_sctx
Definition: table.h:3813
bool merge_where(THD *thd)
Merge WHERE condition of view or derived table into outer query.
Definition: table.cc:4548
ulonglong view_suid
view is suid (true by default)
Definition: table.h:3861
ulonglong algorithm
The declared algorithm, if this is a view.
Definition: table.h:3860
uint get_hidden_field_count_for_derived() const
Return the number of hidden fields added for the temporary table created for this derived table.
Definition: table.cc:7461
List< Derived_key > derived_key_list
Definition: table.h:4015
bool prepare_check_option(THD *thd, bool is_cascaded=false)
Prepare check option for a view.
Definition: table.cc:4682
void set_common_table_expr(Common_table_expr *c)
Definition: table.h:4050
Table_ref * next_global
Definition: table.h:3603
bool optimize_derived(THD *thd)
Optimize the query expression representing a derived table/view.
Definition: sql_derived.cc:1650
LEX_STRING timestamp
GMT time stamp of last operation.
Definition: table.h:3825
bool replace_filter_processed
true <=> Filter condition is processed
Definition: table.h:3938
tablesample_type sampling_type
Sampling information.
Definition: table.h:3727
Table_ref(const char *db_name, const char *table_name_arg, enum thr_lock_type lock_type_arg, enum enum_mdl_type mdl_request_type)
Definition: table.h:2981
mysql::binlog::event::Table_id table_id
Definition: table.h:3686
enum_open_type open_type
Specifies which kind of table should be open for this element of table list.
Definition: table.h:3932
Item * m_join_cond_optim
Optimized copy of m_join_cond (valid for one single execution).
Definition: table.h:4067
table_map join_cond_dep_tables
The outer tables that an outer join's join condition depends on.
Definition: table.h:3913
Table_ref * updatable_base_table()
Definition: table.h:3543
Item * replace_filter
Filter for REPLACE command.
Definition: table.h:3822
bool merge_underlying_tables(Query_block *select)
Merge tables from a query block into a nested join structure.
Definition: table.cc:4420
Common_table_expr * common_table_expr() const
If non-NULL, the CTE which this table is derived from.
Definition: table.h:4049
bool internal_tmp_table
Definition: table.h:3964
LEX_STRING source
source of CREATE VIEW
Definition: table.h:3824
bool update_sampling_percentage()
Definition: table.cc:7512
Table_ref(const char *db_name, size_t db_length_arg, const char *table_name_arg, size_t table_name_length_arg, enum thr_lock_type lock_type_arg)
Definition: table.h:3012
LEX_CSTRING view_connection_cl_name
Definition: table.h:3993
bool has_stored_program() const
Definition: table.cc:6549
LEX_CSTRING view_client_cs_name
Definition: table.h:3992
bool save_properties()
Save persistent properties from TABLE into Table_ref.
Definition: table.cc:4481
bool is_join_columns_complete
Definition: table.h:3672
bool m_is_recursive_reference
If a recursive reference inside the definition of a CTE.
Definition: table.h:4083
bool is_deleted() const
Return true if table is being deleted from.
Definition: table.h:3291
bool prelocking_placeholder
Definition: table.h:3946
LEX_USER definer
definer of view
Definition: table.h:3826
const char * table_name
Definition: table.h:3604
Item * sampling_percentage
Definition: table.h:3706
uint shared
Definition: table.h:3880
Item ** join_cond_optim_ref()
Definition: table.h:3092
bool create_field_translation(THD *thd)
Create field translation for merged derived table/view.
Definition: table.cc:4585
bool create_materialized_table(THD *thd)
Create result table for a materialized derived table/view.
Definition: sql_derived.cc:1698
uint query_block_id_for_explain() const
This is for showing in EXPLAIN.
Definition: table.cc:6348
Opt_hints_table * opt_hints_table
Table level optimizer hints for this table.
Definition: table.h:3613
tablesample_type get_sampling_type() const
Definition: table.h:3843
bool setup_materialized_derived(THD *thd)
Setup a derived table to use materialization.
Definition: sql_derived.cc:868
Table_ref * any_outer_leaf_table()
Return any leaf table that is not an inner table of an outer join.
Definition: table.h:3346
View_creation_ctx * view_creation_ctx
Definition: table.h:3980
char * option
Definition: table.h:3610
void AddMaterializedPathToCache(THD *thd, AccessPath *materialize_path, const AccessPath *table_path)
For a view or derived table: Add materialize_path and table_path to m_materialized_path_cache.
Definition: table.cc:7627
double get_sampling_percentage() const
Definition: table.cc:7528
Table_ref(const char *db_name, size_t db_length_arg, const char *table_name_arg, size_t table_name_length_arg, const char *alias_arg, enum enum_mdl_type mdl_request_type)
Sets an explicit enum_mdl_type value, without initializing m_lock_descriptor.
Definition: table.h:3027
TABLE * table
Definition: table.h:3684
void set_view_query(LEX *lex)
Set the LEX object of a view (will also define this as a view).
Definition: table.h:3364
void set_inserted()
Set table and all referencing views as being inserted into.
Definition: table.h:3285
bool update_derived_keys(THD *, Field *, Item **, uint, bool *)
Update derived table's list of possible keys.
Definition: table.cc:6921
uint query_block_id() const
If a derived table, returns query block id of first underlying query block.
Definition: table.cc:6343
bool m_fulltext_searched
True if fulltext searched.
Definition: table.h:3895
Item * join_cond() const
Definition: table.h:3077
Table_ref * next_name_resolution_table
Definition: table.h:3681
bool is_view_or_derived() const
Return true if this represents a named view or a derived table.
Definition: table.h:3172
bool is_merged() const
Return true if this is a derived table or view that is merged.
Definition: table.h:3239
void set_join_cond_optim(Item *cond)
Definition: table.h:3084
table_map dep_tables
The set of tables in the query block that this table depends on.
Definition: table.h:3911
size_t table_name_length
Definition: table.h:3882
bool uses_materialization() const
Return true if this is a materializable derived table/view.
Definition: table.h:3248
void add_join_natural(Table_ref *b)
Mark that there is a NATURAL JOIN or JOIN ... USING between two tables.
Definition: table.h:3578
bool is_sj_nest() const
Definition: table.h:3095
bool contain_auto_increment
Definition: table.h:3934
bool resolve_derived(THD *thd, bool apply_semijoin)
Resolve a derived table or view reference.
Definition: sql_derived.cc:274
Key_map covering_keys_saved
Definition: table.h:4097
uint leaf_tables_count() const
Return no. of base tables a merged view or derived table is defined over.
Definition: table.cc:6568
const char * alias
Definition: table.h:3604
Item * join_cond_optim() const
Definition: table.h:3083
bool set_recursive_reference()
Definition: table.cc:7449
Opt_hints_qb * opt_hints_qb
Definition: table.h:3615
bool is_dd_ctx_table
Definition: table.h:4010
Table_ref(TABLE *table_arg)
Only to be used by legacy code that temporarily needs a Table_ref, more specifically: Query_result_cr...
Definition: table.h:2912
bool is_fqtn
true if the table is referred to in the statement using a fully qualified name (<db_name>.
Definition: table.h:3970
bool force_index_saved
Definition: table.h:4103
Table_ref(const char *db_name, const char *table_name, enum thr_lock_type lock_type)
Constructor that can be used when the strings are null terminated.
Definition: table.h:2915
Item ** join_cond_ref()
Definition: table.h:3076
void ClearMaterializedPathCache()
Empty m_materialized_path_cache.
Definition: table.h:3723
Key_map keys_in_use_for_order_by_saved
Definition: table.h:4101
Table_function * table_function
Definition: table.h:3704
bool m_deleted
True if table is target of DELETE statement, or deleted in REPLACE stmt.
Definition: table.h:3894
MDL_request mdl_request
Definition: table.h:4025
Table_ref(const char *db_name, const char *table_name, const char *alias, enum thr_lock_type lock_type)
Constructor that can be used when the strings are null terminated.
Definition: table.h:2940
Item * check_option
WITH CHECK OPTION condition.
Definition: table.h:3821
Query_result_union * derived_result
Definition: table.h:3691
void set_table_ref_id(TABLE_SHARE *s)
Record the value of metadata version of the corresponding table definition cache element in this pars...
Definition: table.h:3436
void reset()
Reset table.
Definition: table.cc:4435
This class holds all information about triggers of a table.
Definition: table_trigger_dispatcher.h:68
Object containing parameters used when creating and using temporary tables.
Definition: temp_table_param.h:97
This class represents a trigger object.
Definition: trigger.h:90
Used for storing information associated with generated column, default values generated from expressi...
Definition: field.h:481
View_creation_ctx – creation context of view objects.
Definition: table.h:274
static View_creation_ctx * create(THD *thd)
Definition: table.cc:232
View_creation_ctx(THD *thd)
Definition: table.h:281
Class representing the fact that some thread waits for table share to be flushed.
Definition: table.h:643
MDL_context * m_ctx
Definition: table.h:644
Wait_for_flush ** prev_in_share
Definition: table.h:665
Wait_for_flush * next_in_share
Pointers for participating in the list of waiters for table share.
Definition: table.h:664
TABLE_SHARE * m_share
Definition: table.h:645
MDL_context * get_ctx() const
Definition: table.h:655
uint m_deadlock_weight
Definition: table.h:646
bool accept_visitor(MDL_wait_for_graph_visitor *dvisitor) override
Traverse portion of wait-for graph which is reachable through edge represented by this flush ticket i...
Definition: table.cc:3924
Wait_for_flush(MDL_context *ctx_arg, TABLE_SHARE *share_arg, uint deadlock_weight_arg)
Definition: table.h:649
uint get_deadlock_weight() const override
Definition: table.cc:3928
enum_rule
Definition: foreign_key.h:54
The handler class is the interface for dynamically loadable storage engines.
Definition: handler.h:4618
@ NONE
Definition: handler.h:4705
Histogram base class.
Definition: histogram.h:314
A (partial) implementation of std::deque allocating its blocks on a MEM_ROOT.
Definition: mem_root_deque.h:111
Each table share has a table id, it is mainly used for row based replication.
Definition: table_id.h:42
Definition: partition_info.h:209
A table definition from the master.
Definition: rpl_utility.h:249
static MEM_ROOT mem_root
Definition: client_plugin.cc:114
enum_query_type
Query type constants (usable as bitmap flags).
Definition: enum_query_type.h:31
This file contains the field type.
enum_field_types
Column types for MySQL Note: Keep include/mysql/components/services/bits/stored_program_bits....
Definition: field_types.h:55
void * memdup_root(MEM_ROOT *root, const void *str, size_t len)
Definition: my_alloc.cc:295
struct PSI_table_share PSI_table_share
Definition: psi_table_bits.h:100
static void free_share(st_blackhole_share *share)
Definition: ha_blackhole.cc:308
static int flag
Definition: hp_test1.cc:40
static uint keys
Definition: hp_test2.cc:49
enum_json_diff_operation
Enum that describes what kind of operation a Json_diff object represents.
Definition: json_diff.h:52
float rec_per_key_t
Data type for records per key estimates that are stored in the KEY::rec_per_key_float[] array.
Definition: key.h:96
enum_order
Definition: key_spec.h:65
@ ORDER_NOT_RELEVANT
Definition: key_spec.h:65
constexpr const LEX_CSTRING EMPTY_CSTR
Definition: lex_string.h:48
constexpr const LEX_CSTRING NULL_CSTR
Definition: lex_string.h:47
A better implementation of the UNIX ctype(3) library.
int my_strcasecmp(const CHARSET_INFO *cs, const char *s1, const char *s2)
Definition: m_ctype.h:651
MYSQL_PLUGIN_IMPORT CHARSET_INFO * system_charset_info
Definition: mysqld.cc:1564
#define MDL_REQUEST_INIT(R, P1, P2, P3, P4, P5)
Definition: mdl.h:909
@ MDL_TRANSACTION
Locks with transaction duration are automatically released at the end of transaction.
Definition: mdl.h:344
This file follows Google coding style, except for the name MEM_ROOT (which is kept for historical rea...
This file includes constants used by all storage engines.
#define HA_VIRTUAL_GEN_KEY
Set if a key is on any virtual generated columns.
Definition: my_base.h:553
ulong key_part_map
Definition: my_base.h:1008
my_off_t ha_rows
Definition: my_base.h:1141
#define HA_POS_ERROR
Definition: my_base.h:1143
ha_storage_media
Definition: my_base.h:116
@ HA_SM_DEFAULT
Definition: my_base.h:117
uint32 my_bitmap_map
Definition: my_bitmap.h:41
Header for compiler-dependent features.
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
int64_t int64
Definition: my_inttypes.h:68
uint16_t uint16
Definition: my_inttypes.h:65
uint32_t uint32
Definition: my_inttypes.h:67
Common header for many mysys elements.
uint64_t table_map
Definition: my_table_map.h:30
#define NAME_CHAR_LEN
Field/table name length.
Definition: mysql_com.h:60
ABI for instrumented mutexes.
static char * path
Definition: mysqldump.cc:150
std::string str(const mysqlrouter::ConfigGenerator::Options::Endpoint &ep)
Definition: config_generator.cc:1084
static PFS_engine_table_share_proxy table
Definition: pfs.cc:61
Definition: buf0block_hint.cc:30
static PFS_engine_table_share_proxy share
Definition: connection_control_pfs_table.cc:92
const std::string charset("charset")
The version of the current data dictionary table definitions.
Definition: dictionary_client.h:43
enum_table_type
Definition: abstract_table.h:53
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:75
Definition: column_statistics.h:34
Json_data_extension ext
Definition: backend.cc:50
entry::Table Table
Definition: select.h:51
size_t size(const char *const c)
Definition: base64.h:46
const char * table_name
Definition: rules_table_service.cc:56
const char * db_name
Definition: rules_table_service.cc:55
std::map< Key, Value, Compare, ut::allocator< std::pair< const Key, Value > > > map
Specialization of map which uses ut_allocator.
Definition: ut0new.h:2894
Performance schema instrumentation interface.
required string key
Definition: replication_asynchronous_connection_failover.proto:60
required uint32 status
Definition: replication_asynchronous_connection_failover.proto:61
repeated Source source
Definition: replication_asynchronous_connection_failover.proto:42
Value_generator_source
Enum to indicate source for which value generator is used.
Definition: field.h:471
enum_stats_auto_recalc
Definition: handler.h:3229
row_type
Definition: handler.h:686
void free_blobs(TABLE *table)
Definition: table.cc:3394
LEX_CSTRING SLOW_LOG_NAME
Definition: table.cc:153
bool update_generated_write_fields(const MY_BITMAP *bitmap, TABLE *table)
Calculate data for each generated field marked for write in the corresponding column map.
Definition: table.cc:7384
I_P_List< Wait_for_flush, I_P_List_adapter< Wait_for_flush, &Wait_for_flush::next_in_share, &Wait_for_flush::prev_in_share > > Wait_for_flush_list
Definition: table.h:672
enum_open_type
Type of table which can be open for an element of table list.
Definition: table.h:2847
@ OT_TEMPORARY_OR_BASE
Definition: table.h:2848
@ OT_TEMPORARY_ONLY
Definition: table.h:2849
@ OT_BASE_ONLY
Definition: table.h:2850
static my_bitmap_map * tmp_use_all_columns(TABLE *table, MY_BITMAP *bitmap)
Definition: table.h:4238
int64 query_id_t
Definition: table.h:144
bool unpack_value_generator(THD *thd, TABLE *table, Value_generator **val_generator, Value_generator_source source, const char *source_name, Field *field, bool is_create_table, bool *error_reported)
Unpacks the definition of a value generator in all its forms: generated column, default expression or...
Definition: table.cc:2589
static void tmp_restore_column_map(MY_BITMAP *bitmap, my_bitmap_map *old)
Definition: table.h:4245
static void empty_record(TABLE *table)
Definition: table.h:2528
bool assert_invalid_stats_is_locked(const TABLE *)
Assert that caller holds lock on the table cache when TABLE::m_invalid_stats is accessed.
Definition: table.cc:8342
static my_bitmap_map * dbug_tmp_use_all_columns(TABLE *table, MY_BITMAP *bitmap)
Definition: table.h:4252
char * fn_rext(char *name)
Returns pointer to '.frm' extension of the file name.
Definition: table.cc:307
bool is_simple_order(ORDER *order)
Test if the order list consists of simple field expressions.
Definition: table.cc:7227
LEX_CSTRING MYSQL_SCHEMA_NAME
Definition: table.cc:144
enum enum_mdl_type mdl_type_for_dml(enum thr_lock_type lock_type)
Derive type of metadata lock to be requested for table used by a DML statement from the type of THR_L...
Definition: table.h:2836
bool create_key_part_field_with_prefix_length(TABLE *table, MEM_ROOT *root)
Create a copy of the key_info from TABLE_SHARE object to TABLE object.
Definition: table.cc:2811
bool is_user_table(TABLE *table)
return true if the table was created explicitly.
Definition: table.h:4442
bool assert_invalid_dict_is_locked(const TABLE *)
Assert that LOCK_thd_data is held when TABLE::m_invalid_dict is accessed.
Definition: table.cc:8329
void update_create_info_from_table(HA_CREATE_INFO *info, TABLE *form)
Definition: table.cc:3561
enum_view_algorithm
Strategy for how to process a view or derived table (merge or materialization)
Definition: table.h:2584
@ VIEW_ALGORITHM_TEMPTABLE
Definition: table.h:2586
@ VIEW_ALGORITHM_UNDEFINED
Definition: table.h:2585
@ VIEW_ALGORITHM_MERGE
Definition: table.h:2587
Mem_root_array_YY< LEX_CSTRING > Create_col_name_list
Definition: table.h:142
LEX_CSTRING MI_INFO_NAME
Definition: table.cc:159
bool is_infoschema_db(const char *name, size_t len)
Definition: table.h:4405
bool update_generated_read_fields(uchar *buf, TABLE *table, uint active_index=MAX_KEY)
Evaluate necessary virtual generated columns.
Definition: table.cc:7322
bool is_perfschema_db(const char *name, size_t len)
Definition: table.h:4415
Ident_name_check
Enumerate possible status of a identifier name while determining its validity.
Definition: table.h:194
Ident_name_check check_and_convert_db_name(LEX_STRING *db, bool preserve_lettercase)
Check if database name is valid, and convert to lower case if necessary.
Definition: table.cc:3689
LEX_CSTRING GENERAL_LOG_NAME
Definition: table.cc:150
const uchar * get_field_name(const uchar *arg, size_t *length)
LEX_CSTRING WORKER_INFO_NAME
Definition: table.cc:162
tmp_table_type
Definition: table.h:417
@ TRANSACTIONAL_TMP_TABLE
Definition: table.h:420
@ NON_TRANSACTIONAL_TMP_TABLE
Definition: table.h:419
@ INTERNAL_TMP_TABLE
Definition: table.h:421
@ NO_TMP_TABLE
Definition: table.h:418
@ SYSTEM_TMP_TABLE
Definition: table.h:422
int closefrm(TABLE *table, bool free_share)
Free information allocated by openfrm.
Definition: table.cc:3352
enum_table_category
Category of table found in the table share.
Definition: table.h:428
@ TABLE_CATEGORY_ACL_TABLE
A ACL metadata table.
Definition: table.h:596
@ TABLE_UNKNOWN_CATEGORY
Unknown value.
Definition: table.h:432
@ TABLE_CATEGORY_USER
User table.
Definition: table.h:467
@ TABLE_CATEGORY_RPL_INFO
Replication Information Tables.
Definition: table.h:564
@ TABLE_CATEGORY_INFORMATION
Information schema tables.
Definition: table.h:501
@ TABLE_CATEGORY_GTID
Gtid Table.
Definition: table.h:581
@ TABLE_CATEGORY_DICTIONARY
A data dictionary table.
Definition: table.h:589
@ TABLE_CATEGORY_PERFORMANCE
Performance schema tables.
Definition: table.h:545
@ TABLE_CATEGORY_LOG
Log tables.
Definition: table.h:523
@ TABLE_CATEGORY_SYSTEM
System table, maintained by the server.
Definition: table.h:479
@ TABLE_CATEGORY_TEMPORARY
Temporary table.
Definition: table.h:457
bool is_temporary_table(const Table_ref *tl)
Check if a Table_ref instance represents a pre-opened temporary table.
Definition: table.h:4468
enum_table_ref_type
Enumerate possible types of a table from re-execution standpoint.
Definition: table.h:181
@ TABLE_REF_VIEW
Definition: table.h:184
@ TABLE_REF_BASE_TABLE
Definition: table.h:185
@ TABLE_REF_I_S_TABLE
Definition: table.h:186
@ TABLE_REF_TMP_TABLE
Definition: table.h:187
@ TABLE_REF_NULL
Initial value set by the parser.
Definition: table.h:183
bool check_column_name(const Name_string &namestring)
Definition: table.cc:3755
#define STATUS_DELETED
Reserved for use by multi-table delete. Means the row has been deleted.
Definition: table.h:1413
TABLE_CATEGORY get_table_category(const LEX_CSTRING &db, const LEX_CSTRING &name)
Definition: table.cc:313
uint add_pk_parts_to_sk(KEY *sk, uint sk_n, KEY *pk, uint pk_n, TABLE_SHARE *share, handler *handler_file, uint *usable_parts, bool use_extended_sk)
Generate extended secondary keys by adding primary key parts to the existing secondary key.
Definition: table.cc:818
bool can_call_position(const TABLE *table)
Definition: table.h:4596
#define STATUS_UPDATED
Reserved for use by multi-table update. Means the row has been updated.
Definition: table.h:1406
#define tmp_file_prefix
Prefix for tmp tables.
Definition: table.h:161
Lex_acl_attrib_udyn
This is generic enum.
Definition: table.h:2655
static const uint MYSQL_SCHEMA_DD_ID
Definition: table.h:4394
Bitmap< MAX_FIELDS > Field_map
Definition: table.h:1419
index_hint_type
Definition: table.h:1416
@ INDEX_HINT_FORCE
Definition: table.h:1416
@ INDEX_HINT_IGNORE
Definition: table.h:1416
@ INDEX_HINT_USE
Definition: table.h:1416
int create_table_share_for_upgrade(THD *thd, const char *path, TABLE_SHARE *share, FRM_context *frm_context, const char *db, const char *table, bool is_fix_view_cols_and_deps)
Create TABLE_SHARE from .frm file.
Definition: table.cc:8235
void append_unescaped(String *res, const char *pos, size_t length)
Store an SQL quoted string.
Definition: table.cc:3524
Ident_name_check check_table_name(const char *name, size_t length)
Function to check if table name is valid or not.
Definition: table.cc:3728
char * get_field(MEM_ROOT *mem, Field *field)
Allocate string field in MEM_ROOT and return it as NULL-terminated string.
Definition: table.cc:3623
LEX_CSTRING MYSQL_TABLESPACE_NAME
Definition: table.cc:147
static const uint MYSQL_TABLESPACE_DD_ID
Definition: table.h:4398
#define STATUS_NOT_STARTED
Flags for TABLE::m_status (maximum 8 bits).
Definition: table.h:1398
void setup_key_part_field(TABLE_SHARE *share, handler *handler_file, uint primary_key_n, KEY *keyinfo, uint key_n, uint key_part_n, uint *usable_parts, bool part_of_key_not_extended)
Setup key-related fields of Field object for given key and key part.
Definition: table.cc:740
void init_tmp_table_share(THD *thd, TABLE_SHARE *share, const char *key, size_t key_length, const char *table_name, const char *path, MEM_ROOT *mem_root)
Initialize share for temporary tables.
Definition: table.cc:469
enum enum_table_category TABLE_CATEGORY
Definition: table.h:598
LEX_CSTRING INFORMATION_SCHEMA_NAME
Definition: table.cc:137
void init_mdl_requests(Table_ref *table_list)
Helper function which allows to allocate metadata lock request objects for all elements of table list...
Definition: table.cc:6523
struct Table_share_foreign_key_info TABLE_SHARE_FOREIGN_KEY_INFO
static void dbug_tmp_restore_column_maps(MY_BITMAP *read_set, MY_BITMAP *write_set, my_bitmap_map **old)
Definition: table.h:4288
void repoint_field_to_record(TABLE *table, uchar *old_rec, uchar *new_rec)
Repoint a table's fields from old_rec to new_rec.
Definition: table.cc:7242
#define PLACEHOLDER_TABLE_ROW_ESTIMATE
Definition: table.h:164
void free_blob_buffers_and_reset(TABLE *table, uint32 size)
Reclaims temporary blob storage which is bigger than a threshold.
Definition: table.cc:3415
bool unpack_partition_info(THD *thd, TABLE *outparam, TABLE_SHARE *share, handlerton *engine_type, bool is_create_table)
Unpack the partition expression.
Definition: table.cc:2719
#define STATUS_NOT_FOUND
Means we were searching for a row and didn't find it.
Definition: table.h:1404
int open_table_from_share(THD *thd, TABLE_SHARE *share, const char *alias, uint db_stat, uint prgflag, uint ha_open_flags, TABLE *outparam, bool is_create_table, const dd::Table *table_def_param)
Open a table based on a TABLE_SHARE.
Definition: table.cc:2888
LEX_CSTRING PERFORMANCE_SCHEMA_DB_NAME
Definition: table.cc:140
#define STATUS_NULL_ROW
Means that table->null_row is set.
Definition: table.h:1411
ulong refresh_version
Definition: mysqld.cc:1387
static void dbug_tmp_restore_column_map(MY_BITMAP *bitmap, my_bitmap_map *old)
Definition: table.h:4263
#define restore_record(A, B)
Definition: table.h:156
int set_zone(int nr, int min_zone, int max_zone)
Definition: table.cc:3506
Ident_name_check check_db_name(const char *name, size_t length)
Check if database name is valid.
Definition: table.cc:3653
int rename_file_ext(const char *from, const char *to, const char *ext)
Definition: table.cc:3580
TABLE_SHARE * alloc_table_share(const char *db, const char *table_name, const char *key, size_t key_length, bool open_secondary)
Allocate and setup a TABLE_SHARE structure.
Definition: table.cc:378
void free_table_share(TABLE_SHARE *share)
Free table share and memory used by it.
Definition: table.cc:609
bool belongs_to_p_s(Table_ref *tl)
Check if the table belongs to the P_S, excluding setup and threads tables.
Definition: table.h:4433
bool assert_ref_count_is_locked(const TABLE_SHARE *)
Assert that the LOCK_open mutex is held when the reference count of a TABLE_SHARE is accessed.
Definition: table.cc:521
#define tmp_file_prefix_length
Definition: table.h:162
LEX_CSTRING RLI_INFO_NAME
Definition: table.cc:156
struct Table_share_foreign_key_parent_info TABLE_SHARE_FOREIGN_KEY_PARENT_INFO
File containing constants that can be used throughout the server.
constexpr const unsigned int MAX_KEY
Definition: sql_const.h:45
constexpr const size_t MAX_TABLES
Max tables in join.
Definition: sql_const.h:109
enum_mark_columns
Definition: sql_const.h:232
enum_mdl_type
Type of metadata lock request.
Definition: sql_lexer_yacc_state.h:106
@ MDL_SHARED_WRITE
Definition: sql_lexer_yacc_state.h:179
@ MDL_SHARED_WRITE_LOW_PRIO
Definition: sql_lexer_yacc_state.h:185
@ MDL_SHARED_READ
Definition: sql_lexer_yacc_state.h:169
int plan_idx
This represents the index of a JOIN_TAB/QEP_TAB in an array.
Definition: sql_opt_exec_shared.h:54
static MEM_ROOT mem
Definition: sql_servers.cc:100
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
Definition: item_cmpfunc.h:2783
Struct that describes an expression selected from a derived table or view.
Definition: table.h:2610
Item * item
Points to an item that represents the expression.
Definition: table.h:2615
const char * name
Name of selected expression.
Definition: table.h:2617
The current state of the privilege checking process for the current user, SQL statement and SQL objec...
Definition: table.h:376
GRANT_INTERNAL_INFO m_internal
The grant state for internal tables.
Definition: table.h:414
GRANT_INFO()
Definition: table.cc:283
Access_bitmask privilege
The set of privileges that the current user has fulfilled for a certain host, database,...
Definition: table.h:412
GRANT_TABLE * grant_table
A copy of the privilege information regarding the current host, database, object and user.
Definition: table.h:384
uint version
Used for cache invalidation when caching privilege information.
Definition: table.h:400
State information for internal tables grants.
Definition: table.h:353
bool m_table_lookup_done
True if the internal lookup by table name was done.
Definition: table.h:359
const ACL_internal_table_access * m_table_access
Cached internal table access.
Definition: table.h:361
bool m_schema_lookup_done
True if the internal lookup by schema name was done.
Definition: table.h:355
const ACL_internal_schema_access * m_schema_access
Cached internal schema access.
Definition: table.h:357
Struct to hold information about the table that should be created.
Definition: handler.h:3238
Hook class which via its methods specifies which members of T should be used for participating in a i...
Definition: sql_plist.h:198
Definition of name for generated keys, owned by TABLE_SHARE.
Definition: table.h:699
char name[NAME_CHAR_LEN]
Definition: table.h:700
bool use_default_password_lifetime
Definition: table.h:2730
bool update_password_expired_column
Definition: table.h:2729
bool update_failed_login_attempts
Definition: table.h:2741
uint32 password_reuse_interval
Definition: table.h:2737
bool use_default_password_reuse_interval
Definition: table.h:2738
Lex_acl_attrib_udyn update_password_require_current
Definition: table.h:2745
uint failed_login_attempts
Definition: table.h:2740
bool update_password_reuse_interval
Definition: table.h:2739
bool update_password_history
Definition: table.h:2736
int password_lock_time
Definition: table.h:2742
bool update_account_locked_column
Definition: table.h:2732
bool update_password_expired_fields
Definition: table.h:2728
bool use_default_password_history
Definition: table.h:2735
bool update_password_lock_time
Definition: table.h:2743
bool account_locked
Definition: table.h:2733
void cleanup()
Definition: table.h:2746
uint16 expire_after_days
Definition: table.h:2731
uint32 password_history_length
Definition: table.h:2734
bool modify_factor
Definition: table.h:2684
LEX_CSTRING generated_password
Definition: table.h:2665
LEX_CSTRING auth
Definition: table.h:2664
bool uses_identified_with_clause
Definition: table.h:2677
bool uses_authentication_string_clause
Definition: table.h:2676
bool finish_registration
Definition: table.h:2697
LEX_CSTRING plugin
Definition: table.h:2663
LEX_CSTRING client_plugin
Definition: table.h:2667
void copy(LEX_MFA *m, MEM_ROOT *alloc)
Definition: table.cc:7639
bool uses_identified_by_clause
Definition: table.h:2675
bool drop_factor
Definition: table.h:2686
bool init_registration
Definition: table.h:2695
uint nth_factor
Definition: table.h:2668
bool requires_registration
Definition: table.h:2691
LEX_CSTRING challenge_response
Definition: table.h:2666
bool add_factor
Definition: table.h:2682
bool has_password_generator
Definition: table.h:2678
LEX_MFA()
Definition: table.h:2699
bool unregister
Definition: table.h:2693
void reset()
Definition: table.h:2700
bool passwordless
Definition: table.h:2680
bool retain_current_password
Definition: table.h:2776
LEX_ALTER alter_status
Definition: table.h:2778
List< LEX_MFA > mfa_list
Definition: table.h:2781
bool uses_replace_clause
Definition: table.h:2775
LEX_CSTRING host
Definition: table.h:2773
static LEX_USER * alloc(THD *thd)
Definition: table.cc:7675
void init()
Definition: table.h:2784
LEX_CSTRING current_auth
Definition: table.h:2774
bool with_initial_auth
Definition: table.h:2782
LEX_CSTRING user
Definition: table.h:2772
LEX_MFA first_factor_auth_info
Definition: table.h:2780
LEX_USER()
Definition: table.h:2811
bool discard_old_password
Definition: table.h:2777
bool add_mfa_identifications(LEX_MFA *factor2, LEX_MFA *factor3=nullptr)
Definition: table.cc:7682
The LEX object currently serves three different purposes:
Definition: sql_lex.h:3987
Definition: thr_lock.h:99
thr_lock_type type
Definition: thr_lock.h:100
@ TABLE
Definition: mdl.h:407
The MEM_ROOT is a simple arena, where allocations are carved out of larger blocks.
Definition: my_alloc.h:83
void ClearForReuse()
Similar to Clear(), but anticipates that the block will be reused for further allocations.
Definition: my_alloc.cc:189
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
Definition: my_bitmap.h:43
my_bitmap_map * bitmap
Definition: my_bitmap.h:44
Struct NESTED_JOIN is used to represent how tables are connected through outer join operations and se...
Definition: nested_join.h:78
Instances of Name_resolution_context store the information necessary for name resolution of Items and...
Definition: item.h:415
uint32 locked
Definition: table.h:4235
char * table
Definition: table.h:4234
OPEN_TABLE_LIST * next
Definition: table.h:4233
uint32 in_use
Definition: table.h:4235
char * db
Definition: table.h:4234
const char * used_alias
Tells whether this ORDER element was referenced with an alias or with an expression in the query,...
Definition: table.h:331
char * buff
Definition: table.h:342
bool is_item_original() const
Definition: table.h:295
Item_rollup_group_item * rollup_item
Definition: table.h:320
bool in_field_list
Definition: table.h:324
Item * item_initial
The initial ordering expression.
Definition: table.h:310
ORDER * next
Definition: table.h:297
MY_BITMAP * grouping_set_info
If the query block includes non-primitive grouping, then these modifiers are represented as grouping ...
Definition: table.h:305
enum_order direction
Definition: table.h:322
Item ** item
Points at the item in the select fields.
Definition: table.h:318
ORDER()
Definition: table.h:291
table_map depend_map
Definition: table.h:343
Field * field_in_tmp_table
When GROUP BY is implemented with a temporary table (i.e.
Definition: table.h:341
table_map used
Definition: table.h:343
ORDER(Item *grouped_expr)
Definition: table.h:292
bool is_explicit
Definition: table.h:344
A struct that contains execution time state used for partial update of JSON columns.
Definition: table.cc:7730
int value
Definition: table.h:2555
const char * field_name
This is used as column name.
Definition: table.h:2541
enum_field_types field_type
This denotes data type for the column.
Definition: table.h:2554
const char * old_name
Definition: table.h:2565
uint open_method
Definition: table.h:2566
uint field_flags
This is used to set column attributes.
Definition: table.h:2564
uint field_length
For string-type columns, this is the maximum number of characters.
Definition: table.h:2548
int(* process_table)(THD *thd, Table_ref *tables, TABLE *table, bool res, LEX_CSTRING db_name, LEX_CSTRING table_name)
Definition: table.h:2576
int(* fill_table)(THD *thd, Table_ref *tables, Item *cond)
Definition: table.h:2573
ST_FIELD_INFO * fields_info
Definition: table.h:2571
int(* old_format)(THD *thd, ST_SCHEMA_TABLE *schema_table)
Definition: table.h:2575
bool hidden
Definition: table.h:2578
const char * table_name
Definition: table.h:2570
const TABLE_FIELD_TYPE * field
Definition: table.h:610
uint count
Definition: table.h:609
LEX_CSTRING cset
Definition: table.h:605
LEX_CSTRING name
Definition: table.h:603
LEX_CSTRING type
Definition: table.h:604
This structure is shared between different table objects.
Definition: table.h:708
ulong stored_rec_length
Definition: table.h:809
uint next_number_index
Definition: table.h:927
Key_map keys_in_use
The set of indexes that are not disabled for this table.
Definition: table.h:800
TABLE_SHARE_FOREIGN_KEY_PARENT_INFO * foreign_key_parent
Definition: table.h:1046
bool visit_subgraph(Wait_for_flush *waiting_ticket, MDL_wait_for_graph_visitor *gvisitor)
Traverse portion of wait-for graph which is reachable through this table share in search for deadlock...
Definition: table.cc:3942
Table_cache_element ** cache_element
Array of table_cache_instances pointers to elements of table caches respresenting this table in each ...
Definition: table.h:753
MEM_ROOT mem_root
Definition: table.h:734
bool is_primary_engine() const
Does this TABLE_SHARE represent a table in a primary storage engine?
Definition: table.h:1264
void destroy()
Release resources and free memory occupied by the table share.
Definition: table.cc:543
TABLE_SHARE_FOREIGN_KEY_INFO * foreign_key
Definition: table.h:1044
bool is_secondary_engine() const
Does this TABLE_SHARE represent a table in a secondary storage engine?
Definition: table.h:1267
uint stats_sample_pages
Definition: table.h:846
handlerton * db_type() const
Definition: table.h:814
Table_histograms_collection * m_histograms
Definition: table.h:729
LEX_STRING comment
Definition: table.h:762
Handler_share * ha_share
Main handler's share.
Definition: table.h:1009
MEM_ROOT * alloc_for_tmp_file_handler
Used to allocate new handler for internal temporary table when the size limitation of the primary sto...
Definition: table.h:739
enum_stats_auto_recalc stats_auto_recalc
Definition: table.h:849
const char * tablespace
Definition: table.h:959
partition_info * m_part_info
Partition meta data.
Definition: table.h:979
LEX_STRING compress
Definition: table.h:763
const TABLE_FIELD_DEF * table_field_def_cache
Cache the checked structure of this table.
Definition: table.h:1006
uint column_bitmap_size
Definition: table.h:931
ulong mysql_version
Definition: table.h:807
uint max_tmp_key_parts
For materialized derived tables: allocated size of base_key_parts array of all TABLE objects.
Definition: table.h:887
uint total_key_length
Definition: table.h:861
TYPELIB keynames
Definition: table.h:741
uchar * default_values
Definition: table.h:761
LEX_STRING encrypt_type
Definition: table.h:764
PSI_table_share * m_psi
Instrumentation for this table share.
Definition: table.h:1012
bool is_missing_primary_key() const
Determine if the table is missing a PRIMARY KEY.
Definition: table.h:1211
bool db_low_byte_first
Definition: table.h:937
Schema_read_only
Schema's read only mode - ON (true) or OFF (false).
Definition: table.h:1070
LEX_CSTRING table_cache_key
Definition: table.h:785
unsigned int m_ref_count
How many TABLE objects use this TABLE_SHARE.
Definition: table.h:1282
unsigned long version() const
Returns the version of this TABLE_SHARE.
Definition: table.h:1121
uint max_unique_length
Definition: table.h:860
tmp_table_type tmp_table
Definition: table.h:828
unsigned long m_version
TABLE_SHARE version, if changed the TABLE_SHARE must be reopened.
Definition: table.h:1289
uint find_first_unused_tmp_key(const Key_map &k)
For a materialized derived table: informs the share that certain not-yet-used keys are going to be us...
Definition: table.cc:6067
int cached_row_logging_check
Definition: table.h:949
ulong reclength
Definition: table.h:808
uint varchar_fields
Definition: table.h:873
uint next_number_keypart
Definition: table.h:929
bool secondary_load
Secondary engine load status.
Definition: table.h:769
uint tmp_handler_count
Only for internal temporary tables.
Definition: table.h:835
Field ** field
Definition: table.h:756
ulong avg_row_length
Definition: table.h:806
plugin_ref db_plugin
Definition: table.h:813
LEX_CSTRING table_name
Definition: table.h:787
const dd::View * view_object
View object holding view definition read from DD.
Definition: table.h:1024
uint db_create_options
Bitmap with flags representing some of table options/attributes.
Definition: table.h:913
uint rec_buff_length
Definition: table.h:854
uint blob_fields
Definition: table.h:872
uint max_tmp_keys
For materialized derived tables: allocated size of key_info array.
Definition: table.h:882
LEX_STRING connect_string
Definition: table.h:790
Field ** found_next_number_field
Definition: table.h:757
ha_rows min_rows
Definition: table.h:805
bool is_referenced_by_foreign_key() const
Returns whether this table is referenced by a foreign key.
Definition: table.h:1278
uint foreign_keys
Arrays with descriptions of foreign keys in which this table participates as child or parent.
Definition: table.h:1043
Schema_read_only schema_read_only
Definition: table.h:1071
bool wait_for_old_version(THD *thd, struct timespec *abstime, uint deadlock_weight)
Wait until the subject share is removed from the table definition cache and make sure it's destroyed.
Definition: table.cc:4036
uint fields
Definition: table.h:853
uint tmp_open_count
Only for internal temporary tables.
Definition: table.h:841
Key_name * key_names
Array of names for generated keys, used for materialized derived tables.
Definition: table.h:892
Key_map keys_for_keyread
Definition: table.h:804
char * partition_info_str
Storing the full partitioning clause (PARTITION BY ...) which is used when creating new partition_inf...
Definition: table.h:993
TABLE_SHARE(unsigned long version, bool secondary)
Create a new TABLE_SHARE with the given version number.
Definition: table.h:717
uint null_bytes
Definition: table.h:852
bool system
Definition: table.h:936
bool is_view
Definition: table.h:939
ulonglong get_table_ref_version() const
Return a table metadata version.
Definition: table.cc:4109
uint rowid_field_offset
Definition: table.h:923
uint max_key_length
Definition: table.h:859
ulong * base_rec_per_key
Records per key array, used for materialized derived tables.
Definition: table.h:898
bool has_secondary_engine() const
Does this TABLE_SHARE represent a primary table that has a shadow copy in a secondary storage engine?
Definition: table.h:1273
List< Trigger > * triggers
List of trigger descriptions for the table loaded from the data-dictionary.
Definition: table.h:1060
bool is_distinct
Whether this is a temporary table that already has a UNIQUE index (removing duplicate rows on insert)...
Definition: table.h:869
dd::Table * tmp_table_def
Data-dictionary object describing explicit temporary table represented by this share.
Definition: table.h:1032
TABLE_SHARE * next
Definition: table.h:744
LEX_STRING path
Definition: table.h:788
bool m_open_in_progress
Definition: table.h:940
uint next_number_key_offset
Definition: table.h:928
uint keys
Definition: table.h:855
Key_map visible_indexes
The set of visible and enabled indexes for this table.
Definition: table.h:803
uint foreign_key_parents
Definition: table.h:1045
bool has_old_version() const
Is this table share being expelled from the table definition cache?
Definition: table.h:1131
mysql_mutex_t LOCK_ha_data
Definition: table.h:743
Wait_for_flush_list m_flush_tickets
List of tickets representing threads waiting for the share to be flushed.
Definition: table.h:1017
void clear_version()
Set the version of this TABLE_SHARE to zero.
Definition: table.cc:532
uint gen_def_field_count
Number of fields having the default value generated.
Definition: table.h:935
MY_BITMAP all_set
Definition: table.h:774
unsigned int ref_count() const
How many TABLE objects use this TABLE_SHARE.
Definition: table.h:1237
uint last_null_bit_pos
Definition: table.h:852
TABLE_CATEGORY table_category
Category of this table.
Definition: table.h:732
bool error
Definition: table.h:930
unsigned int decrement_ref_count()
Decrement the reference count by one.
Definition: table.h:1256
const CHARSET_INFO * table_charset
Definition: table.h:771
unsigned int increment_ref_count()
Increment the reference count by one.
Definition: table.h:1246
mysql::binlog::event::Table_id table_map_id
Definition: table.h:941
bool auto_partitioned
Filled in when reading from frm.
Definition: table.h:986
void set_table_cache_key(char *key_buff, const char *key, size_t key_length)
Set share's table cache key and update its db and table name appropriately.
Definition: table.h:1113
void set_table_cache_key(char *key_buff, size_t key_length)
Set share's table cache key and update its db and table name appropriately.
Definition: table.h:1087
ulonglong autoextend_size
Definition: table.h:811
uint primary_key
Definition: table.h:926
ha_storage_media default_storage_media
Definition: table.h:956
rec_per_key_t * base_rec_per_key_float
Records per key array, float rep., used for materialized derived tables.
Definition: table.h:904
bool m_secondary_engine
Does this TABLE_SHARE represent a table in a secondary storage engine?
Definition: table.h:1293
std::uint32_t key_block_size
Definition: table.h:845
bool crashed
Definition: table.h:938
Key_map usable_indexes(const THD *thd) const
The set of indexes that the optimizer may use when creating an execution plan.
Definition: table.cc:506
LEX_CSTRING normalized_path
Definition: table.h:789
uint key_parts
Definition: table.h:856
uint vfields
Number of generated fields.
Definition: table.h:933
enum enum_table_ref_type get_table_ref_type() const
Convert unrelated members of TABLE_SHARE to one enum representing its type.
Definition: table.h:1139
uint db_options_in_use
Bitmap with flags representing some of table options/attributes which are in use by storage engine.
Definition: table.h:922
ha_rows max_rows
Definition: table.h:805
ulonglong get_table_def_version() const
Definition: table.h:1118
TYPELIB * intervals
Definition: table.h:742
uint first_unused_tmp_key
For materialized derived tables;.
Definition: table.h:878
TABLE_SHARE ** prev
Definition: table.h:744
uint null_fields
Definition: table.h:871
LEX_CSTRING secondary_engine
Secondary storage engine.
Definition: table.h:767
KEY * key_info
Definition: table.h:758
uint partition_info_str_len
Definition: table.h:994
LEX_CSTRING db
Definition: table.h:786
LEX_CSTRING engine_attribute
Definition: table.h:792
LEX_CSTRING secondary_engine_attribute
Definition: table.h:793
uint * blob_field
Definition: table.h:759
enum row_type real_row_type
Real row format used for the table by the storage engine.
Definition: table.h:827
Sql_check_constraint_share_list * check_constraint_share_list
Definition: table.h:1049
Query_block * owner_of_possible_tmp_keys
For materialized derived tables;.
Definition: table.h:1035
void mark_columns_used_by_index(uint index)
Definition: table.cc:5521
bool materialized
For a materializable derived or SJ table: true if has been materialized.
Definition: table.h:1924
void mark_generated_columns(bool is_update)
Update the write/read_set for generated columns when doing update and insert operation.
Definition: table.cc:6253
class QEP_TAB * qep_tab
Definition: table.h:1928
bool m_invalid_dict
This TABLE object is invalid and cannot be reused.
Definition: table.h:1904
query_id_t query_id
Definition: table.h:1776
bool force_index_order
Flag set when the statement contains FORCE INDEX FOR ORDER BY See Table_ref::process_index_hints().
Definition: table.h:1838
void column_bitmaps_set_no_signal(MY_BITMAP *read_set_arg, MY_BITMAP *write_set_arg)
Definition: table.h:2002
void mark_columns_needed_for_update(THD *thd, bool mark_binlog_columns)
Mark columns needed for doing an update of a row.
Definition: table.cc:5689
const char * alias
alias or table name
Definition: table.h:1677
partition_info * part_info
Definition: table.h:1963
uint8 m_status
Definition: table.h:1816
bool key_read
If set, the optimizer has found that row retrieval should access index tree only.
Definition: table.h:1853
bool no_replicate
If set, indicate that the table is not replicated by the server.
Definition: table.h:1862
class JOIN_TAB * join_tab
Definition: table.h:1927
void set_no_row()
Set status for row buffer: contains no row.
Definition: table.h:2135
void mark_columns_needed_for_insert(THD *thd)
Definition: table.cc:6197
Field ** vfield
Pointer to generated columns.
Definition: table.h:1546
void clear_column_bitmaps(void)
Definition: table.cc:5421
uint tmp_table_seq_id
Internal tmp table sequential number.
Definition: table.h:1977
TABLE ** cache_prev
Definition: table.h:1438
Key_map covering_keys
Definition: table.h:1502
uchar * null_flags
Pointer to the null flags of record[0].
Definition: table.h:1678
Key_map keys_in_use_for_group_by
Definition: table.h:1533
Key_map keys_in_use_for_query
Definition: table.h:1531
Field_longlong * set_counter()
Definition: table.h:1664
void set_storage_handler(handler *file_arg)
Set storage handler for temporary table.
Definition: table.h:2065
bool has_null_row() const
Definition: table.h:2188
TABLE ** triggers_lru_prev
Definition: table.h:1450
Record_buffer m_record_buffer
Buffer for use in multi-row reads. Initially empty.
Definition: table.h:1490
void set_deleted()
Set the contents of table to be "deleted", ie "not created", after having deleted the contents.
Definition: table.h:2085
Set_operator_type m_set_op_type
Holds the set operation type.
Definition: table.h:1613
void set_created()
Set the table as "created", and enable flags in storage engine that could not be enabled without an i...
Definition: table.cc:6184
void use_all_columns()
Definition: table.h:2007
bool has_updated_row() const
Definition: table.h:2191
TABLE * cache_next
Links for the lists of used/unused TABLE objects for the particular table in the specific instance of...
Definition: table.h:1438
Set_operator_type set_op_type()
Returns the set operation type.
Definition: table.h:1628
void blobs_need_not_keep_old_value()
Virtual fields of type BLOB have a flag m_keep_old_value.
Definition: table.cc:8258
Table_ref * pos_in_table_list
Definition: table.h:1673
void set_set_op(Field_longlong *set_counter, bool except, bool distinct)
Initialize the set counter field pointer and the type of set operation other than UNION*.
Definition: table.h:1655
ORDER * group
Definition: table.h:1676
bool has_binary_diff_columns() const
Does this table have any columns that can be updated using partial update in the current row?
Definition: table.cc:7851
void set_use_hash_map(bool use_hash_map)
Definition: table.h:1621
void mark_columns_per_binlog_row_image(THD *thd)
Definition: table.cc:5761
ha_rows quick_condition_rows
Definition: table.h:1798
THD * in_use
The current session using this table object.
Definition: table.h:1479
void disable_logical_diffs_for_current_row(const Field *field) const
Temporarily disable collection of Json_diff objects describing the logical changes of a JSON column i...
Definition: table.cc:8086
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:1756
void mark_columns_needed_for_delete(THD *thd)
Definition: table.cc:5612
ha_rows quick_rows[MAX_KEY]
Definition: table.h:1782
thr_lock_type lock_type
Definition: table.h:1929
bool null_row
Definition: table.h:1823
uint lock_data_start
Definition: table.h:1801
bool const_table
Definition: table.h:1845
MY_BITMAP read_set_internal
A bitmap of fields that are explicitly referenced by the query.
Definition: table.h:1743
bool is_marked_for_partial_update(const Field *field) const
Has this column been marked for partial update?
Definition: table.cc:7845
bool force_index_group
Flag set when the statement contains FORCE INDEX FOR GROUP BY See Table_ref::process_index_hints().
Definition: table.h:1844
bool has_storage_handler() const
Definition: table.h:2062
bool open_by_handler
Definition: table.h:1864
void bind_value_generators_to_fields()
Bind all the table's value generator columns in all the forms: stored/virtual GC, default expressions...
Definition: table.cc:4301
Table_ref * pos_in_locked_tables
Definition: table.h:1675
void disable_binary_diffs_for_current_row(const Field *field)
Temporarily disable collection of binary diffs for a column in the current row.
Definition: table.cc:7833
void set_keyread(bool flag)
Definition: table.cc:6173
bool index_contains_some_virtual_gcol(uint index_no) const
Check whether the given index has a virtual generated columns.
Definition: table.h:2049
uint db_stat
Definition: table.h:1803
bool is_logical_diff_enabled(const Field *field) const
Is partial update using logical diffs enabled on this JSON column?
Definition: table.cc:8064
bool has_invalid_dict() const
Definition: table.h:2020
bool has_invalid_stats()
Definition: table.h:2025
uchar * insert_values
Definition: table.h:1487
ptrdiff_t default_values_offset() const
Definition: table.h:2057
uchar * record[2]
Definition: table.h:1484
void invalidate_dict()
Definition: table.cc:8305
void mark_auto_increment_column(void)
Mark auto-increment fields as used fields in both read and write maps.
Definition: table.cc:5581
bool alias_name_used
Definition: table.h:1882
bool fill_item_list(mem_root_deque< Item * > *item_list) const
Create Item_field for each column in the table.
Definition: table.cc:4358
bool impossible_range
Definition: table.h:1935
bool is_binary_diff_enabled(const Field *field) const
Is partial update using binary diffs enabled on this JSON column?
Definition: table.cc:8058
void invalidate_stats()
Definition: table.cc:8316
Cost_model_table m_cost_model
Cost model object for operations on this table.
Definition: table.h:1970
bool should_binlog_drop_if_temp_flag
This flag decides whether or not we should log the drop temporary table command.
Definition: table.h:2297
void cleanup_value_generator_items()
Clean any state in items associated with generated columns to be ready for the next statement.
Definition: table.cc:4327
bool m_deduplicate_with_hash_map
If false, any de-duplication happens via an index on this table (e.g.
Definition: table.h:1595
Field_longlong * m_set_counter
The set counter.
Definition: table.h:1582
void init_cost_model(const Cost_model_server *cost_model_server)
Initialize the optimizer cost model.
Definition: table.h:2222
bool not_exists_optimize
Definition: table.h:1930
bool force_index
Definition: table.h:1832
void init(THD *thd, Table_ref *tl)
Initialize TABLE instance (newly created, or coming either from table cache or THD::temporary_tables ...
Definition: table.cc:4136
bool is_except() const
Definition: table.h:1641
MY_BITMAP * read_set
The read set contains the set of columns that the execution engine needs to process the query.
Definition: table.h:1725
bool should_binlog_drop_if_temp(void) const
Definition: table.cc:8273
struct TABLE::@194 reginfo
bool get_fields_in_item_tree
Definition: table.h:1883
uint visible_field_count() const
Definition: table.h:2032
const Binary_diff_vector * get_binary_diffs(const Field *field) const
Get the list of binary diffs that have been collected for a given column in the current row,...
Definition: table.cc:7942
void mark_check_constraint_columns(bool is_update)
Update the read_map with columns needed for check constraint evaluation when doing update and insert ...
Definition: table.cc:6313
int current_lock
Definition: table.h:1804
void move_tmp_key(int old_idx, bool modify_share)
For a materialized derived table: moves a KEY definition from a position to the first not-yet-used po...
Definition: table.cc:6090
uint quick_n_ranges[MAX_KEY]
Definition: table.h:1788
TABLE * next
Definition: table.h:1428
bool add_binary_diff(const Field *field, size_t offset, size_t length)
Add a binary diff for a column that is updated using partial update.
Definition: table.cc:7947
bool m_invalid_stats
This TABLE object is invalid and cannot be reused as it has outdated rec_per_key and handler stats.
Definition: table.h:1913
bool empty_result_table()
Empties internal temporary table (deletes rows, closes scan)
Definition: table.cc:8277
void cleanup_partial_update()
Clean up state used for partial update of JSON columns.
Definition: table.cc:7912
uint lock_position
Definition: table.h:1800
Key_map quick_keys
Definition: table.h:1503
void restore_null_flags()
Restore the NULL flags of the current row from the designated buffer.
Definition: table.h:2208
Table_trigger_dispatcher * triggers
Definition: table.h:1672
bool no_keyread
Certain statements which need the full row, set this to ban index-only access.
Definition: table.h:1858
bool is_intersect() const
Definition: table.h:1636
void set_tmp_table_seq_id(uint arg)
Definition: table.h:2251
Partial_update_info * m_partial_update_info
Object which contains execution time state used for partial update of JSON columns.
Definition: table.h:2291
void set_binlog_drop_if_temp(bool should_binlog)
Set the variable should_binlog_drop_if_temp_flag, so that the logging of temporary tables can be deci...
Definition: table.cc:8269
void mark_gcol_in_maps(const Field *field)
Adds a generated column and its dependencies to the read_set/write_set bitmaps.
Definition: table.cc:7404
void set_deleted_row()
Set "deleted" property for the current row.
Definition: table.h:2179
void reset_null_row()
Clear "null row" status for the current row.
Definition: table.h:2167
Field ** gen_def_fields_ptr
Pointer to fields having the default value generated.
Definition: table.h:1548
MY_BITMAP fields_for_functional_indexes
A bitmap marking the hidden generated columns that exists for functional indexes.
Definition: table.h:1467
void set_not_started()
Life cycle of the row buffer is as follows:
Definition: table.h:2115
const histograms::Histogram * find_histogram(uint field_index) const
Find the histogram for the given field index.
Definition: table.cc:8098
SortingIterator * sorting_iterator
Not owned by the TABLE; used only from filesort_free_buffers().
Definition: table.h:1955
bool m_last_operation_is_distinct
If m_set_counter is set: true if last block has DISTINCT semantics, either because it is marked as su...
Definition: table.h:1589
key_part_map const_key_parts[MAX_KEY]
Definition: table.h:1785
Field ** field
Definition: table.h:1480
bool alloc_tmp_keys(uint new_key_count, uint new_key_part_count, bool modify_share)
Allocate space for keys, for a materialized derived table.
Definition: table.cc:5843
MEM_ROOT mem_root
Definition: table.h:1943
void column_bitmaps_set(MY_BITMAP *read_set_arg, MY_BITMAP *write_set_arg)
Definition: table.cc:7434
bool uses_hash_map() const
Definition: table.h:1625
uint hidden_field_count
Count of hidden fields, if internal temporary table; 0 otherwise.
Definition: table.h:1482
bool is_nullable() const
Return whether table is nullable.
Definition: table.h:2090
MY_BITMAP tmp_set
Definition: table.h:1683
MDL_ticket * mdl_ticket
Definition: table.h:1966
bool has_gcol() const
Definition: table.h:2093
bool all_partitions_pruned_away
Definition: table.h:1965
MY_BITMAP def_read_set
Definition: table.h:1683
String * get_partial_update_buffer()
Get a buffer that can be used to hold the partially updated column value while performing partial upd...
Definition: table.cc:7918
bool setup_partial_update()
Definition: table.cc:7883
bool m_charset_conversion_is_strict
True if character set conversions are always strict.
Definition: table.h:1599
bool has_deleted_row() const
Definition: table.h:2194
bool check_read_removal(uint index)
Read removal is possible if the selected quick read method is using full unique index.
Definition: table.cc:7196
const Json_diff_vector * get_logical_diffs(const Field_json *field) const
Get the list of JSON diffs that have been collected for a given column in the current row,...
Definition: table.cc:8052
KEY_PART_INFO * base_key_parts
Key part array for generated keys, used for materialized derived tables.
Definition: table.h:1541
bool is_started() const
Definition: table.h:2121
Set_operator_type
Definition: table.h:1601
@ SOT_EXCEPT_DISTINCT
Definition: table.h:1608
@ SOT_NONE
Definition: table.h:1602
@ SOT_UNION_ALL
Definition: table.h:1603
@ SOT_INTERSECT_ALL
Definition: table.h:1605
@ SOT_INTERSECT_DISTINCT
Definition: table.h:1606
@ SOT_UNION_DISTINCT
Definition: table.h:1604
@ SOT_EXCEPT_ALL
Definition: table.h:1607
MY_BITMAP cond_set
Definition: table.h:1692
void mark_columns_used_by_index_no_reset(uint index, MY_BITMAP *map, uint key_parts=0) const
mark columns used by key, but don't reset other fields
Definition: table.cc:5559
void reset()
Reset state of fields after optimization and execution.
Definition: table.cc:4206
MY_BITMAP pack_row_tmp_set
Definition: table.h:1683
void default_column_bitmaps()
Definition: table.h:2010
void drop_unused_tmp_keys(bool modify_share)
For a materialized derived table: after move_tmp_key() has moved all definitions of used KEYs,...
Definition: table.cc:6147
void clear_partial_update_diffs()
Clear the diffs that have been collected for partial update of JSON columns, and re-enable partial up...
Definition: table.cc:7923
void set_null_row()
Set current row as "null row", for use in null-complemented outer join.
Definition: table.h:2160
handler * get_primary_handler() const
Returns the primary engine handler for the table.
Definition: table.cc:7441
Sql_table_check_constraint_list * table_check_constraint_list
Definition: table.h:1807
TABLE * triggers_lru_next
Links for the LRU list of unused TABLE objects with fully loaded triggers in the specific instance of...
Definition: table.h:1450
Key_map possible_quick_keys
Definition: table.h:1518
bool created
For tmp tables.
Definition: table.h:1920
bool has_row() const
Definition: table.h:2185
const Cost_model_table * cost_model() const
Return the cost model object for this table.
Definition: table.h:2229
Field * next_number_field
Definition: table.h:1543
void update_const_key_parts(Item *conds)
Update TABLE::const_key_parts for single table UPDATE/DELETE query.
Definition: table.cc:7166
void save_null_flags()
Save the NULL flags of the current row into the designated buffer.
Definition: table.h:2203
Field * found_next_number_field
Definition: table.h:1544
Key_map keys_in_use_for_order_by
Definition: table.h:1535
void set_row_status_from_handler(int status)
Set "row found" status from handler result.
Definition: table.h:2145
Field ** visible_field_ptr() const
Definition: table.h:2030
uchar * null_flags_saved
Saved null_flags while null_row is true.
Definition: table.h:1679
uchar * write_row_record
Definition: table.h:1485
ha_rows m_limit_rows
A priori unlimited.
Definition: table.h:1574
MY_BITMAP def_write_set
Definition: table.h:1683
bool is_union_or_table() const
Test if this tmp table stores the result of a UNION set operation or a single table.
Definition: table.h:1619
uint lock_count
Definition: table.h:1802
Field * hash_field
Field used by unique constraint.
Definition: table.h:1550
MY_BITMAP def_fields_set_during_insert
Bitmap of table fields (columns), which are explicitly set in the INSERT INTO statement.
Definition: table.h:1701
bool mark_column_for_partial_update(const Field *field)
Mark a given column as one that can potentially be updated using partial update during execution of a...
Definition: table.cc:7818
Field * fts_doc_id_field
Definition: table.h:1669
bool autoinc_field_has_explicit_non_null_value
To indicate that value of the auto_increment field was provided explicitly by the user or from some o...
Definition: table.h:1881
KEY * key_info
Definition: table.h:1536
bool init_tmp_table(THD *thd, TABLE_SHARE *share, MEM_ROOT *m_root, CHARSET_INFO *charset, const char *alias, Field **fld, uint *blob_fld, bool is_virtual)
Initialize table as internal tmp table.
Definition: table.cc:4251
void set_found_row()
Set status for row buffer: contains row.
Definition: table.h:2124
void mark_column_used(Field *field, enum enum_mark_columns mark)
Mark column as either read or written (or none) according to mark_used.
Definition: table.cc:5478
void set_nullable()
Set table as nullable, ie it is inner wrt some outer join.
Definition: table.h:2087
Blob_mem_storage * blob_storage
Initialized in Item_func_group_concat::setup for appropriate temporary table if GROUP_CONCAT is used ...
Definition: table.h:1949
void set_updated_row()
Set "updated" property for the current row.
Definition: table.h:2173
TABLE * prev
Definition: table.h:1428
void prepare_for_position(void)
Tell handler we are going to call position() and rnd_pos() later.
Definition: table.cc:5453
TABLE_SHARE * s
Definition: table.h:1426
bool has_columns_marked_for_partial_update() const
Does this table have any columns that were marked with mark_column_for_partial_update()?
Definition: table.cc:7903
MY_BITMAP * m_partial_update_columns
Bitmap that tells which columns are eligible for partial update in an update statement.
Definition: table.h:2282
bool copy_blobs
Definition: table.h:1825
void add_logical_diff(const Field_json *field, const Json_seekable_path &path, enum_json_diff_operation operation, const Json_wrapper *new_value)
Add a logical JSON diff describing a logical change to a JSON column in partial update.
Definition: table.cc:8022
bool is_distinct() const
Definition: table.h:1646
bool add_tmp_key(Field_map *key_parts, bool invisible, bool modify_share)
Add one key to a materialized derived table.
Definition: table.cc:5958
SortingIterator * duplicate_removal_iterator
Definition: table.h:1956
void update_covering_prefix_keys(Field *field, uint16 key_read_length, Key_map *covering_prefix_keys)
Update covering keys depending on max read key length.
Definition: table.cc:8289
bool nullable
If true, this table is inner w.r.t.
Definition: table.h:1814
Key_map merge_keys
Definition: table.h:1506
Sort_result unique_result
The result of applying a unique operation (by row ID) to the table, if done.
Definition: table.h:1962
bool is_created() const
Return true if table is instantiated, and false otherwise.
Definition: table.h:2074
uint quick_key_parts[MAX_KEY]
Definition: table.h:1787
MY_BITMAP * write_set
Definition: table.h:1727
bool no_rows
True if writes to this table should not write rows and just write keys.
Definition: table.h:1847
LEX_CSTRING referenced_table_db
Definition: table.h:675
dd::Foreign_key::enum_rule delete_rule
Definition: table.h:682
LEX_CSTRING unique_constraint_name
Name of unique key matching FK in parent table, "" if there is no unique key.
Definition: table.h:681
LEX_CSTRING * column_name
Arrays with names of referencing columns of the FK.
Definition: table.h:687
uint columns
Definition: table.h:683
dd::Foreign_key::enum_rule update_rule
Definition: table.h:682
LEX_CSTRING referenced_table_name
Definition: table.h:676
dd::Foreign_key::enum_rule delete_rule
Definition: table.h:693
dd::Foreign_key::enum_rule update_rule
Definition: table.h:693
LEX_CSTRING referencing_table_name
Definition: table.h:692
LEX_CSTRING referencing_table_db
Definition: table.h:691
handlerton is a singleton structure - one instance per storage engine - to provide access to storage ...
Definition: handler.h:2765
An instrumented mutex structure.
Definition: mysql_mutex_bits.h:50
Definition: sql_plugin_ref.h:45
Contains the class Table_id, mainly used for row based replication.
tablesample_type
Definition: tablesample.h:27
@ UNSPECIFIED_TABLESAMPLE_TYPE
thr_lock_type
Definition: thr_lock.h:51
@ TL_WRITE_LOW_PRIORITY
Definition: thr_lock.h:90
@ TL_UNLOCK
Definition: thr_lock.h:53
@ TL_READ
Definition: thr_lock.h:62
@ TL_WRITE_ALLOW_WRITE
Definition: thr_lock.h:73
static void mark()
Definition: xcom_transport.cc:698