diff options
author | Vasil Dimov <vasil.dimov@oracle.com> | 2010-11-11 13:11:52 +0200 |
---|---|---|
committer | Vasil Dimov <vasil.dimov@oracle.com> | 2010-11-11 13:11:52 +0200 |
commit | f9c2f7cd016f45f8aef64af46c7e2ae270979548 (patch) | |
tree | b2c57c7893812cf71abc2809c167be555095135c /storage | |
parent | db054043ac616eb17451374ada21e190048e0dc5 (diff) | |
download | mariadb-git-f9c2f7cd016f45f8aef64af46c7e2ae270979548.tar.gz |
Remove unused parameter has_dict_mutex of dict_update_statistics_low()
Also delete dict_update_statistics() and rename dict_update_statistics_low()
to dict_update_statistics() because the only thing that distinguished those
two functions was the removed parameter.
Diffstat (limited to 'storage')
-rw-r--r-- | storage/innodb_plugin/dict/dict0dict.c | 29 | ||||
-rw-r--r-- | storage/innodb_plugin/dict/dict0load.c | 6 | ||||
-rw-r--r-- | storage/innodb_plugin/include/dict0dict.h | 16 |
3 files changed, 7 insertions, 44 deletions
diff --git a/storage/innodb_plugin/dict/dict0dict.c b/storage/innodb_plugin/dict/dict0dict.c index 774e7f213e8..eb3169bd176 100644 --- a/storage/innodb_plugin/dict/dict0dict.c +++ b/storage/innodb_plugin/dict/dict0dict.c @@ -4213,16 +4213,13 @@ Calculates new estimates for table and index statistics. The statistics are used in query optimization. */ UNIV_INTERN void -dict_update_statistics_low( -/*=======================*/ +dict_update_statistics( +/*===================*/ dict_table_t* table, /*!< in/out: table */ - ibool only_calc_if_missing_stats,/*!< in: only + ibool only_calc_if_missing_stats)/*!< in: only update/recalc the stats if they have not been initialized yet, otherwise do nothing */ - ibool has_dict_mutex __attribute__((unused))) - /*!< in: TRUE if the caller has the - dictionary mutex */ { dict_index_t* index; ulint sum_of_index_sizes = 0; @@ -4316,22 +4313,6 @@ dict_update_statistics_low( dict_table_stats_unlock(table, RW_X_LATCH); } -/*********************************************************************//** -Calculates new estimates for table and index statistics. The statistics -are used in query optimization. */ -UNIV_INTERN -void -dict_update_statistics( -/*===================*/ - dict_table_t* table, /*!< in/out: table */ - ibool only_calc_if_missing_stats)/*!< in: only - update/recalc the stats if they have - not been initialized yet, otherwise - do nothing */ -{ - dict_update_statistics_low(table, only_calc_if_missing_stats, FALSE); -} - /**********************************************************************//** Prints info of a foreign key constraint. */ static @@ -4409,9 +4390,7 @@ dict_table_print_low( ut_ad(mutex_own(&(dict_sys->mutex))); - dict_update_statistics_low(table, - FALSE /* update even if initialized */, - TRUE /* we have the dict mutex */); + dict_update_statistics(table, FALSE /* update even if initialized */); dict_table_stats_lock(table, RW_S_LATCH); diff --git a/storage/innodb_plugin/dict/dict0load.c b/storage/innodb_plugin/dict/dict0load.c index 3baa12b4235..c3825902536 100644 --- a/storage/innodb_plugin/dict/dict0load.c +++ b/storage/innodb_plugin/dict/dict0load.c @@ -222,10 +222,8 @@ loop: is no index */ if (dict_table_get_first_index(table)) { - dict_update_statistics_low( - table, - FALSE /* update even if initialized */, - TRUE /* we have the dict mutex */); + dict_update_statistics(table, FALSE /* update + even if initialized */); } dict_table_print_low(table); diff --git a/storage/innodb_plugin/include/dict0dict.h b/storage/innodb_plugin/include/dict0dict.h index 7b02111fb87..fdb3bd5d50c 100644 --- a/storage/innodb_plugin/include/dict0dict.h +++ b/storage/innodb_plugin/include/dict0dict.h @@ -1054,23 +1054,9 @@ Calculates new estimates for table and index statistics. The statistics are used in query optimization. */ UNIV_INTERN void -dict_update_statistics_low( -/*=======================*/ - dict_table_t* table, /*!< in/out: table */ - ibool only_calc_if_missing_stats,/*!< in: only - update/recalc the stats if they have - not been initialized yet, otherwise - do nothing */ - ibool has_dict_mutex);/*!< in: TRUE if the caller has the - dictionary mutex */ -/*********************************************************************//** -Calculates new estimates for table and index statistics. The statistics -are used in query optimization. */ -UNIV_INTERN -void dict_update_statistics( /*===================*/ - dict_table_t* table, /*!< in/out: table */ + dict_table_t* table, /*!< in/out: table */ ibool only_calc_if_missing_stats);/*!< in: only update/recalc the stats if they have not been initialized yet, otherwise |