summaryrefslogtreecommitdiff
path: root/storage
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2020-12-23 14:25:45 +0200
committerMarko Mäkelä <marko.makela@mariadb.com>2020-12-23 14:25:45 +0200
commitfa1aef39ebc7d84d24d4e3d2124f982526632ee9 (patch)
tree08c7c3badde31bf2d9613204846f07e02ce36f0a /storage
parent097786c485c6d10064e8bc593b6aa54e477712f9 (diff)
parent1eb59c307de163b507efade1fc372d8ff2bb94b7 (diff)
downloadmariadb-git-fa1aef39ebc7d84d24d4e3d2124f982526632ee9.tar.gz
Merge 10.2 into 10.3
Diffstat (limited to 'storage')
-rw-r--r--storage/innobase/handler/ha_innodb.cc19
-rw-r--r--storage/innobase/handler/ha_innodb.h3
-rw-r--r--storage/innobase/srv/srv0start.cc11
3 files changed, 16 insertions, 17 deletions
diff --git a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc
index e66a340a7f0..c6ca287b8f4 100644
--- a/storage/innobase/handler/ha_innodb.cc
+++ b/storage/innobase/handler/ha_innodb.cc
@@ -3484,10 +3484,12 @@ ha_innobase::init_table_handle_for_HANDLER(void)
reset_template();
}
-/** Free tablespace resources allocated. */
-void innobase_space_shutdown()
+/*********************************************************************//**
+Free any resources that were allocated and return failure.
+@return always return 1 */
+static int innodb_init_abort()
{
- DBUG_ENTER("innobase_space_shutdown");
+ DBUG_ENTER("innodb_init_abort");
if (fil_system.temp_space) {
fil_system.temp_space->close();
@@ -3502,16 +3504,6 @@ void innobase_space_shutdown()
#ifdef WITH_INNODB_DISALLOW_WRITES
os_event_destroy(srv_allow_writes_event);
#endif /* WITH_INNODB_DISALLOW_WRITES */
-
- DBUG_VOID_RETURN;
-}
-
-/** Free any resources that were allocated and return failure.
-@return always return 1 */
-static int innodb_init_abort()
-{
- DBUG_ENTER("innodb_init_abort");
- innobase_space_shutdown();
DBUG_RETURN(1);
}
@@ -4322,7 +4314,6 @@ innobase_end(handlerton*, ha_panic_function)
}
innodb_shutdown();
- innobase_space_shutdown();
mysql_mutex_destroy(&commit_cond_m);
mysql_cond_destroy(&commit_cond);
diff --git a/storage/innobase/handler/ha_innodb.h b/storage/innobase/handler/ha_innodb.h
index 6facc9d2e6f..58f825cebda 100644
--- a/storage/innobase/handler/ha_innodb.h
+++ b/storage/innobase/handler/ha_innodb.h
@@ -972,6 +972,3 @@ which is in the prepared state
@return 0 or error number */
int innobase_rollback_by_xid(handlerton* hton, XID* xid);
-
-/** Free tablespace resources allocated. */
-void innobase_space_shutdown();
diff --git a/storage/innobase/srv/srv0start.cc b/storage/innobase/srv/srv0start.cc
index 318ab49cc9c..f7ea8c985f6 100644
--- a/storage/innobase/srv/srv0start.cc
+++ b/storage/innobase/srv/srv0start.cc
@@ -2654,6 +2654,17 @@ void innodb_shutdown()
sync_check_close();
+ srv_sys_space.shutdown();
+ if (srv_tmp_space.get_sanity_check_status()) {
+ fil_system.temp_space->close();
+ srv_tmp_space.delete_files();
+ }
+ srv_tmp_space.shutdown();
+
+#ifdef WITH_INNODB_DISALLOW_WRITES
+ os_event_destroy(srv_allow_writes_event);
+#endif /* WITH_INNODB_DISALLOW_WRITES */
+
if (srv_was_started && srv_print_verbose_log) {
ib::info() << "Shutdown completed; log sequence number "
<< srv_shutdown_lsn