diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2018-04-29 09:41:42 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2018-04-29 09:41:42 +0300 |
commit | 715e4f4320f5b9d830d6ce22792db0fa0ce4a690 (patch) | |
tree | bfeb74be2d92ff260ee1e7769ed3a6d04a725b34 /storage/innobase/dict/dict0dict.cc | |
parent | 9ed2b2b2b8ae3bd60f10995d72a6b7c8d7d037e3 (diff) | |
download | mariadb-git-715e4f4320f5b9d830d6ce22792db0fa0ce4a690.tar.gz |
MDEV-12218 Clean up InnoDB parameter validation
Bind more InnoDB parameters directly to MYSQL_SYSVAR and
remove "shadow variables".
innodb_change_buffering: Declare as ENUM, not STRING.
innodb_flush_method: Declare as ENUM, not STRING.
innodb_log_buffer_size: Bind directly to srv_log_buffer_size,
without rounding it to a multiple of innodb_page_size.
LOG_BUFFER_SIZE: Remove.
SysTablespace::normalize_size(): Renamed from normalize().
innodb_init_params(): A new function to initialize and validate
InnoDB startup parameters.
innodb_init(): Renamed from innobase_init(). Invoke innodb_init_params()
before actually trying to start up InnoDB.
srv_start(bool): Renamed from innobase_start_or_create_for_mysql().
Added the input parameter create_new_db.
SRV_ALL_O_DIRECT_FSYNC: Define only for _WIN32.
xb_normalize_init_values(): Merge to innodb_init_param().
Diffstat (limited to 'storage/innobase/dict/dict0dict.cc')
-rw-r--r-- | storage/innobase/dict/dict0dict.cc | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/storage/innobase/dict/dict0dict.cc b/storage/innobase/dict/dict0dict.cc index 2d5c0651271..dbad7a8fa31 100644 --- a/storage/innobase/dict/dict0dict.cc +++ b/storage/innobase/dict/dict0dict.cc @@ -6702,11 +6702,18 @@ void dict_close(void) /*============*/ { - ulint i; + if (dict_sys == NULL) { + /* This should only happen if a failure occurred + during redo log processing. */ + return; + } + + /* Acquire only because it's a pre-condition. */ + mutex_enter(&dict_sys->mutex); /* Free the hash elements. We don't remove them from the table because we are going to destroy the table anyway. */ - for (i = 0; i < hash_get_n_cells(dict_sys->table_hash); i++) { + for (ulint i = 0; i < hash_get_n_cells(dict_sys->table_id_hash); i++) { dict_table_t* table; table = static_cast<dict_table_t*>( @@ -6718,12 +6725,7 @@ dict_close(void) table = static_cast<dict_table_t*>( HASH_GET_NEXT(name_hash, prev_table)); ut_ad(prev_table->magic_n == DICT_TABLE_MAGIC_N); - /* Acquire only because it's a pre-condition. */ - mutex_enter(&dict_sys->mutex); - dict_table_remove_from_cache(prev_table); - - mutex_exit(&dict_sys->mutex); } } @@ -6733,6 +6735,7 @@ dict_close(void) therefore we don't delete the individual elements. */ hash_table_free(dict_sys->table_id_hash); + mutex_exit(&dict_sys->mutex); mutex_free(&dict_sys->mutex); rw_lock_free(dict_operation_lock); @@ -6742,6 +6745,11 @@ dict_close(void) mutex_free(&dict_foreign_err_mutex); + if (dict_foreign_err_file) { + fclose(dict_foreign_err_file); + dict_foreign_err_file = NULL; + } + ut_free(dict_sys); dict_sys = NULL; |