diff options
Diffstat (limited to 'storage/innobase/buf/buf0dblwr.cc')
-rw-r--r-- | storage/innobase/buf/buf0dblwr.cc | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/storage/innobase/buf/buf0dblwr.cc b/storage/innobase/buf/buf0dblwr.cc index 475e31ce305..02edc8e80ce 100644 --- a/storage/innobase/buf/buf0dblwr.cc +++ b/storage/innobase/buf/buf0dblwr.cc @@ -551,12 +551,11 @@ buf_dblwr_process() byte* page = *i; ulint space_id = page_get_space_id(page); - /* Ignore the dblwr pages for the following: - 1) find_page could have set lsn to zero for oldest page. - 2) dblwr page shouldn't be lesser than checkpoint lsn or - greater than last scanned lsn. */ + /* Ignore the dblwr pages if dblwr page shouldn't + be lesser than checkpoint lsn or greater than + last scanned lsn. */ ulint lsn= mach_read_from_8(page + FIL_PAGE_LSN); - if (!lsn || recv_sys->parse_start_lsn > lsn) { + if (recv_sys->parse_start_lsn > lsn) { continue; } @@ -633,7 +632,7 @@ next_process: ignore this page (there should be redo log records to initialize it). */ } else if (recv_dblwr.validate_page( - space, page_no, read_buf, false, buf)) { + page_id, read_buf, space, buf)) { goto next_process; } else { /* We intentionally skip this message for @@ -650,18 +649,18 @@ next_process: goto next_process; } - fil_space_release_for_io(space); /* Write the good page from the doublewrite buffer to the intended position. */ IORequest write_request(IORequest::WRITE); fil_io(write_request, true, page_id, page_size, - 0, page_size.physical(), - const_cast<byte*>(page), NULL); + 0, page_size.physical(), page, NULL); ib::info() << "Recovered page " << page_id << " from the doublewrite buffer."; + + goto next_process; } recv_dblwr.pages.clear(); |