diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2017-03-09 17:28:06 +0200 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2017-03-09 17:28:06 +0200 |
commit | 7a30d86e9d45a8e8fe6557cbc12d919315a835b2 (patch) | |
tree | 4fdfa6cdd31a686bddc824713150d9f4d4db7ab5 /storage/innobase/include/trx0purge.h | |
parent | 15bdfeeba82134ed09ee3424db804fad1b613d8c (diff) | |
download | mariadb-git-7a30d86e9d45a8e8fe6557cbc12d919315a835b2.tar.gz |
Simplify InnoDB startup.
InnoDB needs to collect transactions from the persistent data files
in trx_rseg_array_init() before trx_lists_init_at_db_start() is
executed. But there is no need to create purge_sys->purge_queue
separately from purge_sys.
trx_sys_init_at_db_start(): Change the return type to void.
Remove the direct call to trx_rseg_array_init(). It will be called
by trx_lists_init_at_db_start(), which we are calling.
Initialize the purge system read view.
trx_lists_init_at_db_start(): Call trx_purge_sys_create(), which will
invoke trx_rseg_array_init() to read the undo log segments.
trx_purge_sys_create(): Remove the parameters. Do not initialize
the purge system read view, because trx_sys->rw_trx_list has not
been recovered yet. The purge_sys->view will be initialized at
the end of trx_sys_init_at_db_start().
trx_rseg_array_init(): Remove the parameter. Use purge_sys->purge_queue
directly.
innobase_start_or_create_for_mysql(): Remove the local variable
purge_queue. Do not call trx_purge_sys_create(), because it will be
called by trx_sys_init_at_db_start().
Diffstat (limited to 'storage/innobase/include/trx0purge.h')
-rw-r--r-- | storage/innobase/include/trx0purge.h | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/storage/innobase/include/trx0purge.h b/storage/innobase/include/trx0purge.h index 44eaa9d4f1e..d8c1a303d5c 100644 --- a/storage/innobase/include/trx0purge.h +++ b/storage/innobase/include/trx0purge.h @@ -54,19 +54,12 @@ trx_purge_get_log_from_hist( /*========================*/ fil_addr_t node_addr); /*!< in: file address of the history list node of the log */ -/********************************************************************//** -Creates the global purge system control structure and inits the history -mutex. */ +/** Create the global purge system data structure. */ void -trx_purge_sys_create( -/*=================*/ - ulint n_purge_threads,/*!< in: number of purge threads */ - purge_pq_t* purge_queue); /*!< in/own: UNDO log min binary heap*/ -/********************************************************************//** -Frees the global purge system control structure. */ +trx_purge_sys_create(); +/** Free the global purge system data structure. */ void -trx_purge_sys_close(void); -/*======================*/ +trx_purge_sys_close(); /************************************************************************ Adds the update undo log as the first log in the history list. Removes the update undo log segment from the rseg slot if it is too big for reuse. */ |