|  | MySQL 9.5.0
    Source Code Documentation | 
Database object creation. More...
#include "dict0crea.h"#include "btr0btr.h"#include "btr0pcur.h"#include "dict0boot.h"#include "dict0dd.h"#include "dict0dict.h"#include "dict0priv.h"#include "dict0stats.h"#include "fsp0space.h"#include "fsp0sysspace.h"#include "fts0priv.h"#include "ha_prototypes.h"#include "log0write.h"#include "mach0data.h"#include "my_dbug.h"#include "dict0upgrade.h"#include "page0page.h"#include "pars0pars.h"#include "que0que.h"#include "row0ins.h"#include "row0mysql.h"#include "srv0start.h"#include "trx0roll.h"#include "usr0sess.h"#include "ut0vec.h"| Functions | |
| dberr_t | dict_build_table_def (dict_table_t *table, const HA_CREATE_INFO *create_info, trx_t *trx) | 
| Build a table definition without updating SYSTEM TABLES.  More... | |
| dberr_t | dict_build_tablespace (trx_t *trx, Tablespace *tablespace) | 
| Builds a tablespace to store various objects.  More... | |
| dberr_t | dict_build_tablespace_for_table (dict_table_t *table, const HA_CREATE_INFO *create_info, trx_t *trx) | 
| Builds a tablespace to contain a table, using file-per-table=1.  More... | |
| void | dict_build_index_def (const dict_table_t *table, dict_index_t *index, trx_t *trx) | 
| Builds an index definition.  More... | |
| dberr_t | dict_create_index_tree_in_mem (dict_index_t *index, trx_t *trx) | 
| Creates an index tree for the index if it is not a member of a cluster.  More... | |
| void | dict_drop_temporary_table_index (const dict_index_t *index, page_no_t root_page_no) | 
| Drop an index tree belonging to a temporary table.  More... | |
| static bool | dict_index_has_col_by_name (const char *col_name, const dict_index_t *index) | 
| Check whether a column is in an index by the column name.  More... | |
| bool | dict_foreign_has_col_in_v_index (const char *fk_col_name, const dict_table_t *table) | 
| Check whether the foreign constraint could be on a column that is part of a virtual index (index contains virtual column) in the table.  More... | |
| bool | dict_foreign_has_col_as_base_col (const char *col_name, const dict_table_t *table) | 
| Check whether the foreign constraint could be on a column that is a base column of some indexed virtual columns.  More... | |
| static bool | dict_foreign_base_for_stored (const char *col_name, const dict_table_t *table) | 
| Check if a foreign constraint is on the given column name.  More... | |
| bool | dict_foreigns_has_s_base_col (const dict_foreign_set &local_fk_set, const dict_table_t *table) | 
| Check if a foreign constraint is on columns served as base columns of any stored column.  More... | |
| bool | dict_foreigns_has_this_col (const dict_table_t *table, const char *col_name) | 
| Check if a column is in foreign constraint with CASCADE properties or SET NULL.  More... | |
| void | dict_table_assign_new_id (dict_table_t *table) | 
| Assign a new table ID and put it into the table cache and the transaction.  More... | |
| dict_index_t * | dict_sdi_create_idx_in_mem (space_id_t space, bool space_discarded, uint32_t in_flags, bool is_create) | 
| Create in-memory tablespace dictionary index & table.  More... | |
Database object creation.
Created 1/8/1996 Heikki Tuuri
| void dict_build_index_def | ( | const dict_table_t * | table, | 
| dict_index_t * | index, | ||
| trx_t * | trx | ||
| ) | 
Builds an index definition.
Builds an index definition but doesn't update sys_table.
| table | in: table | 
| index | in/out: index | 
| trx | in/out: InnoDB transaction handle | 
| dberr_t dict_build_table_def | ( | dict_table_t * | table, | 
| const HA_CREATE_INFO * | create_info, | ||
| trx_t * | trx | ||
| ) | 
Build a table definition without updating SYSTEM TABLES.
| [in,out] | table | dict table object | 
| [in] | create_info | HA_CREATE_INFO object | 
| [in,out] | trx | transaction instance | 
In-memory counter used for assigning table_id of data dictionary table. This counter is only used during bootstrap or upgrade
| dberr_t dict_build_tablespace | ( | trx_t * | trx, | 
| Tablespace * | tablespace | ||
| ) | 
Builds a tablespace to store various objects.
| [in,out] | trx | DD transaction | 
| [in,out] | tablespace | Tablespace object describing what to build. | 
| dberr_t dict_build_tablespace_for_table | ( | dict_table_t * | table, | 
| const HA_CREATE_INFO * | create_info, | ||
| trx_t * | trx | ||
| ) | 
Builds a tablespace to contain a table, using file-per-table=1.
| [in,out] | table | Table to build in its own tablespace. | 
| [in] | create_info | HA_CREATE_INFO object | 
| [in,out] | trx | Transaction | 
| dberr_t dict_create_index_tree_in_mem | ( | dict_index_t * | index, | 
| trx_t * | trx | ||
| ) | 
Creates an index tree for the index if it is not a member of a cluster.
| [in,out] | index | InnoDB index object | 
| [in,out] | trx | transaction | 
| void dict_drop_temporary_table_index | ( | const dict_index_t * | index, | 
| page_no_t | root_page_no | ||
| ) | 
Drop an index tree belonging to a temporary table.
| [in] | index | index in a temporary table | 
| [in] | root_page_no | index root page number | 
| 
 | static | 
Check if a foreign constraint is on the given column name.
| [in] | col_name | column name to be searched for fk constraint | 
| [in] | table | table to which foreign key constraint belongs | 
If the stored column can refer to virtual column or stored column then it can points to NULL.
| bool dict_foreign_has_col_as_base_col | ( | const char * | col_name, | 
| const dict_table_t * | table | ||
| ) | 
Check whether the foreign constraint could be on a column that is a base column of some indexed virtual columns.
| [in] | col_name | column name for the column to be checked | 
| [in] | table | the table | 
| bool dict_foreign_has_col_in_v_index | ( | const char * | fk_col_name, | 
| const dict_table_t * | table | ||
| ) | 
Check whether the foreign constraint could be on a column that is part of a virtual index (index contains virtual column) in the table.
| [in] | fk_col_name | FK column name to be checked | 
| [in] | table | the table | 
| bool dict_foreigns_has_s_base_col | ( | const dict_foreign_set & | local_fk_set, | 
| const dict_table_t * | table | ||
| ) | 
Check if a foreign constraint is on columns served as base columns of any stored column.
This is to prevent creating SET NULL or CASCADE constraint on such columns
| [in] | local_fk_set | set of foreign key objects, to be added to the dictionary tables | 
| [in] | table | table to which the foreign key objects in local_fk_set belong to | 
| bool dict_foreigns_has_this_col | ( | const dict_table_t * | table, | 
| const char * | col_name | ||
| ) | 
Check if a column is in foreign constraint with CASCADE properties or SET NULL.
| [in] | table | table | 
| [in] | col_name | name for the column to be checked | 
| 
 | static | 
Check whether a column is in an index by the column name.
| [in] | col_name | column name for the column to be checked | 
| [in] | index | the index to be searched | 
| dict_index_t * dict_sdi_create_idx_in_mem | ( | space_id_t | space, | 
| bool | space_discarded, | ||
| uint32_t | in_flags, | ||
| bool | is_create | ||
| ) | 
Create in-memory tablespace dictionary index & table.
| [in] | space | tablespace id | 
| [in] | space_discarded | true if space is discarded | 
| [in] | in_flags | space flags to use when space_discarded is true | 
| [in] | is_create | true when creating SDI index | 
| void dict_table_assign_new_id | ( | dict_table_t * | table | ) | 
Assign a new table ID and put it into the table cache and the transaction.
| [in,out] | table | Table that needs an ID |