Skip to content
Permalink
Browse files
Clean up InnoDB shutdown
Tablespace::shutdown(): Clear m_path. This was moved from
Tablespace::~Tablespace().

LatchDebug::shutdown(): Remove a redundant condition.
  • Loading branch information
dr-m committed Jun 29, 2017
1 parent 591edcc commit e903d45
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 16 deletions.
@@ -65,7 +65,8 @@ Tablespace::shutdown()
}

m_files.clear();

ut_free(m_path);
m_path = NULL;
m_space_id = ULINT_UNDEFINED;
}

@@ -62,10 +62,6 @@ class Tablespace {
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
@@ -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) {
@@ -1267,11 +1267,6 @@ LatchDebug::shutdown()

mutex_free(&rw_lock_debug_mutex);

if (instance() == NULL) {

return;
}

ut_a(s_initialized);

s_initialized = false;

0 comments on commit e903d45

Please sign in to comment.