41#if defined UNIV_COMPILE_TEST_FUNCS || defined UNIV_HOTBACKUP
120#define DICT_TABLE_ORDINARY 1
121#define DICT_TABLE_CLUSTER_MEMBER 2
122#define DICT_TABLE_CLUSTER \
338 ulint num_base,
bool is_visible);
352 const char *from,
const char *to,
453 operator const char *()
const {
return (
m_name); }
555 return ((uint16_t)(
phy_pos >> 16));
685 ut_ad(mbminlen <= mbmaxlen);
710 return (spatial_status);
723 return (spatial_status);
776#ifndef UNIV_HOTBACKUP
875#define DICT_MAX_FIELD_LEN_BY_FORMAT(table) \
876 (dict_table_has_atomic_blobs(table) ? REC_VERSION_56_MAX_INDEX_COL_LEN \
877 : REC_ANTELOPE_MAX_INDEX_COL_LEN - 1)
966#ifndef UNIV_HOTBACKUP
1028class Spatial_reference_system;
1075 "1<<MAX_KEY_LENGTH_BITS) < MAX_KEY_LENGTH");
1142 std::unique_ptr<dd::Spatial_reference_system>
rtr_srs;
1159#ifndef UNIV_HOTBACKUP
1179#ifndef UNIV_HOTBACKUP
1325 for (
unsigned i = 0; i <
n_fields; i++) {
1364 uint32_t nullable = 0;
1367 for (
size_t i = 0; i < nth; ++i) {
1396 size_t n_drop_nullable_cols = 0;
1397 size_t new_n_nullable = 0;
1398 for (
size_t i = 0; i <
n_def; i++) {
1408 n_drop_nullable_cols++;
1421 new_n_nullable += n_drop_nullable_cols;
1423 return new_n_nullable;
1440 for (uint32_t i = 0; i <
n_def; i++) {
1442 ut_ad(field !=
nullptr && field->
col !=
nullptr);
1475 field->
name = name_arg;
1476 field->
prefix_len = (
unsigned int)prefix_len;
1508 for (
size_t i = 0; i <
n_def; i++) {
1509 if (
get_field(i)->get_phy_pos() == phy_pos) {
1531 uint16_t res = phy_pos;
1532 for (
size_t i = 0; i < phy_pos; i++) {
1563 bool is_virtual =
false)
const;
1607 for (uint32_t i = 0; i <
n_fields; ++i) {
1654typedef std::set<dict_v_col_t *, std::less<dict_v_col_t *>,
1776 if (foreign->
v_cols !=
nullptr) {
1828#ifndef UNIV_HOTBACKUP
1891#ifndef UNIV_HOTBACKUP
1936#ifndef UNIV_HOTBACKUP
1943 std::string schema_name;
1949 0 == strcmp(schema_name.c_str(),
"sys") ||
2144#ifndef UNIV_HOTBACKUP
2193#ifndef UNIV_HOTBACKUP
2229#define DICT_STATS_PERSISTENT_ON (1 << 1)
2230#define DICT_STATS_PERSISTENT_OFF (1 << 2)
2246#define DICT_STATS_AUTO_RECALC_ON (1 << 1)
2247#define DICT_STATS_AUTO_RECALC_OFF (1 << 2)
2281#define BG_STAT_NONE 0
2286#define BG_STAT_IN_PROGRESS (1 << 0)
2291#define BG_STAT_SHOULD_QUIT (1 << 1)
2317#ifndef UNIV_HOTBACKUP
2366#ifndef UNIV_HOTBACKUP
2395#ifndef UNIV_HOTBACKUP
2415 static_assert(
decltype(
update_time)::is_always_lock_free);
2443#ifndef UNIV_HOTBACKUP
2515 size_t n_instant_added_cols =
2518 return (n_instant_added_cols);
2574 for (
ulint i = 0; i < col_nr; i++) {
2589 return (
cols + pos);
2602 if (strcmp(s,
name) == 0) {
2718 table->flags2 &= ~flag;
2896 bool *corrupt)
const override;
2923 [[maybe_unused]])
const override {
2942 bool *corrupt)
const override;
2991#ifndef UNIV_HOTBACKUP
2998 std::pair<dict_foreign_set::iterator, bool> ret =
2999 table->referenced_set.insert(foreign);
3010 table->mutex =
nullptr;
3020 if (
table->mutex !=
nullptr) {
3033 if (
table->autoinc_mutex !=
nullptr) {
3038 if (
table->autoinc_persisted_mutex !=
nullptr) {
3050 table->autoinc_mutex =
nullptr;
3051 table->autoinc_persisted_mutex =
nullptr;
3080#ifndef UNIV_HOTBACKUP
uint32_t space_id_t
Tablespace identifier.
Definition: api0api.h:48
Kerberos Client Authentication nullptr
Definition: auth_kerberos_client_plugin.cc:251
The index tree general types.
The database buffer pool high-level routines.
Persister used for autoinc counters.
Definition: dict0mem.h:2907
ulint write(const PersistentTableMetadata &metadata, byte *buffer, ulint size) const override
Write the autoinc counter of a table, we can pre-calculate the size by calling get_write_size()
Definition: dict0dict.cc:5645
ulint read(PersistentTableMetadata &metadata, const byte *buffer, ulint size, bool *corrupt) const override
Read the autoinc counter from buffer, and store them to metadata object.
Definition: dict0dict.cc:5672
void aggregate(PersistentTableMetadata &metadata, const PersistentTableMetadata &new_entry) const override
Aggregate metadata entries into a single metadata instance, considering version numbers.
Definition: dict0dict.cc:5692
ulint get_write_size(const PersistentTableMetadata &metadata) const override
Pre-calculate the size of metadata to be written.
Definition: dict0mem.h:2922
Persister used for corrupted indexes.
Definition: dict0mem.h:2868
ulint get_write_size(const PersistentTableMetadata &metadata) const override
Pre-calculate the size of metadata to be written.
Definition: dict0dict.cc:5563
static const size_t INDEX_ID_LENGTH
The length of index_id_t we will write.
Definition: dict0mem.h:2903
ulint read(PersistentTableMetadata &metadata, const byte *buffer, ulint size, bool *corrupt) const override
Read the corrupted indexes from buffer, and store them to metadata object.
Definition: dict0dict.cc:5591
ulint write(const PersistentTableMetadata &metadata, byte *buffer, ulint size) const override
Write the corrupted indexes of a table, we can pre-calculate the size by calling get_write_size()
Definition: dict0dict.cc:5527
void aggregate(PersistentTableMetadata &metadata, const PersistentTableMetadata &new_entry) const override
Aggregate metadata entries into a single metadata instance, considering version numbers.
Definition: dict0dict.cc:5630
Interface for persistent dynamic table metadata.
Definition: dict0mem.h:2817
virtual ~Persister()=default
Virtual destructor.
void write_log(table_id_t id, const PersistentTableMetadata &metadata, mtr_t *mtr) const
Write MLOG_TABLE_DYNAMIC_META for persistent dynamic metadata of table.
Definition: dict0dict.cc:5492
virtual ulint write(const PersistentTableMetadata &metadata, byte *buffer, ulint size) const =0
Write the dynamic metadata of a table, we can pre-calculate the size by calling get_write_size()
virtual ulint read(PersistentTableMetadata &metadata, const byte *buffer, ulint size, bool *corrupt) const =0
Read the dynamic metadata from buffer, and store them to metadata object.
virtual ulint get_write_size(const PersistentTableMetadata &metadata) const =0
Pre-calculate the size of metadata to be written.
virtual void aggregate(PersistentTableMetadata &metadata, const PersistentTableMetadata &new_entry) const =0
Aggregate metadata entries into a single metadata instance, considering version numbers.
Container of persisters used in the system.
Definition: dict0mem.h:2951
persisters_t m_persisters
A map to store all persisters needed.
Definition: dict0mem.h:2988
std::map< persistent_type_t, Persister *, std::less< persistent_type_t >, ut::allocator< std::pair< const persistent_type_t, Persister * > > > persisters_t
Definition: dict0mem.h:2955
~Persisters()
Destructor.
Definition: dict0dict.cc:5704
void remove(persistent_type_t type)
Remove a specified persister of type, we will free the Persister.
Definition: dict0dict.cc:5758
size_t write(PersistentTableMetadata &metadata, byte *buffer)
Serialize the metadata to a buffer.
Definition: dict0dict.cc:5772
Persister * get(persistent_type_t type) const
Get the persister object with specified type.
Definition: dict0dict.cc:5714
Persisters()
Constructor.
Definition: dict0mem.h:2959
Persister * add(persistent_type_t type)
Add a specified persister of type, we will allocate the Persister if there is no such persister exist...
Definition: dict0dict.cc:5728
The state of the FTS sub system.
Definition: fts0fts.h:364
SQL identifier name wrapper for pretty-printing.
Definition: dict0mem.h:436
const char * operator()() const
Explicit type conversion.
Definition: dict0mem.h:457
id_name_t & operator=(const char *name)
Assignment operator.
Definition: dict0mem.h:446
const char * m_name
The name in internal representation.
Definition: dict0mem.h:461
id_name_t(const char *name)
Constructor.
Definition: dict0mem.h:442
id_name_t()
Default constructor.
Definition: dict0mem.h:439
Globally unique index identifier.
Definition: dict0types.h:237
Cache position of last inserted or selected record by caching record and holding reference to the blo...
Definition: dict0mem.h:987
last_ops_cur_t()
Constructor.
Definition: dict0mem.h:990
void release()
Definition: dict0mem.h:995
bool disable_caching
disable caching.
Definition: dict0mem.h:1015
mtr_t mtr
active mtr that will be re-used for next insert/select.
Definition: dict0mem.h:1012
buf_block_t * block
block where record reside.
Definition: dict0mem.h:1009
rec_t * rec
last inserted/selected record.
Definition: dict0mem.h:1006
bool invalid
If index structure is undergoing structural change viz.
Definition: dict0mem.h:1020
static const state_t NEVER_DONE
Not yet executed.
Definition: os0once.h:70
static const state_t DONE
Finished execution.
Definition: os0once.h:76
Page size descriptor.
Definition: page0size.h:50
Allocator that allows std::* containers to manage their memory through ut::malloc* and ut::free libra...
Definition: ut0new.h:2183
#define PERFORMANCE_SCHEMA_DB_NAME
Name of the performance schema database.
Definition: client_priv.h:213
constexpr uint32_t DATA_MULTI_VALUE
Multi-value Virtual column.
Definition: data0type.h:225
ulint DATA_MBMINMAXLEN(ulint mbminlen, ulint mbmaxlen)
Definition: data0type.h:250
constexpr uint32_t DATA_MBMAX
Definition: data0type.h:238
static ulint dtype_get_max_size_low(ulint mtype, ulint len)
Returns the maximum size of a data type.
constexpr uint32_t DATA_VIRTUAL
Virtual column.
Definition: data0type.h:223
constexpr uint32_t DATA_ITT_N_SYS_COLS
number of system columns for intrinsic temporary table
Definition: data0type.h:197
constexpr uint32_t DATA_SYS
system column
Definition: data0type.h:75
ulint DATA_MBMINLEN(ulint mbminmaxlen)
Definition: data0type.h:255
ulint DATA_MBMAXLEN(ulint mbminmaxlen)
Definition: data0type.h:259
static ulint dtype_get_fixed_size_low(ulint mtype, ulint prtype, ulint len, ulint mbminmaxlen, bool comp)
Returns the size of a fixed size data type, 0 if not a fixed size type.
constexpr uint32_t DATA_NOT_NULL
this is ORed to the precise type when the column is declared as NOT NULL
Definition: data0type.h:207
constexpr uint32_t DATA_N_SYS_COLS
number of system columns defined above
Definition: data0type.h:194
static ulint dtype_get_min_size_low(ulint mtype, ulint prtype, ulint len, ulint mbminmaxlen)
Returns the minimum size of a data type.
bool DATA_GEOMETRY_MTYPE(ulint mtype)
Definition: data0type.h:269
void dict_mem_init(void)
Initialize dict memory variables.
Definition: dict0mem.cc:834
constexpr uint32_t DICT_CLUSTERED
Type flags of an index: OR'ing of the flags is allowed to define a combination of types.
Definition: dict0mem.h:96
void dict_table_autoinc_create_lazy(dict_table_t *table)
Request for lazy creation of the autoinc latch of a given table.
Definition: dict0mem.h:3049
char * dict_mem_create_temporary_tablename(mem_heap_t *heap, const char *dbtab, table_id_t id)
Create a temporary tablename like "#sql-ibtid-inc" where tid = the Table ID inc = a randomly initiali...
Definition: dict0mem.cc:812
void dict_mem_foreign_fill_vcol_set(dict_foreign_t *foreign)
Fills the dependent virtual columns in a set.
Definition: dict0mem.cc:498
static void DICT_TF2_FLAG_UNSET(dict_table_t *table, uint32_t flag)
Definition: dict0mem.h:2717
void dict_mem_foreign_table_name_lookup_set(dict_foreign_t *foreign, bool do_alloc)
Sets the foreign_table_name_lookup pointer based on the value of lower_case_table_names.
Definition: dict0mem.cc:365
constexpr uint32_t DICT_TF2_FTS_ADD_DOC_ID
Need to add Doc ID column for FTS index build.
Definition: dict0mem.h:279
constexpr uint32_t DICT_TF2_ENCRYPTION_FILE_PER_TABLE
Encryption table bit for innodb_file-per-table only.
Definition: dict0mem.h:295
constexpr uint32_t DICT_TF_BIT_MASK
A mask of all the known/used bits in table flags.
Definition: dict0mem.h:193
constexpr uint32_t DICT_IT_BITS
number of bits used for SYS_INDEXES.TYPE
Definition: dict0mem.h:115
void dict_index_zip_pad_mutex_destroy(dict_index_t *index)
Destroy the zip_pad_mutex of the given index.
Definition: dict0mem.h:3068
ulong zip_failure_threshold_pct
Percentage of compression failures that are allowed in a single round.
Definition: dict0dict.cc:181
constexpr uint32_t DICT_TF_WIDTH_SHARED_SPACE
Width of the SHARED tablespace flag.
Definition: dict0mem.h:184
std::set< dict_foreign_t *, dict_foreign_compare, ut::allocator< dict_foreign_t * > > dict_foreign_set
Definition: dict0mem.h:1742
table_dirty_status
The dirty status of tables, used to indicate if a table has some dynamic metadata changed to be writt...
Definition: dict0mem.h:1869
@ METADATA_CLEAN
All persistent metadata are up to date.
Definition: dict0mem.h:1888
@ METADATA_BUFFERED
Some persistent metadata is buffered in DDTableBuffer table, need to be written back to DD table.
Definition: dict0mem.h:1885
@ METADATA_DIRTY
Some persistent metadata is now dirty in memory, need to be written back to DDTableBuffer table and(o...
Definition: dict0mem.h:1881
constexpr uint32_t MAX_KEY_LENGTH_BITS
Definition: dict0mem.h:1037
constexpr char INSTANT_DROP_SUFFIX_8_0_29[]
Format of INSTANTLY DROPPED column names.
Definition: dict0mem.h:85
constexpr uint32_t DICT_N_COLS_COMPACT
This bitmask is used in SYS_TABLES.N_COLS to set and test whether the Compact page format is used,...
Definition: dict0mem.h:156
std::list< dict_v_idx_t, ut::allocator< dict_v_idx_t > > dict_v_idx_list
Index list to put in dict_v_col_t.
Definition: dict0mem.h:807
constexpr uint32_t DICT_FK_MAX_RECURSIVE_LOAD
Tables could be chained together with Foreign key constraint.
Definition: dict0mem.h:310
std::list< dict_s_col_t, ut::allocator< dict_s_col_t > > dict_s_col_list
list to put stored column for dict_table_t
Definition: dict0mem.h:854
static uint32_t DICT_MAX_FIELD_LEN_BY_FORMAT_FLAG(uint32_t flags)
Definition: dict0mem.h:879
void dict_table_mutex_destroy(dict_table_t *table)
Destroy the mutex of a given table.
Definition: dict0mem.h:3018
constexpr uint32_t DICT_MULTI_VALUE
Multi-value index.
Definition: dict0mem.h:112
constexpr uint32_t DICT_TF_POS_UNUSED
Zero relative shift position of the start of the UNUSED bits.
Definition: dict0mem.h:210
constexpr uint32_t DICT_TF2_FTS
The table has an FTS index.
Definition: dict0mem.h:275
uint32_t DICT_TF_HAS_SHARED_SPACE(uint32_t flags)
Return the value of the SHARED_SPACE field.
Definition: dict0mem.h:246
const char innobase_index_reserve_name[]
"GEN_CLUST_INDEX" is the name reserved for InnoDB default system clustered index when there is no pri...
Definition: dict0mem.h:1025
constexpr uint32_t DICT_SDI
Definition: dict0mem.h:110
constexpr uint32_t DICT_VIRTUAL
Index on Virtual column.
Definition: dict0mem.h:108
constexpr uint32_t DICT_TF_POS_SHARED_SPACE
Zero relative shift position of the SHARED TABLESPACE field.
Definition: dict0mem.h:207
dict_foreign_t * dict_mem_foreign_create(void)
Creates and initializes a foreign constraint memory object.
Definition: dict0mem.cc:342
constexpr uint32_t DICT_TF_MASK_SHARED_SPACE
Bit mask of the SHARED_SPACE field.
Definition: dict0mem.h:226
void dict_foreign_free(dict_foreign_t *foreign)
Frees a foreign key struct.
Definition: dict0mem.h:1773
std::vector< row_prebuilt_t * > temp_prebuilt_vec
A vector to collect prebuilt from different readers working on the same temp table.
Definition: dict0mem.h:1894
constexpr uint32_t DICT_CORRUPT
bit to store the corrupted flag in SYS_INDEXES.TYPE
Definition: dict0mem.h:102
constexpr uint32_t DICT_TF2_BIT_MASK
Definition: dict0mem.h:266
static void dict_mem_fill_index_struct(dict_index_t *index, mem_heap_t *heap, const char *table_name, const char *index_name, ulint space, ulint type, ulint n_fields)
This function poplulates a dict_index_t index memory structure with supplied information.
static bool DICT_TF2_FLAG_IS_SET(const dict_table_t *table, uint32_t flag)
Definition: dict0mem.h:2712
std::ostream & operator<<(std::ostream &out, const dict_foreign_t &foreign)
Definition: dict0mem.cc:877
constexpr uint32_t DICT_FOREIGN_ON_DELETE_SET_NULL
ON DELETE SET NULL.
Definition: dict0mem.h:1805
constexpr uint32_t DICT_FOREIGN_ON_DELETE_NO_ACTION
ON DELETE NO ACTION.
Definition: dict0mem.h:1811
constexpr uint32_t DICT_TF_COMPACT
dict_table_t::flags bit 0 is equal to 1 if the row format = Compact
Definition: dict0mem.h:152
bool dict_foreign_set_validate(const dict_foreign_set &fk_set)
Validate the search order in the foreign key set.
Definition: dict0mem.cc:850
void dict_mem_table_fill_foreign_vcol_set(dict_table_t *table)
Fill virtual columns set in each fk constraint present in the table.
Definition: dict0mem.cc:521
constexpr uint32_t DICT_TF_POS_ZIP_SSIZE
Zero relative shift position of the ZIP_SSIZE field.
Definition: dict0mem.h:198
constexpr uint32_t DICT_TF2_USE_FILE_PER_TABLE
This bit is used during table creation to indicate that it will use its own tablespace instead of the...
Definition: dict0mem.h:283
constexpr uint32_t DICT_TF_WIDTH_DATA_DIR
If a table is created with the MYSQL option DATA DIRECTORY and innodb-file-per-table,...
Definition: dict0mem.h:176
constexpr uint32_t DICT_TF2_AUX
FTS AUX hidden table bit.
Definition: dict0mem.h:298
constexpr uint32_t DICT_TF_REDUNDANT
dict_table_t::flags bit 0 is equal to 0 if the row format = Redundant
Definition: dict0mem.h:149
dict_v_col_t * dict_mem_table_add_v_col(dict_table_t *table, mem_heap_t *heap, const char *name, ulint mtype, ulint prtype, ulint len, ulint pos, ulint num_base, bool is_visible)
Adds a virtual column definition to a table.
Definition: dict0mem.cc:93
void dict_mem_table_free_foreign_vcol_set(dict_table_t *table)
Free the vcol_set from all foreign key constraint on the table.
Definition: dict0mem.cc:534
constexpr uint32_t DICT_FOREIGN_ON_UPDATE_NO_ACTION
ON UPDATE NO ACTION.
Definition: dict0mem.h:1813
persistent_type_t
Persistent dynamic metadata type, there should be 1 to 1 relationship between the metadata and the ty...
Definition: dict0mem.h:2726
@ PM_BIGGEST_TYPE
The biggest type, which should be 1 bigger than the last true type.
Definition: dict0mem.h:2745
@ PM_TABLE_AUTO_INC
Persistent Metadata type for autoinc counter.
Definition: dict0mem.h:2735
@ PM_INDEX_CORRUPTED
Persistent Metadata type for corrupted indexes.
Definition: dict0mem.h:2732
@ PM_SMALLEST_TYPE
The smallest type, which should be 1 less than the first true type.
Definition: dict0mem.h:2729
constexpr uint32_t FK_MAX_CASCADE_DEL
Similarly, when tables are chained together with foreign key constraints with on cascading delete/upd...
Definition: dict0mem.h:318
constexpr char INSTANT_DROP_PREFIX_8_0_32[]
Definition: dict0mem.h:86
static bool is_valid_row_version(const row_version_t version)
Definition: dict0mem.h:422
uint32_t DICT_TF_GET_ZIP_SSIZE(uint32_t flags)
Return the value of the ZIP_SSIZE field.
Definition: dict0mem.h:234
uint32_t DICT_TF_HAS_DATA_DIR(uint32_t flags)
Return the value of the DATA_DIR field.
Definition: dict0mem.h:242
constexpr uint32_t DICT_MAX_FIXED_COL_LEN
Defines the maximum fixed length column size.
Definition: dict0mem.h:887
constexpr uint32_t DICT_FTS
FTS index; can't be combined with the other flags.
Definition: dict0mem.h:104
constexpr uint32_t DICT_TF2_TEMPORARY
TEMPORARY; true for tables from CREATE TEMPORARY TABLE.
Definition: dict0mem.h:269
ulong zip_pad_max
Maximum percentage of a page that can be allowed as a pad to avoid compression failures.
Definition: dict0dict.cc:185
online_index_status
The status of online index creation.
Definition: dict0mem.h:1633
@ ONLINE_INDEX_ABORTED
secondary index creation was aborted and the index should be dropped as soon as index->table->n_ref_c...
Definition: dict0mem.h:1644
@ ONLINE_INDEX_ABORTED_DROPPED
the online index creation was aborted, the index was dropped from the data dictionary and the tablesp...
Definition: dict0mem.h:1649
@ ONLINE_INDEX_CREATION
the index is being created, online (allowing concurrent modifications)
Definition: dict0mem.h:1638
@ ONLINE_INDEX_COMPLETE
the index is complete and ready for access
Definition: dict0mem.h:1635
constexpr uint32_t DICT_TF2_DISCARDED
Set when we discard/detach the tablespace.
Definition: dict0mem.h:286
constexpr uint32_t DICT_TF2_BITS
Table Flags set number 2.
Definition: dict0mem.h:264
constexpr uint32_t DICT_TF_MASK_DATA_DIR
Bit mask of the DATA_DIR field.
Definition: dict0mem.h:223
constexpr uint32_t DICT_TF2_UNUSED_BIT_MASK
Definition: dict0mem.h:265
ut_list_base< lock_t, TableLockGetNode > table_lock_list_t
Definition: dict0mem.h:1832
constexpr uint32_t DICT_SPATIAL
SPATIAL index; can't be combined with the other flags.
Definition: dict0mem.h:106
constexpr uint32_t DICT_FOREIGN_ON_UPDATE_SET_NULL
ON UPDATE SET NULL.
Definition: dict0mem.h:1809
constexpr uint32_t DICT_TF_POS_ATOMIC_BLOBS
Zero relative shift position of the ATOMIC_BLOBS field.
Definition: dict0mem.h:201
std::set< dict_v_col_t *, std::less< dict_v_col_t * >, ut::allocator< dict_v_col_t * > > dict_vcol_set
Set to store the virtual columns which are affected by Foreign key constraint.
Definition: dict0mem.h:1656
void dict_mem_table_col_rename(dict_table_t *table, ulint nth_col, const char *from, const char *to, bool is_virtual)
Renames a column of a table in the data dictionary cache.
Definition: dict0mem.cc:318
constexpr uint32_t DICT_TF_BITS
Width of all the currently known table flags.
Definition: dict0mem.h:187
static void DICT_TF2_FLAG_SET(dict_table_t *table, uint32_t flag)
Definition: dict0mem.h:2708
constexpr uint32_t DICT_TF_MASK_ATOMIC_BLOBS
Bit mask of the ATOMIC_BLOBS field.
Definition: dict0mem.h:220
constexpr uint32_t ZIP_PAD_ROUND_LEN
PADDING HEURISTIC BASED ON LINEAR INCREASE OF PADDING TO AVOID COMPRESSION FAILURES (Note: this is re...
Definition: dict0mem.h:938
void dict_mem_table_add_s_col(dict_table_t *table, ulint num_base)
Adds a stored column definition to a table.
Definition: dict0mem.cc:150
constexpr uint32_t DICT_FOREIGN_ON_DELETE_CASCADE
The flags for ON_UPDATE and ON_DELETE can be ORed; the default is that a foreign key constraint is en...
Definition: dict0mem.h:1803
uint32_t DICT_TF_GET_COMPACT(uint32_t flags)
Return the value of the COMPACT field.
Definition: dict0mem.h:230
constexpr uint32_t ZIP_PAD_SUCCESSFUL_ROUND_LIMIT
Number of successful rounds after which the padding is decreased.
Definition: dict0mem.h:941
void dict_index_zip_pad_mutex_create_lazy(dict_index_t *index)
Request a lazy creation of dict_index_t::zip_pad::mutex.
Definition: dict0mem.h:3059
constexpr uint32_t DICT_UNIQUE
unique index
Definition: dict0mem.h:98
constexpr uint32_t DICT_TABLE_MAGIC_N
Value of 'magic_n'.
Definition: dict0mem.h:1899
constexpr uint32_t ZIP_PAD_INCR
Amount by which padding is increased.
Definition: dict0mem.h:944
constexpr uint32_t DICT_IBUF
insert buffer tree
Definition: dict0mem.h:100
constexpr uint32_t DICT_TF_MASK_COMPACT
Bit mask of the COMPACT field.
Definition: dict0mem.h:214
constexpr uint32_t DICT_INDEX_MAGIC_N
Value of dict_index_t::magic_n.
Definition: dict0mem.h:1033
void dict_table_autoinc_destroy(dict_table_t *table)
Destroy the autoinc latch of the given table.
Definition: dict0mem.h:3031
uint32_t DICT_TF_HAS_ATOMIC_BLOBS(uint32_t flags)
Return the value of the ATOMIC_BLOBS field.
Definition: dict0mem.h:238
constexpr uint32_t DICT_TF2_FTS_HAS_DOC_ID
The table has an internal defined DOC ID column.
Definition: dict0mem.h:272
constexpr uint32_t DICT_TF_POS_DATA_DIR
Zero relative shift position of the DATA_DIR field.
Definition: dict0mem.h:204
bool dict_table_autoinc_own(const dict_table_t *table)
Check if the current thread owns the autoinc_mutex of a given table.
Definition: dict0mem.h:3089
constexpr uint32_t DICT_TF_WIDTH_COMPACT
Width of the COMPACT flag.
Definition: dict0mem.h:159
constexpr char RECOVERY_INDEX_TABLE_NAME[]
index/table name used while applying REDO logs during recovery
Definition: dict0mem.h:89
constexpr uint32_t DICT_FOREIGN_ON_UPDATE_CASCADE
ON UPDATE CASCADE.
Definition: dict0mem.h:1807
constexpr uint32_t DICT_TF2_INTRINSIC
Intrinsic table bit Intrinsic table is table created internally by MySQL modules viz.
Definition: dict0mem.h:292
constexpr uint32_t DICT_TF2_RESURRECT_PREPARED
Table is opened by resurrected trx during crash recovery.
Definition: dict0mem.h:301
uint32_t DICT_TF_GET_UNUSED(uint32_t flags)
Return the contents of the UNUSED bits.
Definition: dict0mem.h:250
void dict_mem_referenced_table_name_lookup_set(dict_foreign_t *foreign, bool do_alloc)
Sets the referenced_table_name_lookup pointer based on the value of lower_case_table_names.
Definition: dict0mem.cc:389
constexpr uint32_t DICT_INDEX_MERGE_THRESHOLD_DEFAULT
Definition: dict0mem.h:1036
void dict_mem_index_free(dict_index_t *index)
Frees an index memory object.
Definition: dict0mem.cc:766
constexpr uint32_t DICT_TF_POS_COMPACT
Zero relative shift position of the COMPACT field.
Definition: dict0mem.h:196
constexpr uint32_t DICT_TF_WIDTH_ZIP_SSIZE
Width of the ZIP_SSIZE flag.
Definition: dict0mem.h:162
void dict_table_mutex_create_lazy(dict_table_t *table)
Request for lazy creation of the mutex of a given table.
Definition: dict0mem.h:3009
constexpr uint32_t DICT_ANTELOPE_MAX_INDEX_COL_LEN
DICT_ANTELOPE_MAX_INDEX_COL_LEN is measured in bytes and is the maximum indexed column length (or ind...
Definition: dict0mem.h:867
std::vector< index_id_t, ut::allocator< index_id_t > > corrupted_ids_t
Definition: dict0mem.h:2748
constexpr uint32_t DICT_TF_MASK_ZIP_SSIZE
Bit mask of the ZIP_SSIZE field.
Definition: dict0mem.h:217
constexpr uint32_t DICT_TF_WIDTH_ATOMIC_BLOBS
Width of the ATOMIC_BLOBS flag.
Definition: dict0mem.h:170
void dict_index_zip_pad_unlock(dict_index_t *index)
Release the zip_pad_mutex of a given index.
Definition: dict0mem.h:3079
Data dictionary memory object creation.
Data dictionary global types.
ib_id_t space_index_t
Index identifier (unique within a tablespace).
Definition: dict0types.h:234
spatial_status_t
whether a col is used in spatial index or regular index Note: the spatial status is part of persisten...
Definition: dict0types.h:346
@ SPATIAL_MIXED
Used in both spatial index and regular index.
Definition: dict0types.h:354
@ SPATIAL_NONE
Not used in gis index.
Definition: dict0types.h:351
@ SPATIAL_ONLY
Only used in spatial index.
Definition: dict0types.h:357
ib_id_t table_id_t
Table or partition identifier (unique within an InnoDB instance).
Definition: dict0types.h:232
ib_quiesce_t
Quiescing states for flushing tables to disk.
Definition: dict0types.h:311
Full text search header file.
The simple hash table utility.
void * hash_node_t
Definition: hash0hash.h:47
static int flags[50]
Definition: hp_test1.cc:40
static int flag
Definition: hp_test1.cc:40
The transaction lock system global types.
@ LOCK_NUM
Definition: lock0types.h:62
static void mem_heap_free(mem_heap_t *heap)
Frees the space occupied by a memory heap.
Data dictionary memory object creation.
#define mtr_commit(m)
Commit a mini-transaction.
Definition: mtr0mtr.h:59
void for_each(const Shards< COUNT > &shards, Function &&f) noexcept
Iterate over the shards.
Definition: ut0counter.h:323
static PFS_engine_table_share_proxy table
Definition: pfs.cc:61
The version of the current data dictionary table definitions.
Definition: dictionary_client.h:43
unsigned long long Object_id
Definition: object_id.h:31
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
size_t size(const char *const c)
Definition: base64.h:46
mutable_buffer buffer(void *p, size_t n) noexcept
Definition: buffer.h:418
const char * table_name
Definition: rules_table_service.cc:56
void delete_(T *ptr) noexcept
Releases storage which has been dynamically allocated through any of the ut::new*() variants.
Definition: ut0new.h:811
std::set< Key, Compare, ut::allocator< Key > > set
Specialization of set which uses ut_allocator.
Definition: ut0new.h:2884
std::map< Key, Value, Compare, ut::allocator< std::pair< const Key, Value > > > map
Specialization of map which uses ut_allocator.
Definition: ut0new.h:2894
A class that aids executing a given function exactly once in a multi-threaded environment.
Query graph global types.
Record manager global types.
const uint8_t MAX_ROW_VERSION
Definition: rem0types.h:46
constexpr uint32_t REC_ANTELOPE_MAX_INDEX_COL_LEN
Definition: rem0types.h:82
constexpr uint32_t REC_VERSION_56_MAX_INDEX_COL_LEN
Maximum indexed field length for tables that have atomic BLOBs.
Definition: rem0types.h:87
const row_version_t INVALID_ROW_VERSION
Definition: rem0types.h:56
byte rec_t
Definition: rem0types.h:41
uint16_t row_version_t
Definition: rem0types.h:53
required uint64 version
Definition: replication_group_member_actions.proto:41
required string type
Definition: replication_group_member_actions.proto:34
Row operation global types.
LEX_CSTRING MYSQL_SCHEMA_NAME
Definition: table.cc:144
LEX_CSTRING INFORMATION_SCHEMA_NAME
Definition: table.cc:137
File containing constants that can be used throughout the server.
constexpr const unsigned int MAX_KEY_LENGTH
Definition: sql_const.h:47
case opt name
Definition: sslopt-case.h:29
const char * str
Definition: mysql_lex_string.h:41
Definition: lock0priv.h:281
The search info struct in an index.
Definition: btr0sea.h:46
The buffer control block structure.
Definition: buf0buf.h:1747
Data structure for newly added virtual column in a table.
Definition: dict0mem.h:830
const dict_v_col_t * v_col
column structures
Definition: dict0mem.h:835
ulint n_v_col
number of new virtual column
Definition: dict0mem.h:832
const char ** v_col_name
new col names
Definition: dict0mem.h:838
Data structure for default value of a column in a table.
Definition: dict0mem.h:471
byte * value
Default value in bytes.
Definition: dict0mem.h:475
dict_col_t * col
Pointer to the column itself.
Definition: dict0mem.h:473
size_t len
Length of default value.
Definition: dict0mem.h:477
bool operator!=(const dict_col_default_t &other) const
Definition: dict0mem.cc:598
bool operator==(const dict_col_default_t &other) const
Definition: dict0mem.cc:576
Data structure for a column in a table.
Definition: dict0mem.h:484
uint16_t get_col_phy_pos() const
Definition: dict0mem.h:566
void copy_type(dtype_t *type) const
Gets the column data type.
Definition: dict0mem.h:662
unsigned ord_part
nonzero if this column appears in the ordering fields of an index
Definition: dict0mem.h:525
bool is_dropped_in_or_before(row_version_t version) const
Check if column is dropped before the given version.
Definition: dict0mem.h:735
void set_phy_pos(uint32_t pos)
Definition: dict0mem.h:578
void set_prefix_phy_pos(uint16_t prefix_pos)
Definition: dict0mem.h:559
row_version_t get_version_added() const
Definition: dict0mem.h:587
spatial_status_t get_spatial_status() const
Check whether the col is used in spatial index or regular index.
Definition: dict0mem.h:705
ulint get_null_size(ulint comp) const
Returns the ROW_FORMAT=REDUNDANT stored SQL NULL size of a column.
Definition: dict0mem.h:701
row_version_t version_added
Definition: dict0mem.h:543
bool is_visible
Definition: dict0mem.h:534
unsigned mtype
main data type
Definition: dict0mem.h:501
unsigned max_prefix
maximum index prefix length on this column.
Definition: dict0mem.h:528
ulint get_fixed_size(ulint comp) const
Returns the size of a fixed size column, 0 if not a fixed size column.
Definition: dict0mem.h:693
bool is_version_added_match(const dict_col_t *col) const
Definition: dict0mem.h:597
static bool is_instant_dropped_name(const std::string col_name)
Check if a column name resembles format for dropped column.
Definition: dict0mem.h:786
bool is_instant_added() const
Definition: dict0mem.h:580
ulint get_min_size() const
Returns the minimum size of the column.
Definition: dict0mem.h:640
void set_default(const byte *value, size_t length, mem_heap_t *heap)
Set default value.
Definition: dict0mem.cc:552
ulint get_mbminlen() const
Gets the minimum number of bytes per character.
Definition: dict0mem.h:673
bool is_version_dropped_match(const dict_col_t *col) const
Definition: dict0mem.h:626
bool is_nullable() const
Check if a column is nullable.
Definition: dict0mem.h:658
bool is_visible_in_version(row_version_t version) const
Check if a column is visible in given version.
Definition: dict0mem.h:761
void set_version_added(row_version_t version)
Definition: dict0mem.h:592
void set_col_phy_pos(uint16_t pos)
Definition: dict0mem.h:569
bool is_instant_dropped() const
Definition: dict0mem.h:609
bool is_multi_value() const
Check if a column is a multi-value virtual column.
Definition: dict0mem.h:654
row_version_t version_dropped
Definition: dict0mem.h:546
uint32_t phy_pos
Definition: dict0mem.h:540
ulint get_max_size() const
Returns the maximum size of the column.
Definition: dict0mem.h:646
bool is_added_after(row_version_t version) const
Check if column is added after the current version.
Definition: dict0mem.h:748
bool assert_equal(const dtype_t *type) const
Assert that a column and a data type match.
Definition: dict0mem.h:770
unsigned len
length; for MySQL data this is field->pack_length(), except that for a >= 5.0.3 type true VARCHAR thi...
Definition: dict0mem.h:505
dict_col_default_t * instant_default
The following are copied from dtype_t, so that all bit-fields can be packed tightly.
Definition: dict0mem.h:492
uint16_t get_prefix_phy_pos() const
Definition: dict0mem.h:553
bool is_virtual() const
Check if a column is a virtual column.
Definition: dict0mem.h:650
unsigned mbminmaxlen
minimum and maximum length of a character, in bytes; DATA_MBMINMAXLEN(mbminlen,mbmaxlen); mbminlen=DA...
Definition: dict0mem.h:514
row_version_t get_version_dropped() const
Definition: dict0mem.h:616
void set_version_dropped(row_version_t version)
Definition: dict0mem.h:621
void set_mbminmaxlen(ulint mbminlen, ulint mbmaxlen)
Sets the minimum and maximum number of bytes per character.
Definition: dict0mem.h:682
unsigned ind
table column position (starting from 0)
Definition: dict0mem.h:523
unsigned prtype
precise type; MySQL data type, charset code, flags to indicate nullability, signedness,...
Definition: dict0mem.h:494
ulint get_mbmaxlen() const
Gets the maximum number of bytes per character.
Definition: dict0mem.h:677
bool has_prefix_phy_pos() const
Definition: dict0mem.h:550
uint32_t get_phy_pos() const
Definition: dict0mem.h:575
Data structure for a field in an index.
Definition: dict0mem.h:890
dict_col_t * col
pointer to the table column
Definition: dict0mem.h:893
id_name_t name
name of the column
Definition: dict0mem.h:894
unsigned is_ascending
0=DESC, 1=ASC
Definition: dict0mem.h:906
unsigned prefix_len
0 or the length of the column prefix in bytes in a MySQL index of type, e.g., INDEX (textcol(25)); mu...
Definition: dict0mem.h:895
unsigned fixed_len
0 or the fixed length of the column if smaller than DICT_ANTELOPE_MAX_INDEX_COL_LEN
Definition: dict0mem.h:903
uint16_t get_phy_pos() const
Definition: dict0mem.h:908
dict_field_t()
Definition: dict0mem.h:891
A function object to add the foreign key constraint to the referenced set of the referenced table,...
Definition: dict0mem.h:2995
void operator()(dict_foreign_t *foreign) const
Definition: dict0mem.h:2996
Compare two dict_foreign_t objects using their ids.
Definition: dict0mem.h:1713
bool operator()(const dict_foreign_t *lhs, const dict_foreign_t *rhs) const
Definition: dict0mem.h:1714
Definition: dict0mem.h:1734
bool operator()(const dict_foreign_t *foreign) const
Definition: dict0mem.h:1735
Function object to check if a foreign key object is there in the given foreign key set or not.
Definition: dict0mem.h:1749
bool operator()(dict_foreign_t *const &foreign) const
Definition: dict0mem.h:1753
const dict_foreign_set & m_foreigns
Definition: dict0mem.h:1758
dict_foreign_not_exists(const dict_foreign_set &obj_)
Definition: dict0mem.h:1750
Definition: dict0mem.h:1700
void operator()(const dict_foreign_t *foreign)
Definition: dict0mem.h:1703
dict_foreign_print(std::ostream &out)
Definition: dict0mem.h:1701
std::ostream & m_out
Definition: dict0mem.h:1706
The destructor will free all the foreign key constraints in the set by calling dict_foreign_free() on...
Definition: dict0mem.h:1787
~dict_foreign_set_free()
Definition: dict0mem.h:1791
dict_foreign_set_free(const dict_foreign_set &foreign_set)
Definition: dict0mem.h:1788
const dict_foreign_set & m_foreign_set
Definition: dict0mem.h:1796
Data structure for a foreign key constraint; an example: FOREIGN KEY (A, B) REFERENCES TABLE2 (C,...
Definition: dict0mem.h:1661
unsigned type
0 or DICT_FOREIGN_ON_DELETE_CASCADE or DICT_FOREIGN_ON_DELETE_SET_NULL
Definition: dict0mem.h:1672
char * referenced_table_name_lookup
referenced table name for dict lookup
Definition: dict0mem.h:1681
dict_vcol_set * v_cols
set of virtual columns affected by foreign key constraint.
Definition: dict0mem.h:1694
char * referenced_table_name
referenced table name
Definition: dict0mem.h:1680
dict_table_t * referenced_table
table where the referenced key is
Definition: dict0mem.h:1683
char * foreign_table_name_lookup
foreign table name used for dict lookup
Definition: dict0mem.h:1675
const char ** referenced_col_names
names of the referenced columns in the referenced table
Definition: dict0mem.h:1685
const char ** foreign_col_names
names of the columns in the foreign key
Definition: dict0mem.h:1678
unsigned n_fields
number of indexes' first fields for which the foreign key constraint is defined: we allow the indexes...
Definition: dict0mem.h:1666
dict_table_t * foreign_table
table where the foreign key is
Definition: dict0mem.h:1677
char * foreign_table_name
foreign table name
Definition: dict0mem.h:1674
mem_heap_t * heap
this object is allocated from this memory heap
Definition: dict0mem.h:1662
dict_index_t * referenced_index
referenced index
Definition: dict0mem.h:1692
char * id
id of the constraint as a null-terminated string
Definition: dict0mem.h:1664
dict_index_t * foreign_index
foreign index; we require that both tables contain explicitly defined indexes for the constraint: Inn...
Definition: dict0mem.h:1687
A function object to find a foreign key with the given index as the referenced index.
Definition: dict0mem.h:1721
const dict_index_t * m_index
Definition: dict0mem.h:1728
dict_foreign_with_index(const dict_index_t *index)
Definition: dict0mem.h:1722
bool operator()(const dict_foreign_t *foreign) const
Definition: dict0mem.h:1724
Data structure for an index.
Definition: dict0mem.h:1041
uint32_t get_n_nullable_before(uint32_t nth) const
Returns the number of nullable fields before specified nth field.
Definition: dict0mem.h:1363
bool is_committed() const
Determine if the index has been committed to the data dictionary.
Definition: dict0mem.h:1266
unsigned uncommitted
a flag that is set for secondary indexes that have not been committed to the data dictionary yet
Definition: dict0mem.h:1126
const char * table_name
table name
Definition: dict0mem.h:1052
const dict_index_t * next() const
Get the next index.
Definition: dict0mem.h:1282
unsigned instant_cols
true if the index is clustered index and it has some instant columns
Definition: dict0mem.h:1129
rtr_ssn_t rtr_ssn
Node sequence number for RTree.
Definition: dict0mem.h:1223
rw_lock_t lock
read-write lock protecting the upper levels of the index tree
Definition: dict0mem.h:1236
id_name_t name
index name
Definition: dict0mem.h:1049
const byte * get_nth_default(ulint nth, ulint *length) const
Get the default value of nth field and its length if exists.
Definition: dict0mem.h:1570
unsigned type
index type (DICT_CLUSTERED, DICT_UNIQUE, DICT_IBUF, DICT_CORRUPT)
Definition: dict0mem.h:1068
uint32_t magic_n
magic number
Definition: dict0mem.h:1145
uint32_t get_nullable_in_version(row_version_t version) const
Return nullable in a specific row version.
Definition: dict0mem.h:1431
uint64_t * stat_n_sample_sizes
number of pages that were sampled to calculate each of stat_n_diff_key_vals[], e.g.
Definition: dict0mem.h:1195
uint32_t get_n_total_fields() const
Returns total fields including INSTANT DROP fields.
Definition: dict0mem.h:1381
bool has_instant_cols_or_row_versions() const
check if either instant or versioned.
Definition: dict0mem.h:1347
void destroy_fields_array()
Definition: dict0mem.h:1450
unsigned n_total_fields
number of total fields in the index (including INSTANT dropped fields)
Definition: dict0mem.h:1104
dict_field_t * get_physical_field(size_t pos) const
Gets the nth physical pos field.
Definition: dict0mem.h:1483
uint32_t get_instant_fields() const
Returns the number of fields before first instant ADD COLUMN.
Definition: dict0mem.ic:92
unsigned trx_id_offset
position of the trx id column in a clustered index record, if the fields before it are known to be of...
Definition: dict0mem.h:1072
void create_fields_array()
Create fields array sorted by phy_pos of field in row.
Definition: dict0mem.h:1438
uint16_t get_field_off_pos(ulint pos) const
Get the physical position of a field on a row.
Definition: dict0mem.h:1521
void set_instant_nullable(uint16_t n)
Set instant nullable.
Definition: dict0mem.h:1243
trx_id_t trx_id
id of the transaction that created this index, or 0 if the index existed when InnoDB was started up
Definition: dict0mem.h:1230
bool fill_dd
Flag whether need to fill dd tables when it's a fulltext index.
Definition: dict0mem.h:1239
const dict_col_t * get_col(ulint pos) const
Gets pointer to the nth column in an index.
Definition: dict0mem.h:1544
std::unique_ptr< dd::Spatial_reference_system > rtr_srs
Cached spatial reference system dictionary entry used by R-tree indexes.
Definition: dict0mem.h:1142
dict_field_t * fields
array of field descriptions
Definition: dict0mem.h:1149
uint32_t srid
spatial reference id
Definition: dict0mem.h:1135
last_ops_cur_t * last_ins_cur
cache the last insert position.
Definition: dict0mem.h:1211
ulint get_col_pos(ulint n, bool inc_prefix=false, bool is_virtual=false) const
Looks for column n in an index.
Definition: dict0mem.cc:733
ulint stat_n_leaf_pages
approximate number of leaf pages in the index tree
Definition: dict0mem.h:1206
space_id_t space_id() const
Get the space id of the tablespace to which this index belongs.
Definition: dict0mem.h:1629
uint32_t has_multi_value_col(const dict_v_col_t *mv_col) const
Check if a multi-value index is built on specified multi-value virtual column.
Definition: dict0mem.h:1605
void add_field(const char *name_arg, ulint prefix_len, bool is_ascending)
Adds a field definition to an index.
Definition: dict0mem.h:1466
uint16_t get_instant_nullable() const
Get instant nullable.
Definition: dict0mem.h:1247
unsigned nulls_equal
if true, SQL NULL == SQL NULL
Definition: dict0mem.h:1086
bool is_usable(const trx_t *trx) const
Check whether index can be used by transaction.
Definition: dict0mem.cc:604
UT_LIST_NODE_T(dict_index_t) indexes
list of indexes of the table
unsigned row_versions
true if the index is clustered index and table has row versions
Definition: dict0mem.h:1132
uint16_t get_field_phy_pos(ulint pos, row_version_t version) const
Definition: dict0mem.h:1525
unsigned n_instant_nullable
number of nullable fields before first instant ADD COLUMN applied to this table.
Definition: dict0mem.h:1111
unsigned space
space where the index tree is placed
Definition: dict0mem.h:1058
unsigned cached
true if the index object is in the dictionary cache
Definition: dict0mem.h:1114
ulint get_sys_col_pos(ulint type) const
Returns the position of a system column in an index.
Definition: dict0mem.cc:716
uint64_t * stat_n_diff_key_vals
Statistics for query optimization.
Definition: dict0mem.h:1190
zip_pad_info_t zip_pad
Information about state of compression failures and successes.
Definition: dict0mem.h:1233
dict_field_t * get_field(ulint pos) const
Gets the nth field of an index.
Definition: dict0mem.h:1497
row_log_t * online_log
the log of modifications during online index creation; valid when online_status is ONLINE_INDEX_CREAT...
Definition: dict0mem.h:1182
uint16_t get_nullable_before_instant_add_drop() const
Get the nullable fields before any INSTANT ADD/DROP.
Definition: dict0mem.h:1251
unsigned disable_ahi
if true, then disable AHI.
Definition: dict0mem.h:1091
uint64_t * stat_n_non_null_key_vals
Definition: dict0mem.h:1200
ulint get_min_size() const
Returns the minimum data size of an index record.
Definition: dict0mem.h:1322
size_t calculate_n_instant_nullable(size_t _n_fields) const
Definition: dict0mem.h:1390
unsigned n_def
number of fields defined so far
Definition: dict0mem.h:1098
unsigned n_nullable
number of nullable fields
Definition: dict0mem.h:1107
rec_cache_t rec_cache
cache the field that needs to be re-computed on each insert.
Definition: dict0mem.h:1220
bool is_multi_value() const
Check whether the index is the multi-value index.
Definition: dict0mem.h:1314
last_ops_cur_t * last_sel_cur
cache the last selected position.
Definition: dict0mem.h:1215
unsigned n_fields
number of fields in the index
Definition: dict0mem.h:1101
uint16_t get_logical_pos(uint16_t phy_pos) const
Given the physical position, find the logical position of field.
Definition: dict0mem.h:1507
st_mysql_ftparser * parser
fulltext parser plugin
Definition: dict0mem.h:1161
uint32_t nullables[MAX_ROW_VERSION+1]
Number of nullable columns in each version.
Definition: dict0mem.h:1157
bool has_row_versions() const
Check whether index belongs to a table having row versions.
Definition: dict0mem.h:1343
space_index_t id
id of the index
Definition: dict0mem.h:1043
void set_committed(bool committed)
Flag an index committed or uncommitted.
Definition: dict0mem.h:1273
bool is_compressed() const
Check if the underlying table is compressed.
Definition: dict0mem.h:2721
void create_nullables(uint32_t current_row_version)
Create nullables array.
Definition: dict0mem.cc:622
bool is_corrupted() const
Check whether the index is corrupted.
Definition: dict0mem.h:1297
bool srid_is_valid
says whether SRID is valid - it cane be undefined
Definition: dict0mem.h:1138
rtr_info_track_t * rtr_track
tracking all R-Tree search cursors
Definition: dict0mem.h:1226
dict_index_t * next()
Get the next index.
Definition: dict0mem.h:1290
bool is_clustered() const
Definition: dict0mem.h:1306
bool has_instant_cols() const
Check whether index has any instantly added columns.
Definition: dict0mem.h:1339
ulint get_col_no(ulint pos) const
Gets the column number the nth field in an index.
Definition: dict0mem.cc:709
mem_heap_t * heap
memory heap
Definition: dict0mem.h:1046
unsigned merge_threshold
In the pessimistic delete, if the page data size drops below this limit in percent,...
Definition: dict0mem.h:1065
std::vector< uint16_t > fields_array
Array of field pos sorted as per their physical pos in record.
Definition: dict0mem.h:1153
dict_table_t * table
back pointer to table
Definition: dict0mem.h:1055
bool is_ngram
true if it's ngram parser
Definition: dict0mem.h:1164
unsigned online_status
enum online_index_status.
Definition: dict0mem.h:1122
bool has_new_v_col
whether it has a newly added virtual column in ALTER
Definition: dict0mem.h:1167
page_size_t get_page_size() const
Get the page size of the tablespace to which this index belongs.
Definition: dict0mem.cc:895
bool is_tuple_instant_format(const uint16_t n_fields_in_tuple) const
Check if tuple is having instant format.
Definition: dict0mem.cc:672
unsigned allow_duplicates
if true, allow duplicate values even if index is created with unique constraint
Definition: dict0mem.h:1083
void fill_srid_value(uint32_t srid_value, bool srid_is_valid_value)
Sets srid and srid_is_valid values.
Definition: dict0mem.h:1589
bool hidden
if the index is an hidden index
Definition: dict0mem.h:1170
unsigned page
index tree root page number
Definition: dict0mem.h:1061
unsigned n_user_defined_cols
number of columns the user defined to be in the index: in the internal representation we add more col...
Definition: dict0mem.h:1075
btr_search_t * search_info
info used in optimistic searches
Definition: dict0mem.h:1177
unsigned to_be_dropped
true if the index is to be dropped; protected by dict_operation_lock
Definition: dict0mem.h:1117
ulint stat_index_size
approximate index size in database pages
Definition: dict0mem.h:1203
unsigned n_uniq
number of fields from the beginning which are enough to determine an index entry uniquely
Definition: dict0mem.h:1095
Data structure for a stored column in a table.
Definition: dict0mem.h:842
dict_col_t * m_col
Stored column ptr.
Definition: dict0mem.h:844
ulint s_pos
column pos in table
Definition: dict0mem.h:850
dict_col_t ** base_col
array of base col ptr
Definition: dict0mem.h:846
ulint num_base
number of base columns
Definition: dict0mem.h:848
Data structure for a database table.
Definition: dict0mem.h:1904
uint32_t stats_auto_recalc
Indicates whether the table uses automatic recalc for persistent stats or not.
Definition: dict0mem.h:2252
bool has_instant_cols() const
Definition: dict0mem.h:2489
bool refresh_fk
refresh/reload FK info
Definition: dict0mem.h:2441
bool support_instant_add_drop() const
Determine if the table can support instant ADD/DROP COLUMN.
Definition: dict0dict.ic:1370
dict_vcol_templ_t * vc_templ
mysql_row_templ_t for base columns used for compute the virtual columns
Definition: dict0mem.h:2435
dict_col_t * get_col_by_name(const char *name) const
Get column by name.
Definition: dict0mem.h:2595
bool has_row_versions() const
Definition: dict0mem.h:2474
unsigned n_cols
Number of non-virtual columns.
Definition: dict0mem.h:2046
rw_lock_t * stats_latch
This latch protects: "dict_table_t::stat_initialized", "dict_table_t::stat_n_rows (*)",...
Definition: dict0mem.h:2210
std::atomic< const trx_t * > autoinc_trx
The transaction that currently holds the the AUTOINC lock on this table.
Definition: dict0mem.h:2362
ulint stat_clustered_index_size
Approximate clustered index size in database pages.
Definition: dict0mem.h:2264
uint32_t get_n_instant_add_cols() const
Get number of columns added instantly.
Definition: dict0mem.h:2522
void unlock()
Unlock the table handle.
Definition: dict0dict.ic:1211
const char * get_col_name(ulint col_nr) const
Returns a column's name.
Definition: dict0mem.h:2568
std::atomic< ulint > n_foreign_key_checks_running
Count of how many foreign key check operations are currently being performed on the table.
Definition: dict0mem.h:2166
unsigned drop_aborted
true if some indexes should be dropped after ONLINE_INDEX_ABORTED or ONLINE_INDEX_ABORTED_DROPPED.
Definition: dict0mem.h:2078
ulint magic_n
Magic number.
Definition: dict0mem.h:2431
dict_foreign_set foreign_set
set of foreign key constraints which refer to this table
Definition: dict0mem.h:2175
UT_LIST_BASE_NODE_T(dict_index_t, indexes) indexes
List of indexes of the table.
bool skip_gap_locks() const
Definition: dict0dict.ic:1365
table_lock_list_t locks
List of locks on the table.
Definition: dict0mem.h:2397
unsigned to_be_dropped
true if the table is to be dropped, but not yet actually dropped (could in the background drop list).
Definition: dict0mem.h:2040
dict_col_t * get_col(uint pos) const
Gets the nth column of a table.
Definition: dict0mem.h:2585
uint64_t version
metadata version number of dd::Table::se_private_data()
Definition: dict0mem.h:2124
id_name_t tablespace
NULL or the tablespace name that this table is assigned to, specified by the TABLESPACE option.
Definition: dict0mem.h:1989
unsigned ibd_file_missing
true if this is in a single-table tablespace and the .ibd file is missing.
Definition: dict0mem.h:2030
hash_node_t name_hash
Hash chain node.
Definition: dict0mem.h:2107
unsigned n_instant_cols
Number of non-virtual columns before first instant ADD COLUMN, including the system columns like n_co...
Definition: dict0mem.h:2051
unsigned n_v_def
Number of virtual columns defined so far.
Definition: dict0mem.h:2060
ulint stats_sample_pages
The number of pages to sample for this table during persistent stats estimation.
Definition: dict0mem.h:2257
size_t get_index_count() const
Definition: dict0mem.h:2118
unsigned skip_alter_undo
true if the table is an intermediate table during copy alter operation or a partition/subpartition wh...
Definition: dict0mem.h:2025
bool explicitly_non_lru
true if this table is explicitly put to non-LRU list during table creation
Definition: dict0mem.h:2455
bool is_system_table
True if the table belongs to a system database (mysql, information_schema or performance_schema)
Definition: dict0mem.h:2104
std::atomic< size_t > n_rec_locks
Count of the number of record locks on this table.
Definition: dict0mem.h:2384
size_t get_n_instant_added_col_v1() const
Definition: dict0mem.h:2512
unsigned flags2
Stores information about: 1 whether the table has been created using CREATE TEMPORARY TABLE,...
Definition: dict0mem.h:2018
void lock()
Lock the table handle.
Definition: dict0dict.ic:1202
ib_quiesce_t quiesce
Quiescing states, protected by the dict_index_t::lock.
Definition: dict0mem.h:2374
bool has_pk() const
Check if the table has user defined primary key (PK).
Definition: dict0mem.cc:899
unsigned n_t_def
Number of total columns defined so far.
Definition: dict0mem.h:2057
void set_instant_cols(uint16_t n_inst_cols)
Set the number of columns when the first instant ADD COLUMN happens.
Definition: dict0mem.h:2501
unsigned flags
Stores information about: 1 row format (redundant or compact), 2 compressed page size (zip shift size...
Definition: dict0mem.h:2005
ulint autoinc_field_no
The position of autoinc counter field in clustered index.
Definition: dict0mem.h:2354
uint64_t sess_row_id
row-id counter for use by intrinsic table for getting row-id.
Definition: dict0mem.h:2415
void acquire()
Acquire the table handle.
Definition: dict0dict.ic:1160
uint16_t get_instant_cols() const
Get the number of user columns when the first instant ADD COLUMN happens.
Definition: dict0mem.h:2508
std::atomic< table_dirty_status > dirty_status
table dynamic metadata status, protected by dict_persist->mutex
Definition: dict0mem.h:2142
table_id_t id
Id of the table.
Definition: dict0mem.h:1965
UT_LIST_NODE_T(dict_table_t) table_LRU
Node of the LRU list of tables.
unsigned cached
true if the table object has been added to the dictionary cache.
Definition: dict0mem.h:2033
dict_index_t * first_index()
Definition: dict0mem.h:2468
bool is_temporary() const
Determine if this is a temporary table.
Definition: dict0mem.h:2670
bool discard_after_ddl
remove the dict_table_t from cache after DDL operation
Definition: dict0mem.h:2438
uint16_t get_n_user_cols() const
Gets the number of user-defined non-virtual columns in a table in the dictionary cache.
Definition: dict0mem.h:2615
void acquire_with_lock()
Acquire the table handle, with lock() and unlock() the table.
Definition: dict0dict.ic:1166
trx_id_t def_trx_id
Transaction id that last touched the table definition.
Definition: dict0mem.h:2171
ulint get_total_cols() const
Gets the number of all non-virtual columns in a table including columns dropped INSTANTly.
Definition: dict0mem.h:2643
dd::Object_id dd_space_id
dd::Tablespace::id of the table
Definition: dict0mem.h:1995
uint32_t total_col_count
Total non-virtual column count.
Definition: dict0mem.h:2136
dict_s_col_list * s_cols
List of stored column descriptions.
Definition: dict0mem.h:2091
unsigned n_m_v_cols
Number of multi-value virtual columns.
Definition: dict0mem.h:2066
unsigned n_t_cols
Number of total columns (include virtual and non-virtual)
Definition: dict0mem.h:2054
ib_mutex_t * mutex
Mutex of the table for concurrency access.
Definition: dict0mem.h:1958
table_id_t parent_id
If FTS AUX table, parent table id.
Definition: dict0mem.h:2270
uint64_t stat_modified_counter
How many rows are modified since last stats recalc.
Definition: dict0mem.h:2278
void release()
Release the table handle.
Definition: dict0dict.ic:1182
bool is_compressed() const
Check if the table is compressed.
Definition: dict0mem.h:1907
uint64_t autoinc
Autoinc counter value to give to the next inserted row.
Definition: dict0mem.h:2328
ulint stat_sum_of_other_index_sizes
Approximate size of other indexes in database pages.
Definition: dict0mem.h:2267
dict_col_t * get_sys_col(ulint sys) const
Gets the given system column of a table.
Definition: dict0mem.h:2656
void get_table_name(std::string &schema, std::string &table) const
Get schema and table name in system character set.
Definition: dict0dd.cc:7313
bool is_system_schema() const
Definition: dict0mem.h:1942
dict_foreign_set referenced_set
Definition: dict0mem.h:2178
unsigned n_def
Number of non-virtual columns defined so far.
Definition: dict0mem.h:2043
unsigned fk_max_recusive_level
Maximum recursive level we support when loading tables chained together with FK constraints.
Definition: dict0mem.h:2161
uint16_t get_n_sys_cols() const
Gets the number of system columns in a table.
Definition: dict0mem.h:2625
std::atomic< os_once::state_t > mutex_created
Creation state of mutex.
Definition: dict0mem.h:1961
uint64_t autoinc_persisted
Autoinc counter value that has been persisted in redo logs or DDTableBuffer.
Definition: dict0mem.h:2348
bool is_encrypted() const
Check if the table is encrypted.
Definition: dict0mem.h:1911
bool has_instant_add_cols() const
check if table has INSTANT ADD columns.
Definition: dict0mem.h:2535
fts_t * fts
FTS specific state variables.
Definition: dict0mem.h:2368
std::atomic< std::chrono::system_clock::time_point > update_time
Timestamp of the last modification of this table.
Definition: dict0mem.h:2414
bool is_intrinsic() const
Determine whether the table is intrinsic.
Definition: dict0mem.h:2691
ib_mutex_t * autoinc_mutex
Mutex protecting the autoincrement counter.
Definition: dict0mem.h:2325
bool can_be_evicted
true if this table is expected to be kept in memory.
Definition: dict0mem.h:2070
ulong count_by_mode[LOCK_NUM]
count_by_mode[M] = number of locks in this->locks with lock->type_mode&LOCK_MODE_MASK == M.
Definition: dict0mem.h:2410
dict_v_col_t * v_cols
Array of virtual column descriptions.
Definition: dict0mem.h:2084
temp_prebuilt_vec * temp_prebuilt
multiple cursors can be active on this temporary table
Definition: dict0mem.h:2445
void set_upgraded_instant()
Set table to be upgraded table with INSTANT ADD columns in V1.
Definition: dict0mem.h:2542
mem_heap_t * heap
Memory heap.
Definition: dict0mem.h:1976
dict_index_t * fts_doc_id_index
The FTS_DOC_ID_INDEX, or NULL if no fulltext indexes exist.
Definition: dict0mem.h:2113
table_name_t trunc_name
Truncate name.
Definition: dict0mem.h:1982
unsigned stat_initialized
true if statistics have been calculated the first time after database startup or table creation.
Definition: dict0mem.h:2214
uint64_t sess_trx_id
trx_id counter for use by intrinsic table for getting trx-id.
Definition: dict0mem.h:2427
byte stats_bg_flag
The state of the background stats thread wrt this table.
Definition: dict0mem.h:2296
std::atomic< uint64_t > n_ref_count
Count of how many handles are opened to this table.
Definition: dict0mem.h:2392
unsigned n_v_cols
Number of virtual columns.
Definition: dict0mem.h:2063
bool in_dirty_dict_tables_list
This field is used to mark if a table is in the dirty_dict_tables_list.
Definition: dict0mem.h:2155
std::chrono::steady_clock::time_point stats_last_recalc
Timestamp of last recalc of the stats.
Definition: dict0mem.h:2217
bool is_corrupted() const
Check whether the table is corrupted.
Definition: dict0mem.h:2550
ulint get_n_cols() const
Gets the number of all non-virtual columns (also system) in a table in the dictionary cache.
Definition: dict0mem.h:2634
const char * col_names
Column names packed in a character string "name1\0name2\0...nameN\0".
Definition: dict0mem.h:2097
table_name_t name
Table name.
Definition: dict0mem.h:1979
char * data_dir_path
NULL or the directory path specified by DATA DIRECTORY.
Definition: dict0mem.h:1985
const dict_index_t * first_index() const
Definition: dict0mem.h:2462
uint64_t get_ref_count() const
Get reference count.
Definition: dict0dict.ic:1157
lock_t * autoinc_lock
AUTOINC related members.
Definition: dict0mem.h:2318
uint32_t stat_persistent
Indicates whether the table uses persistent stats or not.
Definition: dict0mem.h:2234
uint32_t initial_col_count
Initial non-virtual column count.
Definition: dict0mem.h:2130
const char * v_col_names
Virtual column names.
Definition: dict0mem.h:2100
uint32_t current_col_count
Current non-virtual column count.
Definition: dict0mem.h:2133
unsigned big_rows
true if the maximum length of a single row exceeds BIG_ROW_SIZE.
Definition: dict0mem.h:2191
hash_node_t id_hash
Hash chain node.
Definition: dict0mem.h:2110
bool m_upgraded_instant
Set if table is upgraded instant table.
Definition: dict0mem.h:2139
bool has_instant_drop_cols() const
check if table has INSTANT DROP columns.
Definition: dict0mem.h:2539
uint64_t stat_n_rows
Approximate number of rows in the table.
Definition: dict0mem.h:2261
bool is_fts_aux() const
Determine if this is a FTS AUX table.
Definition: dict0mem.h:2676
uint32_t get_n_instant_drop_cols() const
Get number of columns dropped instantly.
Definition: dict0mem.h:2528
uint32_t current_row_version
Current row version in case columns are added/dropped INSTANTly.
Definition: dict0mem.h:2127
std::atomic< os_once::state_t > autoinc_mutex_created
Creation state of autoinc_mutex member.
Definition: dict0mem.h:2321
bool is_dd_table
true only for dictionary tables like mysql/tables, mysql/columns, mysql/tablespaces,...
Definition: dict0mem.h:2451
bool is_upgraded_instant() const
Checks if table is upgraded table with INSTANT ADD columns in V1.
Definition: dict0mem.h:2546
UT_LIST_NODE_T(dict_table_t) dirty_dict_tables
Node of the dirty table list of tables, which is protected by dict_persist->mutex.
std::atomic< os_once::state_t > stats_latch_created
Statistics for query optimization.
Definition: dict0mem.h:2197
ib_mutex_t * autoinc_persisted_mutex
Mutex protecting the persisted autoincrement counter.
Definition: dict0mem.h:2331
bool does_not_fit_in_memory
This field is used to specify in simulations tables which are so big that disk should be accessed.
Definition: dict0mem.h:2186
unsigned ddl_not_evictable
true if this table is not evictable(can_be_evicted) and this is because of DDL operation
Definition: dict0mem.h:2074
dict_col_t * cols
Array of column descriptions.
Definition: dict0mem.h:2081
space_id_t space
Space where the clustered index of the table is placed.
Definition: dict0mem.h:1992
Data structure for a virtual column in a table.
Definition: dict0mem.h:810
dict_v_idx_list * v_indexes
Virtual index list, and column position in the index, the allocated memory is not from table->heap,...
Definition: dict0mem.h:826
ulint v_pos
column pos in table
Definition: dict0mem.h:821
dict_col_t m_col
column structure
Definition: dict0mem.h:812
ulint num_base
number of base columns
Definition: dict0mem.h:818
dict_col_t ** base_col
array of base column ptr
Definition: dict0mem.h:815
Index information put in a list of virtual column structure.
Definition: dict0mem.h:798
ulint nth_field
position in this index
Definition: dict0mem.h:803
dict_index_t * index
active index on the column
Definition: dict0mem.h:800
Structure defines template related to virtual columns and their base columns.
Definition: dict0mem.h:1841
byte * default_rec
default column value if any
Definition: dict0mem.h:1864
ulint n_v_col
number of virtual columns
Definition: dict0mem.h:1846
std::string tb_name
table name
Definition: dict0mem.h:1855
ulint rec_len
MySQL record length.
Definition: dict0mem.h:1861
std::string share_name
share->table_name
Definition: dict0mem.h:1858
ulint n_col
number of regular columns
Definition: dict0mem.h:1843
mysql_row_templ_t ** vtempl
array of templates for virtual col and their base columns
Definition: dict0mem.h:1849
std::string db_name
table's database name
Definition: dict0mem.h:1852
Definition: data0type.h:498
Red black tree instance.
Definition: ut0rbt.h:72
Lock struct; protected by lock_sys latches.
Definition: lock0priv.h:137
The info structure stored at the beginning of a heap block.
Definition: mem0mem.h:302
Mini-transaction handle and buffer.
Definition: mtr0mtr.h:177
bool is_active() const
Definition: mtr0mtr.h:510
Definition: row0mysql.h:455
If key is fixed length key then cache the record offsets on first computation.
Definition: dict0mem.h:975
size_t nullable_cols
Number of NULLable columns among those for which offsets are cached.
Definition: dict0mem.h:980
const ulint * offsets
Holds reference to cached offsets for record.
Definition: dict0mem.h:977
Buffer for logging modifications during online index creation.
Definition: row0log.cc:184
Definition: gis0type.h:152
Definition: gis0type.h:160
The structure used in the spin lock implementation of a read-write lock.
Definition: sync0rw.h:363
Definition: plugin_ftparser.h:216
Table name wrapper for pretty-printing.
Definition: dict0mem.h:465
char * m_name
The name in internal representation.
Definition: dict0mem.h:467
Definition: trx0trx.h:675
Data structure to hold information about about how much space in an uncompressed page should be left ...
Definition: dict0mem.h:957
SysMutex * mutex
mutex protecting the info
Definition: dict0mem.h:958
ulint success
successful compression ops during current round
Definition: dict0mem.h:960
std::atomic< ulint > pad
number of bytes used as pad
Definition: dict0mem.h:959
ulint n_rounds
number of currently successful rounds
Definition: dict0mem.h:964
ulint failure
failed compression ops during current round
Definition: dict0mem.h:962
std::atomic< os_once::state_t > mutex_created
Creation state of mutex member.
Definition: dict0mem.h:967
The read-write lock (for threads, not for database transactions)
Transaction system global type definitions.
ib_id_t trx_id_t
Transaction identifier (DB_TRX_ID, DATA_TRX_ID)
Definition: trx0types.h:138
Version control for database, common definitions, and include files.
constexpr uint32_t UINT32_UNDEFINED
The 'undefined' value for a 32-bit unsigned integer.
Definition: univ.i:428
#define UNIV_LIKELY(cond)
Definition: univ.i:519
constexpr uint32_t UNIV_SQL_NULL
The following number as the length of a logical field means that the field has the SQL NULL as its va...
Definition: univ.i:463
constexpr uint16_t UINT16_UNDEFINED
The 'undefined' value for a 16-bit unsigned integer.
Definition: univ.i:431
unsigned long int ulint
Definition: univ.i:406
Utilities for byte operations.
#define ut_ad(EXPR)
Debug assertion.
Definition: ut0dbg.h:105
#define ut_a(EXPR)
Abort execution if EXPR does not evaluate to nonzero.
Definition: ut0dbg.h:93
#define UT_LIST_GET_LEN(BASE)
Alternative macro to get the number of nodes in a two-way list, i.e., its length.
Definition: ut0lst.h:441
#define UT_LIST_GET_FIRST(BASE)
Gets the first node in a two-way list.
Definition: ut0lst.h:446
#define UT_LIST_GET_NEXT(NAME, N)
Gets the next node in a two-way list.
Definition: ut0lst.h:429
static int ut_strcmp(const char *str1, const char *str2)
Wrapper for strcmp(3).
#define mutex_own(M)
Checks that the current thread owns the mutex.
Definition: ut0mutex.h:165
#define mutex_exit(M)
Definition: ut0mutex.h:123
#define mutex_free(M)
Definition: ut0mutex.h:125
Dynamic memory allocation routines and custom allocators specifically crafted to support memory instr...
Random numbers and hashing.
unsigned long id[MAX_DEAD]
Definition: xcom_base.cc:510
int n
Definition: xcom_base.cc:509