318
318
dict_table_replace_index_in_foreign_list(
319
319
/*=====================================*/
320
320
dict_table_t* table, /*!< in/out: table */
321
dict_index_t* index); /*!< in: index to be replaced */
321
dict_index_t* index, /*!< in: index to be replaced */
322
const trx_t* trx); /*!< in: transaction handle */
322
323
/*********************************************************************//**
323
324
Checks if a index is defined for a foreign key constraint. Index is a part
324
325
of a foreign key constraint if the index is referenced by foreign key
680
681
dict_table_zip_size(
681
682
/*================*/
682
683
const dict_table_t* table); /*!< in: table */
684
/*********************************************************************//**
685
Obtain exclusive locks on all index trees of the table. This is to prevent
686
accessing index trees while InnoDB is updating internal metadata for
687
operations such as truncate tables. */
690
dict_table_x_lock_indexes(
691
/*======================*/
692
dict_table_t* table); /*!< in: table */
693
/*********************************************************************//**
694
Release the exclusive locks on all index tree. */
697
dict_table_x_unlock_indexes(
698
/*========================*/
699
dict_table_t* table); /*!< in: table */
683
700
/********************************************************************//**
684
701
Checks if a column is in the ordering columns of the clustered index of a
685
702
table. Column prefixes are treated like whole columns.
1037
1054
are used in query optimization. */
1040
dict_update_statistics_low(
1041
/*=======================*/
1042
dict_table_t* table, /*!< in/out: table */
1043
ibool has_dict_mutex);/*!< in: TRUE if the caller has the
1045
/*********************************************************************//**
1046
Calculates new estimates for table and index statistics. The statistics
1047
are used in query optimization. */
1050
1057
dict_update_statistics(
1051
1058
/*===================*/
1052
dict_table_t* table); /*!< in/out: table */
1059
dict_table_t* table, /*!< in/out: table */
1060
ibool only_calc_if_missing_stats);/*!< in: only
1061
update/recalc the stats if they have
1062
not been initialized yet, otherwise
1053
1064
/********************************************************************//**
1054
1065
Reserves the dictionary system mutex for MySQL. */
1063
1074
dict_mutex_exit_for_mysql(void);
1064
1075
/*===========================*/
1065
1076
/**********************************************************************//**
1066
Lock the appropriate mutex to protect index->stat_n_diff_key_vals[].
1067
index->id is used to pick the right mutex and it should not change
1068
before dict_index_stat_mutex_exit() is called on this index. */
1077
Lock the appropriate latch to protect a given table's statistics.
1078
table->id is used to pick the corresponding latch from a global array of
1071
dict_index_stat_mutex_enter(
1072
/*========================*/
1073
const dict_index_t* index); /*!< in: index */
1082
dict_table_stats_lock(
1083
/*==================*/
1084
const dict_table_t* table, /*!< in: table */
1085
ulint latch_mode); /*!< in: RW_S_LATCH or
1074
1087
/**********************************************************************//**
1075
Unlock the appropriate mutex that protects index->stat_n_diff_key_vals[]. */
1088
Unlock the latch that has been locked by dict_table_stats_lock() */
1078
dict_index_stat_mutex_exit(
1079
/*=======================*/
1080
const dict_index_t* index); /*!< in: index */
1091
dict_table_stats_unlock(
1092
/*====================*/
1093
const dict_table_t* table, /*!< in: table */
1094
ulint latch_mode); /*!< in: RW_S_LATCH or
1081
1096
/********************************************************************//**
1082
1097
Checks if the database name in two table names is the same.
1083
1098
@return TRUE if same db name */