diff options
Diffstat (limited to 'storage/innobase/include/dict0stats_bg.h')
-rw-r--r-- | storage/innobase/include/dict0stats_bg.h | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/storage/innobase/include/dict0stats_bg.h b/storage/innobase/include/dict0stats_bg.h index 34dc4657829..e04d9ab5ab9 100644 --- a/storage/innobase/include/dict0stats_bg.h +++ b/storage/innobase/include/dict0stats_bg.h @@ -28,20 +28,23 @@ Created Apr 26, 2012 Vasil Dimov #include "univ.i" -#include "dict0types.h" /* dict_table_t, table_id_t */ -#include "os0sync.h" /* os_event_t */ -#include "os0thread.h" /* DECLARE_THREAD */ +#include "dict0types.h" +#include "os0event.h" +#include "os0thread.h" /** Event to wake up the stats thread */ extern os_event_t dict_stats_event; +#ifdef HAVE_PSI_INTERFACE +extern mysql_pfs_key_t dict_stats_recalc_pool_mutex_key; +#endif /* HAVE_PSI_INTERFACE */ + /*****************************************************************//** Add a table to the recalc pool, which is processed by the background stats gathering thread. Only the table id is added to the list, so the table can be closed after being enqueued and it will be opened when needed. If the table does not exist later (has been DROPped), then it will be removed from the pool and skipped. */ -UNIV_INTERN void dict_stats_recalc_pool_add( /*=======================*/ @@ -50,7 +53,6 @@ dict_stats_recalc_pool_add( /*****************************************************************//** Delete a given table from the auto recalc pool. dict_stats_recalc_pool_del() */ -UNIV_INTERN void dict_stats_recalc_pool_del( /*=======================*/ @@ -80,7 +82,7 @@ dict_stats_defrag_pool_del( /** Yield the data dictionary latch when waiting for the background thread to stop accessing a table. -@param trx transaction holding the data dictionary locks */ +@param trx transaction holding the data dictionary locks */ #define DICT_STATS_BG_YIELD(trx) do { \ row_mysql_unlock_data_dictionary(trx); \ os_thread_sleep(250000); \ @@ -107,7 +109,6 @@ The background stats thread is guaranteed not to start using the specified table after this function returns and before the caller unlocks the data dictionary because it sets the BG_STAT_IN_PROGRESS bit in table->stats_bg_flag under dict_sys->mutex. */ -UNIV_INTERN void dict_stats_wait_bg_to_stop_using_table( /*===================================*/ @@ -117,7 +118,6 @@ dict_stats_wait_bg_to_stop_using_table( /*****************************************************************//** Initialize global variables needed for the operation of dict_stats_thread(). Must be called before dict_stats_thread() is started. */ -UNIV_INTERN void dict_stats_thread_init(); /*====================*/ @@ -125,7 +125,6 @@ dict_stats_thread_init(); /*****************************************************************//** Free resources allocated by dict_stats_thread_init(), must be called after dict_stats_thread() has exited. */ -UNIV_INTERN void dict_stats_thread_deinit(); /*======================*/ @@ -135,7 +134,7 @@ This is the thread for background stats gathering. It pops tables, from the auto recalc list and proceeds them, eventually recalculating their statistics. @return this function does not return, it calls os_thread_exit() */ -extern "C" UNIV_INTERN +extern "C" os_thread_ret_t DECLARE_THREAD(dict_stats_thread)( /*==============================*/ |