Browse Source

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.
pull/669/merge
Marko Mäkelä 8 years ago
parent
commit
6cccef21a6
  1. 20
      storage/innobase/buf/buf0dump.cc

20
storage/innobase/buf/buf0dump.cc

@ -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(),
bpage->id.page_no());
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);

Loading…
Cancel
Save