337
337
dict_table_replace_index_in_foreign_list(
338
338
/*=====================================*/
339
339
dict_table_t* table, /*!< in/out: table */
340
dict_index_t* index); /*!< in: index to be replaced */
340
dict_index_t* index, /*!< in: index to be replaced */
341
const trx_t* trx); /*!< in: transaction handle */
341
342
/*********************************************************************//**
342
343
Checks if a index is defined for a foreign key constraint. Index is a part
343
344
of a foreign key constraint if the index is referenced by foreign key
1064
1065
are used in query optimization. */
1067
dict_update_statistics_low(
1068
/*=======================*/
1069
dict_table_t* table, /*!< in/out: table */
1070
ibool has_dict_mutex);/*!< in: TRUE if the caller has the
1072
/*********************************************************************//**
1073
Calculates new estimates for table and index statistics. The statistics
1074
are used in query optimization. */
1077
1068
dict_update_statistics(
1078
1069
/*===================*/
1079
dict_table_t* table); /*!< in/out: table */
1070
dict_table_t* table, /*!< in/out: table */
1071
ibool only_calc_if_missing_stats);/*!< in: only
1072
update/recalc the stats if they have
1073
not been initialized yet, otherwise
1080
1075
/********************************************************************//**
1081
1076
Reserves the dictionary system mutex for MySQL. */
1090
1085
dict_mutex_exit_for_mysql(void);
1091
1086
/*===========================*/
1092
1087
/**********************************************************************//**
1093
Lock the appropriate mutex to protect index->stat_n_diff_key_vals[].
1094
index->id is used to pick the right mutex and it should not change
1095
before dict_index_stat_mutex_exit() is called on this index. */
1088
Lock the appropriate latch to protect a given table's statistics.
1089
table->id is used to pick the corresponding latch from a global array of
1098
dict_index_stat_mutex_enter(
1099
/*========================*/
1100
const dict_index_t* index); /*!< in: index */
1093
dict_table_stats_lock(
1094
/*==================*/
1095
const dict_table_t* table, /*!< in: table */
1096
ulint latch_mode); /*!< in: RW_S_LATCH or
1101
1098
/**********************************************************************//**
1102
Unlock the appropriate mutex that protects index->stat_n_diff_key_vals[]. */
1099
Unlock the latch that has been locked by dict_table_stats_lock() */
1105
dict_index_stat_mutex_exit(
1106
/*=======================*/
1107
const dict_index_t* index); /*!< in: index */
1102
dict_table_stats_unlock(
1103
/*====================*/
1104
const dict_table_t* table, /*!< in: table */
1105
ulint latch_mode); /*!< in: RW_S_LATCH or
1108
1107
/********************************************************************//**
1109
1108
Checks if the database name in two table names is the same.
1110
1109
@return TRUE if same db name */