/*********************************************************************//**
Creates a table create graph.
@return own: table create node */
tab_node_t*
tab_create_graph_create( /*====================*/
dict_table_t* table, /*!< in: table to create, built as
a memory data structure */
mem_heap_t* heap); /*!< in: heap where created */
/***********************************************************//**
Creates a table. This is a high-level function used in SQL execution graphs.
@return query thread to run next or NULL */
que_thr_t*
dict_create_table_step( /*===================*/
que_thr_t* thr); /*!< in: query thread */
/***********************************************************//**
Creates an index. This is a high-level function used in SQL execution
graphs.
@return query thread to run next or NULL */
que_thr_t*
dict_create_index_step( /*===================*/
que_thr_t* thr); /*!< in: query thread */
/***************************************************************//**
Builds an index definition but doesn't update sys_table.
@return DB_SUCCESS or error code */ void
dict_build_index_def( /*=================*/ const dict_table_t* table, /*!< in: table */
dict_index_t* index, /*!< in/out: index */
trx_t* trx); /*!< in/out: InnoDB transaction
handle */
/** Drop the index tree associated with a row in SYS_INDEXES table. @param[in,out]pcurpersistentcursoronrec @param[in,out]trxdictionarytransaction @param[in,out]mtrmini-transaction @returntablespaceIDtodrop(ifthisistheclusteredindex)
@retval 0 if no tablespace is to be dropped */
uint32_t dict_drop_index_tree(btr_pcur_t *pcur, trx_t *trx, mtr_t *mtr)
MY_ATTRIBUTE((nonnull(1,3), warn_unused_result));
/***************************************************************//**
Creates an index tree for the index if it is not a member of a cluster.
Don't update SYSTEM TABLES.
@return error code */
dberr_t
dict_create_index_tree_in_mem( /*==========================*/
dict_index_t* index, /*!< in/out: index */
trx_t* trx); /*!< in: InnoDB transaction handle */
/** Adds the given set of foreign key objects to the dictionary tables inthedatabase.Thisfunctiondoesnotmodifythedictionarycache.The callermustensurethatallforeignkeyobjectscontainavalidconstraint nameinforeign->id. @param[in]local_fk_setsetofforeignkeyobjects,tobeaddedto thedictionarytables @param[in]tabletabletowhichtheforeignkeyobjectsin local_fk_setbelongto @param[in,out]trxtransaction
@return error code or DB_SUCCESS */
dberr_t
dict_create_add_foreigns_to_dictionary( /*===================================*/ const dict_foreign_set& local_fk_set, const dict_table_t* table,
trx_t* trx)
MY_ATTRIBUTE((nonnull, warn_unused_result));
/** Check if a foreign constraint is on columns server as base columns ofanystoredcolumn.ThisistopreventcreatingSETNULLorCASCADE constraintonsuchcolumns @param[in]local_fk_setsetofforeignkeyobjects,tobeaddedto thedictionarytables @param[in]tabletabletowhichtheforeignkeyobjectsin local_fk_setbelongto
@return true if yes, otherwise, false */ bool
dict_foreigns_has_s_base_col( const dict_foreign_set& local_fk_set, const dict_table_t* table);
/********************************************************************//**
Add a foreign key definition to the data dictionary tables.
@return error code or DB_SUCCESS */
dberr_t
dict_create_add_foreign_to_dictionary( /*==================================*/ constchar* name, /*!< in: table name */ const dict_foreign_t* foreign,/*!< in: foreign key */
trx_t* trx) /*!< in/out: dictionary transaction */
MY_ATTRIBUTE((nonnull, warn_unused_result));
/* Table create node structure */ struct tab_node_t{
que_common_t common; /*!< node type: QUE_NODE_TABLE_CREATE */
dict_table_t* table; /*!< table to create, built as a memorydatastructurewith
dict_mem_... functions */
ins_node_t* tab_def; /*!< child node which does the insert of thetabledefinition;therowtobe
inserted is built by the parent node */
ins_node_t* col_def; /*!< child node which does the inserts ofthecolumndefinitions;therowto beinsertedisbuiltbytheparent
node */
ins_node_t* v_col_def; /*!< child node which does the inserts ofthesys_virtualrowdefinitions; therowtobeinsertedisbuiltby
the parent node */ /*----------------------*/ /* Local storage for this graph node */
ulint state; /*!< node execution state */
ulint col_no; /*!< next column definition to insert */
ulint base_col_no; /*!< next base column to insert */
mem_heap_t* heap; /*!< memory heap used as auxiliary
storage */
};
struct ind_node_t{
que_common_t common; /*!< node type: QUE_NODE_INDEX_CREATE */
dict_index_t* index; /*!< index to create, built as a memorydatastructurewith
dict_mem_... functions */ constchar* table_name; /*!< table name */
ins_node_t* ind_def; /*!< child node which does the insert of theindexdefinition;therowtobe
inserted is built by the parent node */
ins_node_t* field_def; /*!< child node which does the inserts ofthefielddefinitions;therowto beinsertedisbuiltbytheparent
node */ /*----------------------*/ /* Local storage for this graph node */
ulint state; /*!< node execution state */
uint32_t page_no; /* root page number of the index */
dtuple_t* ind_row; /* index definition row built */
ulint field_no; /* next field definition to insert */
mem_heap_t* heap; /*!< memory heap used as auxiliary
storage */
uint key_id; /*!< encryption key_id */
fil_encryption_t mode; /*!< encryption mode */ const dict_add_v_col_t*
add_v; /*!< new virtual columns that being
added along with an add index call */
};
/** Compose a column number for a virtual column, stored in the "POS" field ofSys_columns.Thecolumnnumberincludesbothitsvirtualcolumnsequence (the"nth"virtualcolumn)anditsactualcolumnpositioninoriginaltable @param[in]v_posvirtualcolumnsequence @param[in]col_poscolumnpositioninoriginaltabledefinition
@return composed column position number */
UNIV_INLINE
ulint
dict_create_v_col_pos(
ulint v_pos,
ulint col_pos);
/** Get the column number for a virtual column (the column position in originaltable),storedinthe"POS"fieldofSys_columns @param[in]posvirtualcolumnposition
@return column position in original table */
UNIV_INLINE
ulint
dict_get_v_col_mysql_pos(
ulint pos);
/** Get a virtual column sequence (the "nth" virtual column) for a virtualcolumn,stordinthe"POS"fieldofSys_columns @param[in]posvirtualcolumnposition
@return virtual column sequence */
UNIV_INLINE
ulint
dict_get_v_col_pos(
ulint pos);
/* Index create node states */ #define INDEX_BUILD_INDEX_DEF 1 #define INDEX_BUILD_FIELD_DEF 2 #define INDEX_CREATE_INDEX_TREE 3 #define INDEX_ADD_TO_CACHE 4
#include"dict0crea.inl"
#endif
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.54 Sekunden
(vorverarbeitet am 2026-10-08)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.