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 \
343 ulint num_base,
bool is_visible);
357 const char *from,
const char *to,
458 operator const char *()
const {
return (
m_name); }
560 return ((uint16_t)(
phy_pos >> 16));
690 ut_ad(mbminlen <= mbmaxlen);
715 return (spatial_status);
728 return (spatial_status);
781#ifndef UNIV_HOTBACKUP
880#define DICT_MAX_FIELD_LEN_BY_FORMAT(table) \
881 (dict_table_has_atomic_blobs(table) ? REC_VERSION_56_MAX_INDEX_COL_LEN \
882 : REC_ANTELOPE_MAX_INDEX_COL_LEN - 1)
971#ifndef UNIV_HOTBACKUP
1033class Spatial_reference_system;
1080 "1<<MAX_KEY_LENGTH_BITS) < MAX_KEY_LENGTH");
1147 std::unique_ptr<dd::Spatial_reference_system>
rtr_srs;
1164#ifndef UNIV_HOTBACKUP
1184#ifndef UNIV_HOTBACKUP
1330 for (
unsigned i = 0; i <
n_fields; i++) {
1369 uint32_t nullable = 0;
1372 for (
size_t i = 0; i < nth; ++i) {
1401 size_t n_drop_nullable_cols = 0;
1402 size_t new_n_nullable = 0;
1403 for (
size_t i = 0; i <
n_def; i++) {
1413 n_drop_nullable_cols++;
1426 new_n_nullable += n_drop_nullable_cols;
1428 return new_n_nullable;
1445 for (uint32_t i = 0; i <
n_def; i++) {
1447 ut_ad(field !=
nullptr && field->
col !=
nullptr);
1480 field->
name = name_arg;
1481 field->
prefix_len = (
unsigned int)prefix_len;
1513 for (
size_t i = 0; i <
n_def; i++) {
1514 if (
get_field(i)->get_phy_pos() == phy_pos) {
1536 uint16_t res = phy_pos;
1537 for (
size_t i = 0; i < phy_pos; i++) {
1568 bool is_virtual =
false)
const;
1612 for (uint32_t i = 0; i <
n_fields; ++i) {
1659typedef std::set<dict_v_col_t *, std::less<dict_v_col_t *>,
1781 if (foreign->
v_cols !=
nullptr) {
1833#ifndef UNIV_HOTBACKUP
1896#ifndef UNIV_HOTBACKUP
1935#ifndef UNIV_HOTBACKUP
1939 void get_table_name(std::string &schema, std::string &table)
const;
1942 std::string schema_name;
1948 0 == strcmp(schema_name.c_str(),
"sys") ||
2141#ifndef UNIV_HOTBACKUP
2190#ifndef UNIV_HOTBACKUP
2226#define DICT_STATS_PERSISTENT_ON (1 << 1)
2227#define DICT_STATS_PERSISTENT_OFF (1 << 2)
2243#define DICT_STATS_AUTO_RECALC_ON (1 << 1)
2244#define DICT_STATS_AUTO_RECALC_OFF (1 << 2)
2278#define BG_STAT_NONE 0
2283#define BG_STAT_IN_PROGRESS (1 << 0)
2288#define BG_STAT_SHOULD_QUIT (1 << 1)
2314#ifndef UNIV_HOTBACKUP
2363#ifndef UNIV_HOTBACKUP
2392#ifndef UNIV_HOTBACKUP
2412 static_assert(
decltype(
update_time)::is_always_lock_free);
2440#ifndef UNIV_HOTBACKUP
2508 size_t n_instant_added_cols =
2511 return (n_instant_added_cols);
2567 for (
ulint i = 0; i < col_nr; i++) {
2582 return (
cols + pos);
2595 if (strcmp(s,
name) == 0) {
2825 ulint size)
const = 0;
2844 ulint size,
bool *corrupt)
const = 0;
2873 ulint size)
const override;
2891 bool *corrupt)
const override;
2912 ulint size)
const override;
2918 [[maybe_unused]])
const override {
2937 bool *corrupt)
const override;
2986#ifndef UNIV_HOTBACKUP
2993 std::pair<dict_foreign_set::iterator, bool> ret =
2994 table->referenced_set.insert(foreign);
3005 table->
mutex =
nullptr;
3015 if (table->
mutex !=
nullptr) {
3075#ifndef UNIV_HOTBACKUP
uint32_t space_id_t
Tablespace identifier.
Definition: api0api.h:51
The index tree general types.
The database buffer pool high-level routines.
Persister used for autoinc counters.
Definition: dict0mem.h:2902
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:5626
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:5653
void aggregate(PersistentTableMetadata &metadata, const PersistentTableMetadata &new_entry) const override
Aggregate metadata entries into a single metadata instance, considering version numbers.
Definition: dict0dict.cc:5673
ulint get_write_size(const PersistentTableMetadata &metadata) const override
Pre-calculate the size of metadata to be written.
Definition: dict0mem.h:2917
Persister used for corrupted indexes.
Definition: dict0mem.h:2863
ulint get_write_size(const PersistentTableMetadata &metadata) const override
Pre-calculate the size of metadata to be written.
Definition: dict0dict.cc:5544
static const size_t INDEX_ID_LENGTH
The length of index_id_t we will write.
Definition: dict0mem.h:2898
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:5572
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:5508
void aggregate(PersistentTableMetadata &metadata, const PersistentTableMetadata &new_entry) const override
Aggregate metadata entries into a single metadata instance, considering version numbers.
Definition: dict0dict.cc:5611
Interface for persistent dynamic table metadata.
Definition: dict0mem.h:2812
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:5473
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:2946
persisters_t m_persisters
A map to store all persisters needed.
Definition: dict0mem.h:2983
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:2950
~Persisters()
Destructor.
Definition: dict0dict.cc:5685
void remove(persistent_type_t type)
Remove a specified persister of type, we will free the Persister.
Definition: dict0dict.cc:5739
size_t write(PersistentTableMetadata &metadata, byte *buffer)
Serialize the metadata to a buffer.
Definition: dict0dict.cc:5753
Persister * get(persistent_type_t type) const
Get the persister object with specified type.
Definition: dict0dict.cc:5695
Persisters()
Constructor.
Definition: dict0mem.h:2954
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:5709
The state of the FTS sub system.
Definition: fts0fts.h:362
SQL identifier name wrapper for pretty-printing.
Definition: dict0mem.h:441
const char * operator()() const
Explicit type conversion.
Definition: dict0mem.h:462
id_name_t & operator=(const char *name)
Assignment operator.
Definition: dict0mem.h:451
const char * m_name
The name in internal representation.
Definition: dict0mem.h:466
id_name_t(const char *name)
Constructor.
Definition: dict0mem.h:447
id_name_t()
Default constructor.
Definition: dict0mem.h:444
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:992
last_ops_cur_t()
Constructor.
Definition: dict0mem.h:995
void release()
Definition: dict0mem.h:1000
bool disable_caching
disable caching.
Definition: dict0mem.h:1020
mtr_t mtr
active mtr that will be re-used for next insert/select.
Definition: dict0mem.h:1017
buf_block_t * block
block where record reside.
Definition: dict0mem.h:1014
rec_t * rec
last inserted/selected record.
Definition: dict0mem.h:1011
bool invalid
If index structure is undergoing structural change viz.
Definition: dict0mem.h:1025
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:2181
#define PERFORMANCE_SCHEMA_DB_NAME
Name of the performance schema database.
Definition: client_priv.h:210
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:3044
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:2710
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
const uint8_t MAX_ROW_VERSION
Maximum number of rows version allowed when columns are added/dropped INSTANTly.
Definition: dict0mem.h:323
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:3063
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:1747
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:1874
@ METADATA_CLEAN
All persistent metadata are up to date.
Definition: dict0mem.h:1893
@ METADATA_BUFFERED
Some persistent metadata is buffered in DDTableBuffer table, need to be written back to DD table.
Definition: dict0mem.h:1890
@ METADATA_DIRTY
Some persistent metadata is now dirty in memory, need to be written back to DDTableBuffer table and(o...
Definition: dict0mem.h:1886
constexpr uint32_t MAX_KEY_LENGTH_BITS
Definition: dict0mem.h:1042
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:812
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:859
static uint32_t DICT_MAX_FIELD_LEN_BY_FORMAT_FLAG(uint32_t flags)
Definition: dict0mem.h:884
void dict_table_mutex_destroy(dict_table_t *table)
Destroy the mutex of a given table.
Definition: dict0mem.h:3013
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:1030
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:1778
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:1899
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:2705
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:1810
constexpr uint32_t DICT_FOREIGN_ON_DELETE_NO_ACTION
ON DELETE NO ACTION.
Definition: dict0mem.h:1816
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:1818
persistent_type_t
Persistent dynamic metadata type, there should be 1 to 1 relationship between the metadata and the ty...
Definition: dict0mem.h:2721
@ PM_BIGGEST_TYPE
The biggest type, which should be 1 bigger than the last true type.
Definition: dict0mem.h:2740
@ PM_TABLE_AUTO_INC
Persistent Metadata type for autoinc counter.
Definition: dict0mem.h:2730
@ PM_INDEX_CORRUPTED
Persistent Metadata type for corrupted indexes.
Definition: dict0mem.h:2727
@ PM_SMALLEST_TYPE
The smallest type, which should be 1 less than the first true type.
Definition: dict0mem.h:2724
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
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:892
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:1638
@ 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:1649
@ ONLINE_INDEX_ABORTED_DROPPED
the online index creation was aborted, the index was dropped from the data dictionary and the tablesp...
Definition: dict0mem.h:1654
@ ONLINE_INDEX_CREATION
the index is being created, online (allowing concurrent modifications)
Definition: dict0mem.h:1643
@ ONLINE_INDEX_COMPLETE
the index is complete and ready for access
Definition: dict0mem.h:1640
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:1837
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:1814
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:1661
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:2701
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:943
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:1808
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:946
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:3054
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:1904
static bool is_valid_row_version(const uint8_t version)
Definition: dict0mem.h:427
constexpr uint32_t ZIP_PAD_INCR
Amount by which padding is increased.
Definition: dict0mem.h:949
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:1038
void dict_table_autoinc_destroy(dict_table_t *table)
Destroy the autoinc latch of the given table.
Definition: dict0mem.h:3026
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:3084
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:1812
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:1041
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:3004
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:872
std::vector< index_id_t, ut::allocator< index_id_t > > corrupted_ids_t
Definition: dict0mem.h:2743
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:3074
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
Fido Client Authentication nullptr
Definition: fido_client_plugin.cc:222
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:60
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
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
mutable_buffer buffer(void *p, size_t n) noexcept
Definition: buffer.h:420
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:809
std::set< Key, Compare, ut::allocator< Key > > set
Specialization of set which uses ut_allocator.
Definition: ut0new.h:2882
std::map< Key, Value, Compare, ut::allocator< std::pair< const Key, Value > > > map
Specialization of map which uses ut_allocator.
Definition: ut0new.h:2892
A class that aids executing a given function exactly once in a multi-threaded environment.
Query graph global types.
Record manager global types.
constexpr uint32_t REC_ANTELOPE_MAX_INDEX_COL_LEN
Definition: rem0types.h:67
constexpr uint32_t REC_VERSION_56_MAX_INDEX_COL_LEN
Maximum indexed field length for tables that have atomic BLOBs.
Definition: rem0types.h:72
byte rec_t
Definition: rem0types.h:41
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:135
LEX_CSTRING INFORMATION_SCHEMA_NAME
Definition: table.cc:128
File containing constants that can be used throughout the server.
constexpr const unsigned int MAX_KEY_LENGTH
Definition: sql_const.h:48
case opt name
Definition: sslopt-case.h:33
const char * str
Definition: mysql_lex_string.h:41
Definition: lock0lock.cc:3399
The search info struct in an index.
Definition: btr0sea.h:46
The buffer control block structure.
Definition: buf0buf.h:1690
Data structure for newly added virtual column in a table.
Definition: dict0mem.h:835
const dict_v_col_t * v_col
column structures
Definition: dict0mem.h:840
ulint n_v_col
number of new virtual column
Definition: dict0mem.h:837
const char ** v_col_name
new col names
Definition: dict0mem.h:843
Data structure for default value of a column in a table.
Definition: dict0mem.h:476
bool operator!=(const dict_col_default_t &other)
Definition: dict0mem.cc:598
byte * value
Default value in bytes.
Definition: dict0mem.h:480
dict_col_t * col
Pointer to the column itself.
Definition: dict0mem.h:478
size_t len
Length of default value.
Definition: dict0mem.h:482
bool operator==(const dict_col_default_t &other)
Definition: dict0mem.cc:576
Data structure for a column in a table.
Definition: dict0mem.h:489
uint16_t get_col_phy_pos() const
Definition: dict0mem.h:571
uint8_t version_dropped
Definition: dict0mem.h:551
void copy_type(dtype_t *type) const
Gets the column data type.
Definition: dict0mem.h:667
unsigned ord_part
nonzero if this column appears in the ordering fields of an index
Definition: dict0mem.h:530
void set_phy_pos(uint32_t pos)
Definition: dict0mem.h:583
void set_version_added(uint8_t version)
Definition: dict0mem.h:597
void set_prefix_phy_pos(uint16_t prefix_pos)
Definition: dict0mem.h:564
bool is_added_after(uint8_t version) const
Check if column is added after the current version.
Definition: dict0mem.h:753
spatial_status_t get_spatial_status() const
Check whether the col is used in spatial index or regular index.
Definition: dict0mem.h:710
ulint get_null_size(ulint comp) const
Returns the ROW_FORMAT=REDUNDANT stored SQL NULL size of a column.
Definition: dict0mem.h:706
void set_version_dropped(uint8_t version)
Definition: dict0mem.h:626
bool is_visible
Definition: dict0mem.h:539
unsigned mtype
main data type
Definition: dict0mem.h:506
unsigned max_prefix
maximum index prefix length on this column.
Definition: dict0mem.h:533
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:698
bool is_version_added_match(const dict_col_t *col) const
Definition: dict0mem.h:602
bool is_visible_in_version(uint8_t version) const
Check if a column is visible in given version.
Definition: dict0mem.h:766
uint8_t get_version_added() const
Definition: dict0mem.h:592
static bool is_instant_dropped_name(const std::string col_name)
Check if a column name resembles format for dropped column.
Definition: dict0mem.h:791
bool is_instant_added() const
Definition: dict0mem.h:585
bool is_dropped_in_or_before(uint8_t version) const
Check if column is dropped before the given version.
Definition: dict0mem.h:740
ulint get_min_size() const
Returns the minimum size of the column.
Definition: dict0mem.h:645
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:678
bool is_version_dropped_match(const dict_col_t *col) const
Definition: dict0mem.h:631
bool is_nullable() const
Check if a column is nullable.
Definition: dict0mem.h:663
void set_col_phy_pos(uint16_t pos)
Definition: dict0mem.h:574
bool is_instant_dropped() const
Definition: dict0mem.h:614
uint8_t get_version_dropped() const
Definition: dict0mem.h:621
bool is_multi_value() const
Check if a column is a multi-value virtual column.
Definition: dict0mem.h:659
uint32_t phy_pos
Definition: dict0mem.h:545
ulint get_max_size() const
Returns the maximum size of the column.
Definition: dict0mem.h:651
bool assert_equal(const dtype_t *type) const
Assert that a column and a data type match.
Definition: dict0mem.h:775
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:510
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:497
uint16_t get_prefix_phy_pos() const
Definition: dict0mem.h:558
bool is_virtual() const
Check if a column is a virtual column.
Definition: dict0mem.h:655
uint8_t version_added
Definition: dict0mem.h:548
unsigned mbminmaxlen
minimum and maximum length of a character, in bytes; DATA_MBMINMAXLEN(mbminlen,mbmaxlen); mbminlen=DA...
Definition: dict0mem.h:519
void set_mbminmaxlen(ulint mbminlen, ulint mbmaxlen)
Sets the minimum and maximum number of bytes per character.
Definition: dict0mem.h:687
unsigned ind
table column position (starting from 0)
Definition: dict0mem.h:528
unsigned prtype
precise type; MySQL data type, charset code, flags to indicate nullability, signedness,...
Definition: dict0mem.h:499
ulint get_mbmaxlen() const
Gets the maximum number of bytes per character.
Definition: dict0mem.h:682
bool has_prefix_phy_pos() const
Definition: dict0mem.h:555
uint32_t get_phy_pos() const
Definition: dict0mem.h:580
Data structure for a field in an index.
Definition: dict0mem.h:895
dict_col_t * col
pointer to the table column
Definition: dict0mem.h:898
id_name_t name
name of the column
Definition: dict0mem.h:899
unsigned is_ascending
0=DESC, 1=ASC
Definition: dict0mem.h:911
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:900
unsigned fixed_len
0 or the fixed length of the column if smaller than DICT_ANTELOPE_MAX_INDEX_COL_LEN
Definition: dict0mem.h:908
uint16_t get_phy_pos() const
Definition: dict0mem.h:913
dict_field_t()
Definition: dict0mem.h:896
A function object to add the foreign key constraint to the referenced set of the referenced table,...
Definition: dict0mem.h:2990
void operator()(dict_foreign_t *foreign) const
Definition: dict0mem.h:2991
Compare two dict_foreign_t objects using their ids.
Definition: dict0mem.h:1718
bool operator()(const dict_foreign_t *lhs, const dict_foreign_t *rhs) const
Definition: dict0mem.h:1719
Definition: dict0mem.h:1739
bool operator()(const dict_foreign_t *foreign) const
Definition: dict0mem.h:1740
Function object to check if a foreign key object is there in the given foreign key set or not.
Definition: dict0mem.h:1754
bool operator()(dict_foreign_t *const &foreign) const
Definition: dict0mem.h:1758
const dict_foreign_set & m_foreigns
Definition: dict0mem.h:1763
dict_foreign_not_exists(const dict_foreign_set &obj_)
Definition: dict0mem.h:1755
Definition: dict0mem.h:1705
void operator()(const dict_foreign_t *foreign)
Definition: dict0mem.h:1708
dict_foreign_print(std::ostream &out)
Definition: dict0mem.h:1706
std::ostream & m_out
Definition: dict0mem.h:1711
The destructor will free all the foreign key constraints in the set by calling dict_foreign_free() on...
Definition: dict0mem.h:1792
~dict_foreign_set_free()
Definition: dict0mem.h:1796
dict_foreign_set_free(const dict_foreign_set &foreign_set)
Definition: dict0mem.h:1793
const dict_foreign_set & m_foreign_set
Definition: dict0mem.h:1801
Data structure for a foreign key constraint; an example: FOREIGN KEY (A, B) REFERENCES TABLE2 (C,...
Definition: dict0mem.h:1666
unsigned type
0 or DICT_FOREIGN_ON_DELETE_CASCADE or DICT_FOREIGN_ON_DELETE_SET_NULL
Definition: dict0mem.h:1677
char * referenced_table_name_lookup
referenced table name for dict lookup
Definition: dict0mem.h:1686
dict_vcol_set * v_cols
set of virtual columns affected by foreign key constraint.
Definition: dict0mem.h:1699
char * referenced_table_name
referenced table name
Definition: dict0mem.h:1685
dict_table_t * referenced_table
table where the referenced key is
Definition: dict0mem.h:1688
char * foreign_table_name_lookup
foreign table name used for dict lookup
Definition: dict0mem.h:1680
const char ** referenced_col_names
names of the referenced columns in the referenced table
Definition: dict0mem.h:1690
const char ** foreign_col_names
names of the columns in the foreign key
Definition: dict0mem.h:1683
unsigned n_fields
number of indexes' first fields for which the foreign key constraint is defined: we allow the indexes...
Definition: dict0mem.h:1671
dict_table_t * foreign_table
table where the foreign key is
Definition: dict0mem.h:1682
char * foreign_table_name
foreign table name
Definition: dict0mem.h:1679
mem_heap_t * heap
this object is allocated from this memory heap
Definition: dict0mem.h:1667
dict_index_t * referenced_index
referenced index
Definition: dict0mem.h:1697
char * id
id of the constraint as a null-terminated string
Definition: dict0mem.h:1669
dict_index_t * foreign_index
foreign index; we require that both tables contain explicitly defined indexes for the constraint: Inn...
Definition: dict0mem.h:1692
A function object to find a foreign key with the given index as the referenced index.
Definition: dict0mem.h:1726
const dict_index_t * m_index
Definition: dict0mem.h:1733
dict_foreign_with_index(const dict_index_t *index)
Definition: dict0mem.h:1727
bool operator()(const dict_foreign_t *foreign) const
Definition: dict0mem.h:1729
Data structure for an index.
Definition: dict0mem.h:1046
uint32_t get_n_nullable_before(uint32_t nth) const
Returns the number of nullable fields before specified nth field.
Definition: dict0mem.h:1368
bool is_committed() const
Determine if the index has been committed to the data dictionary.
Definition: dict0mem.h:1271
unsigned uncommitted
a flag that is set for secondary indexes that have not been committed to the data dictionary yet
Definition: dict0mem.h:1131
const char * table_name
table name
Definition: dict0mem.h:1057
const dict_index_t * next() const
Get the next index.
Definition: dict0mem.h:1287
unsigned instant_cols
true if the index is clustered index and it has some instant columns
Definition: dict0mem.h:1134
rtr_ssn_t rtr_ssn
Node sequence number for RTree.
Definition: dict0mem.h:1228
rw_lock_t lock
read-write lock protecting the upper levels of the index tree
Definition: dict0mem.h:1241
id_name_t name
index name
Definition: dict0mem.h:1054
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:1575
unsigned type
index type (DICT_CLUSTERED, DICT_UNIQUE, DICT_IBUF, DICT_CORRUPT)
Definition: dict0mem.h:1073
uint32_t magic_n
magic number
Definition: dict0mem.h:1150
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:1200
uint32_t get_n_total_fields() const
Returns total fields including INSTANT DROP fields.
Definition: dict0mem.h:1386
bool has_instant_cols_or_row_versions() const
check if either instant or versioned.
Definition: dict0mem.h:1352
void destroy_fields_array()
Definition: dict0mem.h:1455
unsigned n_total_fields
number of total fields in the index (including INSTANT dropped fields)
Definition: dict0mem.h:1109
dict_field_t * get_physical_field(size_t pos) const
Gets the nth physical pos field.
Definition: dict0mem.h:1488
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:1077
void create_fields_array()
Create fields array sorted by phy_pos of field in row.
Definition: dict0mem.h:1443
uint16_t get_field_off_pos(ulint pos) const
Get the physical position of a field on a row.
Definition: dict0mem.h:1526
void set_instant_nullable(uint16_t n)
Set instant nullable.
Definition: dict0mem.h:1248
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:1235
bool fill_dd
Flag whether need to fill dd tables when it's a fulltext index.
Definition: dict0mem.h:1244
const dict_col_t * get_col(ulint pos) const
Gets pointer to the nth column in an index.
Definition: dict0mem.h:1549
std::unique_ptr< dd::Spatial_reference_system > rtr_srs
Cached spatial reference system dictionary entry used by R-tree indexes.
Definition: dict0mem.h:1147
dict_field_t * fields
array of field descriptions
Definition: dict0mem.h:1154
uint32_t srid
spatial reference id
Definition: dict0mem.h:1140
last_ops_cur_t * last_ins_cur
cache the last insert position.
Definition: dict0mem.h:1216
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:1211
space_id_t space_id() const
Get the space id of the tablespace to which this index belongs.
Definition: dict0mem.h:1634
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:1610
void add_field(const char *name_arg, ulint prefix_len, bool is_ascending)
Adds a field definition to an index.
Definition: dict0mem.h:1471
uint16_t get_field_phy_pos(ulint pos, uint8_t version) const
Definition: dict0mem.h:1530
uint16_t get_instant_nullable() const
Get instant nullable.
Definition: dict0mem.h:1252
unsigned nulls_equal
if true, SQL NULL == SQL NULL
Definition: dict0mem.h:1091
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:1137
unsigned n_instant_nullable
number of nullable fields before first instant ADD COLUMN applied to this table.
Definition: dict0mem.h:1116
unsigned space
space where the index tree is placed
Definition: dict0mem.h:1063
unsigned cached
true if the index object is in the dictionary cache
Definition: dict0mem.h:1119
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:1195
zip_pad_info_t zip_pad
Information about state of compression failures and successes.
Definition: dict0mem.h:1238
dict_field_t * get_field(ulint pos) const
Gets the nth field of an index.
Definition: dict0mem.h:1502
row_log_t * online_log
the log of modifications during online index creation; valid when online_status is ONLINE_INDEX_CREAT...
Definition: dict0mem.h:1187
uint16_t get_nullable_before_instant_add_drop() const
Get the nullable fields before any INSTANT ADD/DROP.
Definition: dict0mem.h:1256
unsigned disable_ahi
if true, then disable AHI.
Definition: dict0mem.h:1096
uint64_t * stat_n_non_null_key_vals
Definition: dict0mem.h:1205
ulint get_min_size() const
Returns the minimum data size of an index record.
Definition: dict0mem.h:1327
size_t calculate_n_instant_nullable(size_t _n_fields) const
Definition: dict0mem.h:1395
unsigned n_def
number of fields defined so far
Definition: dict0mem.h:1103
unsigned n_nullable
number of nullable fields
Definition: dict0mem.h:1112
rec_cache_t rec_cache
cache the field that needs to be re-computed on each insert.
Definition: dict0mem.h:1225
bool is_multi_value() const
Check whether the index is the multi-value index.
Definition: dict0mem.h:1319
last_ops_cur_t * last_sel_cur
cache the last selected position.
Definition: dict0mem.h:1220
unsigned n_fields
number of fields in the index
Definition: dict0mem.h:1106
uint16_t get_logical_pos(uint16_t phy_pos) const
Given the physical position, find the logical position of field.
Definition: dict0mem.h:1512
st_mysql_ftparser * parser
fulltext parser plugin
Definition: dict0mem.h:1166
uint32_t nullables[MAX_ROW_VERSION+1]
Number of nullable columns in each version.
Definition: dict0mem.h:1162
bool has_row_versions() const
Check whether index belongs to a table having row versions.
Definition: dict0mem.h:1348
space_index_t id
id of the index
Definition: dict0mem.h:1048
void set_committed(bool committed)
Flag an index committed or uncommitted.
Definition: dict0mem.h:1278
bool is_compressed() const
Check if the underlying table is compressed.
Definition: dict0mem.h:2714
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:1302
bool srid_is_valid
says whether SRID is valid - it cane be undefined
Definition: dict0mem.h:1143
rtr_info_track_t * rtr_track
tracking all R-Tree search cursors
Definition: dict0mem.h:1231
dict_index_t * next()
Get the next index.
Definition: dict0mem.h:1295
bool is_clustered() const
Definition: dict0mem.h:1311
bool has_instant_cols() const
Check whether index has any instantly added columns.
Definition: dict0mem.h:1344
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:1051
unsigned merge_threshold
In the pessimistic delete, if the page data size drops below this limit in percent,...
Definition: dict0mem.h:1070
std::vector< uint16_t > fields_array
Array of field pos sorted as per their physical pos in record.
Definition: dict0mem.h:1158
dict_table_t * table
back pointer to table
Definition: dict0mem.h:1060
bool is_ngram
true if it's ngram parser
Definition: dict0mem.h:1169
unsigned online_status
enum online_index_status.
Definition: dict0mem.h:1127
bool has_new_v_col
whether it has a newly added virtual column in ALTER
Definition: dict0mem.h:1172
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:1088
void fill_srid_value(uint32_t srid_value, bool srid_is_valid_value)
Sets srid and srid_is_valid values.
Definition: dict0mem.h:1594
bool hidden
if the index is an hidden index
Definition: dict0mem.h:1175
unsigned page
index tree root page number
Definition: dict0mem.h:1066
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:1080
btr_search_t * search_info
info used in optimistic searches
Definition: dict0mem.h:1182
unsigned to_be_dropped
true if the index is to be dropped; protected by dict_operation_lock
Definition: dict0mem.h:1122
uint32_t get_nullable_in_version(uint8_t version) const
Return nullable in a specific row version.
Definition: dict0mem.h:1436
ulint stat_index_size
approximate index size in database pages
Definition: dict0mem.h:1208
unsigned n_uniq
number of fields from the beginning which are enough to determine an index entry uniquely
Definition: dict0mem.h:1100
Data structure for a stored column in a table.
Definition: dict0mem.h:847
dict_col_t * m_col
Stored column ptr.
Definition: dict0mem.h:849
ulint s_pos
column pos in table
Definition: dict0mem.h:855
dict_col_t ** base_col
array of base col ptr
Definition: dict0mem.h:851
ulint num_base
number of base columns
Definition: dict0mem.h:853
Data structure for a database table.
Definition: dict0mem.h:1909
uint32_t stats_auto_recalc
Indicates whether the table uses automatic recalc for persistent stats or not.
Definition: dict0mem.h:2249
bool has_instant_cols() const
Definition: dict0mem.h:2482
bool refresh_fk
refresh/reload FK info
Definition: dict0mem.h:2438
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:2432
dict_col_t * get_col_by_name(const char *name) const
Get column by name.
Definition: dict0mem.h:2588
bool has_row_versions() const
Definition: dict0mem.h:2467
unsigned n_cols
Number of non-virtual columns.
Definition: dict0mem.h:2045
rw_lock_t * stats_latch
This latch protects: "dict_table_t::stat_initialized", "dict_table_t::stat_n_rows (*)",...
Definition: dict0mem.h:2207
std::atomic< const trx_t * > autoinc_trx
The transaction that currently holds the the AUTOINC lock on this table.
Definition: dict0mem.h:2359
ulint stat_clustered_index_size
Approximate clustered index size in database pages.
Definition: dict0mem.h:2261
uint32_t get_n_instant_add_cols() const
Get number of columns added instantly.
Definition: dict0mem.h:2515
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:2561
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:2163
unsigned drop_aborted
true if some indexes should be dropped after ONLINE_INDEX_ABORTED or ONLINE_INDEX_ABORTED_DROPPED.
Definition: dict0mem.h:2077
ulint magic_n
Magic number.
Definition: dict0mem.h:2428
dict_foreign_set foreign_set
set of foreign key constraints which refer to this table
Definition: dict0mem.h:2172
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:2394
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:2039
dict_col_t * get_col(uint pos) const
Gets the nth column of a table.
Definition: dict0mem.h:2578
uint64_t version
metadata version number of dd::Table::se_private_data()
Definition: dict0mem.h:2121
id_name_t tablespace
NULL or the tablespace name that this table is assigned to, specified by the TABLESPACE option.
Definition: dict0mem.h:1988
unsigned ibd_file_missing
true if this is in a single-table tablespace and the .ibd file is missing.
Definition: dict0mem.h:2029
hash_node_t name_hash
Hash chain node.
Definition: dict0mem.h:2106
unsigned n_instant_cols
Number of non-virtual columns before first instant ADD COLUMN, including the system columns like n_co...
Definition: dict0mem.h:2050
unsigned n_v_def
Number of virtual columns defined so far.
Definition: dict0mem.h:2059
ulint stats_sample_pages
The number of pages to sample for this table during persistent stats estimation.
Definition: dict0mem.h:2254
unsigned skip_alter_undo
true if the table is an intermediate table during copy alter operation or a partition/subpartition wh...
Definition: dict0mem.h:2024
bool explicitly_non_lru
true if this table is explicitly put to non-LRU list during table creation
Definition: dict0mem.h:2452
bool is_system_table
True if the table belongs to a system database (mysql, information_schema or performance_schema)
Definition: dict0mem.h:2103
std::atomic< size_t > n_rec_locks
Count of the number of record locks on this table.
Definition: dict0mem.h:2381
size_t get_n_instant_added_col_v1() const
Definition: dict0mem.h:2505
unsigned flags2
Stores information about: 1 whether the table has been created using CREATE TEMPORARY TABLE,...
Definition: dict0mem.h:2017
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:2371
unsigned n_t_def
Number of total columns defined so far.
Definition: dict0mem.h:2056
void set_instant_cols(uint16_t n_inst_cols)
Set the number of columns when the first instant ADD COLUMN happens.
Definition: dict0mem.h:2494
unsigned flags
Stores information about: 1 row format (redundant or compact), 2 compressed page size (zip shift size...
Definition: dict0mem.h:2004
ulint autoinc_field_no
The position of autoinc counter field in clustered index.
Definition: dict0mem.h:2351
uint64_t sess_row_id
row-id counter for use by intrinsic table for getting row-id.
Definition: dict0mem.h:2412
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:2501
std::atomic< table_dirty_status > dirty_status
table dynamic metadata status, protected by dict_persist->mutex
Definition: dict0mem.h:2139
table_id_t id
Id of the table.
Definition: dict0mem.h:1964
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:2032
dict_index_t * first_index()
Definition: dict0mem.h:2461
bool is_temporary() const
Determine if this is a temporary table.
Definition: dict0mem.h:2663
bool discard_after_ddl
remove the dict_table_t from cache after DDL operation
Definition: dict0mem.h:2435
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:2608
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:2168
ulint get_total_cols() const
Gets the number of all non-virtual columns in a table including columns dropped INSTANTly.
Definition: dict0mem.h:2636
dd::Object_id dd_space_id
dd::Tablespace::id of the table
Definition: dict0mem.h:1994
uint32_t total_col_count
Total non-virtual column count.
Definition: dict0mem.h:2133
dict_s_col_list * s_cols
List of stored column descriptions.
Definition: dict0mem.h:2090
unsigned n_m_v_cols
Number of multi-value virtual columns.
Definition: dict0mem.h:2065
unsigned n_t_cols
Number of total columns (include virtual and non-virtual)
Definition: dict0mem.h:2053
ib_mutex_t * mutex
Mutex of the table for concurrency access.
Definition: dict0mem.h:1957
table_id_t parent_id
If FTS AUX table, parent table id.
Definition: dict0mem.h:2267
uint64_t stat_modified_counter
How many rows are modified since last stats recalc.
Definition: dict0mem.h:2275
void release()
Release the table handle.
Definition: dict0dict.ic:1182
bool is_compressed() const
Check if the table is compressed.
Definition: dict0mem.h:1912
uint64_t autoinc
Autoinc counter value to give to the next inserted row.
Definition: dict0mem.h:2325
ulint stat_sum_of_other_index_sizes
Approximate size of other indexes in database pages.
Definition: dict0mem.h:2264
dict_col_t * get_sys_col(ulint sys) const
Gets the given system column of a table.
Definition: dict0mem.h:2649
void get_table_name(std::string &schema, std::string &table) const
Get schema and table name in system character set.
Definition: dict0dd.cc:7311
bool is_system_schema() const
Definition: dict0mem.h:1941
dict_foreign_set referenced_set
Definition: dict0mem.h:2175
unsigned n_def
Number of non-virtual columns defined so far.
Definition: dict0mem.h:2042
unsigned fk_max_recusive_level
Maximum recursive level we support when loading tables chained together with FK constraints.
Definition: dict0mem.h:2158
uint16_t get_n_sys_cols() const
Gets the number of system columns in a table.
Definition: dict0mem.h:2618
std::atomic< os_once::state_t > mutex_created
Creation state of mutex.
Definition: dict0mem.h:1960
uint64_t autoinc_persisted
Autoinc counter value that has been persisted in redo logs or DDTableBuffer.
Definition: dict0mem.h:2345
bool has_instant_add_cols() const
check if table has INSTANT ADD columns.
Definition: dict0mem.h:2528
fts_t * fts
FTS specific state variables.
Definition: dict0mem.h:2365
std::atomic< std::chrono::system_clock::time_point > update_time
Timestamp of the last modification of this table.
Definition: dict0mem.h:2411
bool is_intrinsic() const
Determine whether the table is intrinsic.
Definition: dict0mem.h:2684
ib_mutex_t * autoinc_mutex
Mutex protecting the autoincrement counter.
Definition: dict0mem.h:2322
bool can_be_evicted
true if this table is expected to be kept in memory.
Definition: dict0mem.h:2069
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:2407
dict_v_col_t * v_cols
Array of virtual column descriptions.
Definition: dict0mem.h:2083
temp_prebuilt_vec * temp_prebuilt
multiple cursors can be active on this temporary table
Definition: dict0mem.h:2442
void set_upgraded_instant()
Set table to be upgraded table with INSTANT ADD columns in V1.
Definition: dict0mem.h:2535
mem_heap_t * heap
Memory heap.
Definition: dict0mem.h:1975
dict_index_t * fts_doc_id_index
The FTS_DOC_ID_INDEX, or NULL if no fulltext indexes exist.
Definition: dict0mem.h:2112
table_name_t trunc_name
Truncate name.
Definition: dict0mem.h:1981
unsigned stat_initialized
true if statistics have been calculated the first time after database startup or table creation.
Definition: dict0mem.h:2211
uint64_t sess_trx_id
trx_id counter for use by intrinsic table for getting trx-id.
Definition: dict0mem.h:2424
byte stats_bg_flag
The state of the background stats thread wrt this table.
Definition: dict0mem.h:2293
std::atomic< uint64_t > n_ref_count
Count of how many handles are opened to this table.
Definition: dict0mem.h:2389
unsigned n_v_cols
Number of virtual columns.
Definition: dict0mem.h:2062
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:2152
std::chrono::steady_clock::time_point stats_last_recalc
Timestamp of last recalc of the stats.
Definition: dict0mem.h:2214
bool is_corrupted() const
Check whether the table is corrupted.
Definition: dict0mem.h:2543
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:2627
const char * col_names
Column names packed in a character string "name1\0name2\0...nameN\0".
Definition: dict0mem.h:2096
table_name_t name
Table name.
Definition: dict0mem.h:1978
char * data_dir_path
NULL or the directory path specified by DATA DIRECTORY.
Definition: dict0mem.h:1984
const dict_index_t * first_index() const
Definition: dict0mem.h:2455
uint64_t get_ref_count() const
Get reference count.
Definition: dict0dict.ic:1157
lock_t * autoinc_lock
AUTOINC related members.
Definition: dict0mem.h:2315
uint32_t stat_persistent
Indicates whether the table uses persistent stats or not.
Definition: dict0mem.h:2231
uint32_t initial_col_count
Initial non-virtual column count.
Definition: dict0mem.h:2127
const char * v_col_names
Virtual column names.
Definition: dict0mem.h:2099
uint32_t current_col_count
Current non-virtual column count.
Definition: dict0mem.h:2130
unsigned big_rows
true if the maximum length of a single row exceeds BIG_ROW_SIZE.
Definition: dict0mem.h:2188
hash_node_t id_hash
Hash chain node.
Definition: dict0mem.h:2109
bool m_upgraded_instant
Set if table is upgraded instant table.
Definition: dict0mem.h:2136
bool has_instant_drop_cols() const
check if table has INSTANT DROP columns.
Definition: dict0mem.h:2532
uint64_t stat_n_rows
Approximate number of rows in the table.
Definition: dict0mem.h:2258
bool is_fts_aux() const
Determine if this is a FTS AUX table.
Definition: dict0mem.h:2669
uint32_t get_n_instant_drop_cols() const
Get number of columns dropped instantly.
Definition: dict0mem.h:2521
uint32_t current_row_version
Current row version in case columns are added/dropped INSTANTly.
Definition: dict0mem.h:2124
std::atomic< os_once::state_t > autoinc_mutex_created
Creation state of autoinc_mutex member.
Definition: dict0mem.h:2318
bool is_dd_table
true only for dictionary tables like mysql/tables, mysql/columns, mysql/tablespaces,...
Definition: dict0mem.h:2448
bool is_upgraded_instant() const
Checks if table is upgraded table with INSTANT ADD columns in V1.
Definition: dict0mem.h:2539
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:2194
ib_mutex_t * autoinc_persisted_mutex
Mutex protecting the persisted autoincrement counter.
Definition: dict0mem.h:2328
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:2183
unsigned ddl_not_evictable
true if this table is not evictable(can_be_evicted) and this is because of DDL operation
Definition: dict0mem.h:2073
dict_col_t * cols
Array of column descriptions.
Definition: dict0mem.h:2080
space_id_t space
Space where the clustered index of the table is placed.
Definition: dict0mem.h:1991
Data structure for a virtual column in a table.
Definition: dict0mem.h:815
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:831
ulint v_pos
column pos in table
Definition: dict0mem.h:826
dict_col_t m_col
column structure
Definition: dict0mem.h:817
ulint num_base
number of base columns
Definition: dict0mem.h:823
dict_col_t ** base_col
array of base column ptr
Definition: dict0mem.h:820
Index information put in a list of virtual column structure.
Definition: dict0mem.h:803
ulint nth_field
position in this index
Definition: dict0mem.h:808
dict_index_t * index
active index on the column
Definition: dict0mem.h:805
Structure defines template related to virtual columns and their base columns.
Definition: dict0mem.h:1846
byte * default_rec
default column value if any
Definition: dict0mem.h:1869
ulint n_v_col
number of virtual columns
Definition: dict0mem.h:1851
std::string tb_name
table name
Definition: dict0mem.h:1860
ulint rec_len
MySQL record length.
Definition: dict0mem.h:1866
std::string share_name
share->table_name
Definition: dict0mem.h:1863
ulint n_col
number of regular columns
Definition: dict0mem.h:1848
mysql_row_templ_t ** vtempl
array of templates for virtual col and their base columns
Definition: dict0mem.h:1854
std::string db_name
table's database name
Definition: dict0mem.h:1857
Definition: data0type.h:498
Red black tree instance.
Definition: ut0rbt.h:72
Lock struct; protected by lock_sys latches.
Definition: lock0priv.h:136
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:980
size_t nullable_cols
Number of NULLable columns among those for which offsets are cached.
Definition: dict0mem.h:985
const ulint * offsets
Holds reference to cached offsets for record.
Definition: dict0mem.h:982
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:360
Definition: plugin_ftparser.h:212
Table name wrapper for pretty-printing.
Definition: dict0mem.h:470
char * m_name
The name in internal representation.
Definition: dict0mem.h:472
Definition: trx0trx.h:684
Data structure to hold information about about how much space in an uncompressed page should be left ...
Definition: dict0mem.h:962
SysMutex * mutex
mutex protecting the info
Definition: dict0mem.h:963
ulint success
successful compression ops during current round
Definition: dict0mem.h:965
std::atomic< ulint > pad
number of bytes used as pad
Definition: dict0mem.h:964
ulint n_rounds
number of currently successful rounds
Definition: dict0mem.h:969
ulint failure
failed compression ops during current round
Definition: dict0mem.h:967
std::atomic< os_once::state_t > mutex_created
Creation state of mutex member.
Definition: dict0mem.h:972
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
unsigned int uint
Definition: uca9-dump.cc:75
Version control for database, common definitions, and include files.
constexpr uint8_t UINT8_UNDEFINED
The 'undefined' value for a 8-bit unsigned integer.
Definition: univ.i:434
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:69
#define ut_a(EXPR)
Abort execution if EXPR does not evaluate to nonzero.
Definition: ut0dbg.h:57
#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