Functions |
UNIV_INTERN tab_node_t * | tab_create_graph_create (dict_table_t *table, mem_heap_t *heap, bool commit) |
UNIV_INTERN ind_node_t * | ind_create_graph_create (dict_index_t *index, mem_heap_t *heap, bool commit) |
UNIV_INTERN que_thr_t * | dict_create_table_step (que_thr_t *thr) |
UNIV_INTERN que_thr_t * | dict_create_index_step (que_thr_t *thr) |
UNIV_INTERN ulint | dict_truncate_index_tree (dict_table_t *table, ulint space, btr_pcur_t *pcur, mtr_t *mtr) |
UNIV_INTERN void | dict_drop_index_tree (rec_t *rec, mtr_t *mtr) |
UNIV_INTERN dberr_t | dict_create_or_check_foreign_constraint_tables (void) |
UNIV_INLINE dberr_t | dict_create_add_foreign_id (ulint *id_nr, const char *name, dict_foreign_t *foreign) __attribute__((nonnull)) |
UNIV_INTERN dberr_t | dict_create_add_foreigns_to_dictionary (ulint start_id, dict_table_t *table, trx_t *trx) __attribute__((nonnull |
UNIV_INTERN dberr_t | dict_create_or_check_sys_tablespace (void) |
UNIV_INTERN dberr_t | dict_create_add_tablespace_to_dictionary (ulint space, const char *name, ulint flags, const char *path, trx_t *trx, bool commit) |
UNIV_INTERN dberr_t | dict_create_add_foreign_to_dictionary (const char *name, const dict_foreign_t *foreign, trx_t *trx) __attribute__((nonnull |
Database object creation
Created 1/8/1996 Heikki Tuuri
Definition in file dict0crea.h.
Adds foreign key definitions to data dictionary tables in the database. We look at table->foreign_list, and also generate names to constraints that were not named by the user. A generated constraint has a name of the format databasename/tablename_ibfk_NUMBER, where the numbers start from 1, and are given locally for this table, that is, the number is not global, as in the old format constraints < 4.0.18 it used to be.
- Returns
- error code or DB_SUCCESS
- Parameters
-
start_id | in: if we are actually doing ALTER TABLE ADD CONSTRAINT, we want to generate constraint numbers which are bigger than in the table so far; we number the constraints from start_id + 1 up; start_id should be set to 0 if we are creating a new table, or if the table so far has no constraints for which the name was generated here |
table | in: table |
trx | in: transaction |