Skip to content

Commit

Permalink
Clean up InnoDB shutdown
Browse files Browse the repository at this point in the history
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.
3 changes: 2 additions & 1 deletion storage/innobase/fsp/fsp0space.cc
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,8 @@ Tablespace::shutdown()
}

m_files.clear();

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

Expand Down
4 changes: 0 additions & 4 deletions storage/innobase/include/fsp0space.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 2 additions & 6 deletions storage/innobase/srv/srv0start.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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()) {
Expand All @@ -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) {
Expand Down
5 changes: 0 additions & 5 deletions storage/innobase/sync/sync0debug.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1267,11 +1267,6 @@ LatchDebug::shutdown()

mutex_free(&rw_lock_debug_mutex);

if (instance() == NULL) {

return;
}

ut_a(s_initialized);

s_initialized = false;
Expand Down

0 comments on commit e903d45

Please sign in to comment.