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

- Replaced the pointer parameter of validate_for_recovery() with uint32_t
parent cab8f4b5
......@@ -2576,7 +2576,8 @@ fil_ibd_load(
/* Read and validate the first page of the tablespace.
Assign a tablespace name based on the tablespace type. */
switch (file.validate_for_recovery(&space_id)) {
switch (file.validate_for_recovery(
static_cast<uint32_t>(space_id))) {
os_offset_t minimum_size;
case DB_SUCCESS:
deferred_space = file.m_defer;
......
......@@ -391,7 +391,7 @@ reopen it in write mode and ry to restore that page.
@retval DB_SUCCESS if tablespace is valid, DB_ERROR if not.
m_is_valid is also set true on success, else false. */
dberr_t
Datafile::validate_for_recovery(ulint *space_id)
Datafile::validate_for_recovery(uint32_t space_id)
{
dberr_t err;
......@@ -438,7 +438,7 @@ Datafile::validate_for_recovery(ulint *space_id)
if (empty_tablespace && space_id) {
/* Set space id to find out whether
the page exist in double write buffer */
m_space_id = *space_id;
m_space_id = space_id;
}
if (restore_from_doublewrite()) {
......
......@@ -210,7 +210,7 @@ class Datafile {
@param space_id space id to validate for recovery
@retval DB_SUCCESS if tablespace is valid, DB_ERROR if not.
m_is_valid is also set true on success, else false. */
dberr_t validate_for_recovery(ulint *space_id=nullptr)
dberr_t validate_for_recovery(uint32_t space_id=0)
MY_ATTRIBUTE((warn_unused_result));
/** Checks the consistency of the first page of a datafile when the
......
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