MySQL 8.0.39
Source Code Documentation
|
Data dictionary access. More...
#include "sql_table.h"
#include "dict0crea.h"
#include "dict0priv.h"
#include "field.h"
#include "sql/table.h"
#include "sql_base.h"
Functions | |
dd::Object_id | dd_get_space_id (const dd::Partition &partition) |
Get the explicit dd::Tablespace::id of a partition. More... | |
const dd::Column * | dd_find_column (const dd::Table *dd_table, const char *name) |
Look up a column in a table using the system_charset_info collation. More... | |
dd::Column * | dd_add_hidden_column (dd::Table *dd_table, const char *name, uint length, dd::enum_column_types type) |
Add a hidden column when creating a table. More... | |
bool | dd_drop_hidden_column (dd::Table *dd_table, const char *name) |
void | dd_add_hidden_element (dd::Index *index, const dd::Column *column) |
Add a hidden index element at the end. More... | |
dd::Index * | dd_set_hidden_unique_index (dd::Index *index, const char *name, const dd::Column *column) |
Initialize a hidden unique B-tree index. More... | |
dict_table_t * | dd_table_open_on_id_in_mem (table_id_t table_id, bool dict_locked) |
Returns a cached table object based on table id. More... | |
dict_table_t * | dd_table_open_on_name_in_mem (const char *name, bool dict_locked) |
Returns a cached table object based on table name. More... | |
bool | create_table_check_doc_id_col (THD *thd, const TABLE *form, ulint *doc_id_col) |
Check whether there exist a column named as "FTS_DOC_ID", which is reserved for InnoDB FTS Doc ID. More... | |
const char * | get_row_format_name (enum row_type row_format) |
Return a display name for the row format. More... | |
static bool | dd_mdl_acquire (THD *thd, MDL_ticket **mdl, const char *db, const char *table) |
Acquire a shared metadata lock. More... | |
uint64_t | dd_get_version (const dd::Table *dd_table) |
Get the version attribute. More... | |
Data dictionary access.
Created 10/2016 Jimmy Yamg
Check whether there exist a column named as "FTS_DOC_ID", which is reserved for InnoDB FTS Doc ID.
[in] | thd | MySQL thread handle |
[in] | form | information on table columns and indexes |
[out] | doc_id_col | Doc ID column number if there exist a FTS_DOC_ID column, ULINT_UNDEFINED if column is of the wrong type/name/size |
|
inline |
Add a hidden column when creating a table.
[in,out] | dd_table | table containing user columns and indexes |
[in] | name | hidden column name |
[in] | length | length of the column, in bytes |
[in] | type | column type |
|
inline |
Add a hidden index element at the end.
[in,out] | index | created index metadata |
[in] | column | column of the index |
|
inline |
|
inline |
Look up a column in a table using the system_charset_info collation.
[in] | dd_table | data dictionary table |
[in] | name | column name |
nullptr | if not found |
|
inline |
Get the explicit dd::Tablespace::id of a partition.
[in] | partition | partition or subpartition |
dd::INVALID_OBJECT_ID | if there is no explicit tablespace |
|
inline |
Get the version attribute.
[in] | dd_table | dd::Table |
|
inlinestatic |
Acquire a shared metadata lock.
[in,out] | thd | current thread |
[out] | mdl | metadata lock |
[in] | db | schema name |
[in] | table | table name |
false | if acquired |
true | if failed (my_error() will have been called) |
|
inline |
Initialize a hidden unique B-tree index.
[in,out] | index | created index metadata |
[in] | name | name of the index |
[in] | column | column of the index |
|
inline |
Returns a cached table object based on table id.
[in] | table_id | table id |
[in] | dict_locked | true=data dictionary locked |
|
inline |
Returns a cached table object based on table name.
[in] | name | table name |
[in] | dict_locked | true=data dictionary locked |
|
inline |
Return a display name for the row format.
[in] | row_format | Row Format |