Commit 6cccef21 authored by Marko Mäkelä's avatar Marko Mäkelä

MDEV-15720 ib_buffer_pool unnecessarily includes the temporary tablespace

The purpose of the InnoDB buffer pool dump is to allow InnoDB to be
restarted with the same persistent data pages in the buffer pool.

The InnoDB temporary tablespace that was introduced in MariaDB 10.2.2
is always reinitialized on restart. Therefore, it does not make sense
to attempt to dump or restore any pages of the temporary tablespace.
parent 4d9969c2
......@@ -360,18 +360,23 @@ buf_dump(
for (bpage = UT_LIST_GET_FIRST(buf_pool->LRU), j = 0;
bpage != NULL && j < n_pages;
bpage = UT_LIST_GET_NEXT(LRU, bpage), j++) {
bpage = UT_LIST_GET_NEXT(LRU, bpage)) {
ut_a(buf_page_in_file(bpage));
if (bpage->id.space() >= SRV_LOG_SPACE_FIRST_ID) {
/* Ignore the innodb_temporary tablespace. */
continue;
}
dump[j] = BUF_DUMP_CREATE(bpage->id.space(),
dump[j++] = BUF_DUMP_CREATE(bpage->id.space(),
bpage->id.page_no());
}
ut_a(j == n_pages);
buf_pool_mutex_exit(buf_pool);
ut_a(j <= n_pages);
n_pages = j;
for (j = 0; j < n_pages && !SHOULD_QUIT(); j++) {
ret = fprintf(f, ULINTPF "," ULINTPF "\n",
BUF_DUMP_SPACE(dump[j]),
......@@ -670,6 +675,11 @@ buf_load()
/* space_id for this iteration of the loop */
const ulint this_space_id = BUF_DUMP_SPACE(dump[i]);
if (this_space_id >= SRV_LOG_SPACE_FIRST_ID) {
/* Ignore the innodb_temporary tablespace. */
continue;
}
if (this_space_id != cur_space_id) {
if (space != NULL) {
fil_space_release(space);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment