~ubuntu-branches/ubuntu/maverick/mysql-5.1/maverick-proposed

« back to all changes in this revision

Viewing changes to storage/innodb_plugin/include/dict0dict.h

  • Committer: Package Import Robot
  • Author(s): Marc Deslauriers
  • Date: 2012-02-22 14:16:05 UTC
  • mto: This revision was merged to the branch mainline in revision 20.
  • Revision ID: package-import@ubuntu.com-20120222141605-nxlu9yzc6attylc2
Tags: upstream-5.1.61
ImportĀ upstreamĀ versionĀ 5.1.61

Show diffs side-by-side

added added

removed removed

Lines of Context:
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. */
 
688
UNIV_INLINE
 
689
void
 
690
dict_table_x_lock_indexes(
 
691
/*======================*/
 
692
        dict_table_t*   table); /*!< in: table */
 
693
/*********************************************************************//**
 
694
Release the exclusive locks on all index tree. */
 
695
UNIV_INLINE
 
696
void
 
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. */
1038
1055
UNIV_INTERN
1039
1056
void
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
1044
 
                                        dictionary mutex */
1045
 
/*********************************************************************//**
1046
 
Calculates new estimates for table and index statistics. The statistics
1047
 
are used in query optimization. */
1048
 
UNIV_INTERN
1049
 
void
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
 
1063
                                        do nothing */
1053
1064
/********************************************************************//**
1054
1065
Reserves the dictionary system mutex for MySQL. */
1055
1066
UNIV_INTERN
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
 
1079
latches. */
1069
1080
UNIV_INTERN
1070
1081
void
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
 
1086
                                                RW_X_LATCH */
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() */
1076
1089
UNIV_INTERN
1077
1090
void
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
 
1095
                                                RW_X_LATCH */
1081
1096
/********************************************************************//**
1082
1097
Checks if the database name in two table names is the same.
1083
1098
@return TRUE if same db name */