MDEV-27014 InnoDB fails to restore page 0 from the doublewrite buffer

- Addressing the format issue in deferred_dblwr() and changed the
function comment.
parent 18c335a3
...@@ -438,10 +438,7 @@ Datafile::validate_for_recovery() ...@@ -438,10 +438,7 @@ Datafile::validate_for_recovery()
} }
if (restore_from_doublewrite()) { if (restore_from_doublewrite()) {
if (m_defer) { return m_defer ? err : DB_CORRUPTION;
return err;
}
return(DB_CORRUPTION);
} }
/* Free the previously read first page and then re-validate. */ /* Free the previously read first page and then re-validate. */
......
...@@ -797,7 +797,10 @@ static struct ...@@ -797,7 +797,10 @@ static struct
return space; return space;
} }
/* Recover the page0 of deferred tablespace from doublewrite buffer.*/ /** Attempt to recover pages from the doublewrite buffer.
This is invoked if we found neither a valid first page in the
data file nor redo log records that would initialize the first
page. */
void deferred_dblwr() void deferred_dblwr()
{ {
for (auto d= defers.begin(); d != defers.end(); ) for (auto d= defers.begin(); d != defers.end(); )
......
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