summaryrefslogtreecommitdiffstats
path: root/storage/innobase/buf/buf0dump.cc
diff options
context:
space:
mode:
Diffstat (limited to 'storage/innobase/buf/buf0dump.cc')
-rw-r--r--storage/innobase/buf/buf0dump.cc22
1 files changed, 19 insertions, 3 deletions
diff --git a/storage/innobase/buf/buf0dump.cc b/storage/innobase/buf/buf0dump.cc
index 957632db..cc51f8c6 100644
--- a/storage/innobase/buf/buf0dump.cc
+++ b/storage/innobase/buf/buf0dump.cc
@@ -33,7 +33,7 @@ Created April 08, 2011 Vasil Dimov
#include "buf0rea.h"
#include "buf0dump.h"
-#include "dict0dict.h"
+#include "dict0load.h"
#include "os0file.h"
#include "srv0srv.h"
#include "srv0start.h"
@@ -180,7 +180,7 @@ static void buf_dump_generate_path(char *path, size_t path_size)
char buf[FN_REFLEN];
mysql_mutex_lock(&LOCK_global_system_variables);
- snprintf(buf, sizeof buf, "%s/%s", get_buf_dump_dir(),
+ snprintf(buf, sizeof buf, "%s" FN_ROOTDIR "%s", get_buf_dump_dir(),
srv_buf_dump_filename);
mysql_mutex_unlock(&LOCK_global_system_variables);
@@ -214,7 +214,7 @@ static void buf_dump_generate_path(char *path, size_t path_size)
format = "%s%s";
break;
default:
- format = "%s/%s";
+ format = "%s" FN_ROOTDIR "%s";
}
snprintf(path, path_size, format,
@@ -562,6 +562,22 @@ buf_load()
if (!SHUTTING_DOWN()) {
std::sort(dump, dump + dump_n);
+ std::set<uint32_t> missing;
+ for (const page_id_t id : st_::span<const page_id_t>
+ (dump, dump_n)) {
+ missing.emplace(id.space());
+ }
+ for (std::set<uint32_t>::iterator i = missing.begin();
+ i != missing.end(); ) {
+ auto j = i++;
+ if (fil_space_t* space = fil_space_t::get(*j)) {
+ space->release();
+ missing.erase(j);
+ }
+ }
+ if (!missing.empty()) {
+ dict_check_tablespaces_and_store_max_id(&missing);
+ }
}
/* Avoid calling the expensive fil_space_t::get() for each