diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2017-06-29 23:10:46 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2017-06-29 23:10:46 +0300 |
commit | e903d458bb5267df4c37a6862587c403aa87dc35 (patch) | |
tree | 9f8ce1983b8521c6e4b41740be04246cc1d25c5f /storage | |
parent | 591edccc93617ab238399f445d69f662ee2dedb8 (diff) | |
download | mariadb-git-e903d458bb5267df4c37a6862587c403aa87dc35.tar.gz |
Clean up InnoDB shutdown
Tablespace::shutdown(): Clear m_path. This was moved from
Tablespace::~Tablespace().
LatchDebug::shutdown(): Remove a redundant condition.
Diffstat (limited to 'storage')
-rw-r--r-- | storage/innobase/fsp/fsp0space.cc | 3 | ||||
-rw-r--r-- | storage/innobase/include/fsp0space.h | 4 | ||||
-rw-r--r-- | storage/innobase/srv/srv0start.cc | 8 | ||||
-rw-r--r-- | storage/innobase/sync/sync0debug.cc | 5 |
4 files changed, 4 insertions, 16 deletions
diff --git a/storage/innobase/fsp/fsp0space.cc b/storage/innobase/fsp/fsp0space.cc index 7ca81898f70..ea9c45697dc 100644 --- a/storage/innobase/fsp/fsp0space.cc +++ b/storage/innobase/fsp/fsp0space.cc @@ -65,7 +65,8 @@ Tablespace::shutdown() } m_files.clear(); - + ut_free(m_path); + m_path = NULL; m_space_id = ULINT_UNDEFINED; } diff --git a/storage/innobase/include/fsp0space.h b/storage/innobase/include/fsp0space.h index 3928f8362b9..5b5293666b5 100644 --- a/storage/innobase/include/fsp0space.h +++ b/storage/innobase/include/fsp0space.h @@ -62,10 +62,6 @@ public: shutdown(); ut_ad(m_files.empty()); ut_ad(m_space_id == ULINT_UNDEFINED); - if (m_path != NULL) { - ut_free(m_path); - m_path = NULL; - } } // Disable copying diff --git a/storage/innobase/srv/srv0start.cc b/storage/innobase/srv/srv0start.cc index 1d72a700bba..ccc0e89e67f 100644 --- a/storage/innobase/srv/srv0start.cc +++ b/storage/innobase/srv/srv0start.cc @@ -2788,11 +2788,7 @@ innodb_shutdown() ut_ad(!srv_running); ut_ad(!srv_undo_sources); - /* 1. Flush the buffer pool to disk, write the current lsn to - the tablespace header(s), and copy all log data to archive. - The step 1 is the real InnoDB shutdown. The remaining steps 2 - ... - just free data structures after the shutdown. */ - + /* Shut down the persistent files. */ logs_empty_and_mark_files_at_shutdown(); if (ulint n_threads = srv_conc_get_active_threads()) { @@ -2801,7 +2797,7 @@ innodb_shutdown() " inside InnoDB at shutdown"; } - /* 2. Make all threads created by InnoDB to exit */ + /* Exit any remaining threads. */ srv_shutdown_all_bg_threads(); if (srv_monitor_file) { diff --git a/storage/innobase/sync/sync0debug.cc b/storage/innobase/sync/sync0debug.cc index e43e87eb14e..d6f3ef6c986 100644 --- a/storage/innobase/sync/sync0debug.cc +++ b/storage/innobase/sync/sync0debug.cc @@ -1267,11 +1267,6 @@ LatchDebug::shutdown() mutex_free(&rw_lock_debug_mutex); - if (instance() == NULL) { - - return; - } - ut_a(s_initialized); s_initialized = false; |