Commit 109b8582 authored by Jan Lindström's avatar Jan Lindström

MDEV-13432: Assertion failure in buf0rea.cc line 577

Page read could return DB_PAGE_CORRUPTED error that should
be reported and passed to upper layer. In case of unknown
error code we should print both number and string.
parent 48fe8326
......@@ -378,13 +378,14 @@ buf_read_ahead_random(
space, i);
break;
case DB_DECRYPTION_FAILED:
case DB_PAGE_CORRUPTED:
ib_logf(IB_LOG_LEVEL_ERROR,
"Random readahead failed to decrypt page "
ULINTPF "." ULINTPF " .",
"Random readahead failed to decrypt page or page corrupted "
ULINTPF ":" ULINTPF " .",
space, i);
break;
default:
ut_error;
ib_logf(IB_LOG_LEVEL_FATAL, "Error %u (%s) in random readahead", err, ut_strerr(err));
}
}
}
......@@ -514,15 +515,15 @@ buf_read_page_async(
" in nonexisting or being-dropped tablespace",
space, offset);
break;
case DB_DECRYPTION_FAILED:
case DB_PAGE_CORRUPTED:
ib_logf(IB_LOG_LEVEL_ERROR,
"Async page read failed to decrypt page "
"Async page read failed to decrypt page or page corrupted "
ULINTPF ":" ULINTPF ".",
space, offset);
break;
default:
ut_error;
ib_logf(IB_LOG_LEVEL_FATAL, "Error %u (%s) in async page read", err, ut_strerr(err));
}
srv_stats.buf_pool_reads.add(count);
......@@ -798,13 +799,14 @@ buf_read_ahead_linear(
space, i);
break;
case DB_DECRYPTION_FAILED:
case DB_PAGE_CORRUPTED:
ib_logf(IB_LOG_LEVEL_ERROR,
"Linear readahead failed to decrypt page "
"Linear readahead failed to decrypt page or page corrupted"
ULINTPF ":" ULINTPF ".",
space, i);
break;
default:
ut_error;
ib_logf(IB_LOG_LEVEL_FATAL, "Error %u (%s) in linear readahead", err, ut_strerr(err));
}
}
}
......@@ -901,13 +903,14 @@ buf_read_ibuf_merge_pages(
zip_size, FALSE);
break;
case DB_DECRYPTION_FAILED:
case DB_PAGE_CORRUPTED:
ib_logf(IB_LOG_LEVEL_ERROR,
"Failed to decrypt insert buffer page "
"Failed to decrypt insert buffer page or page corrupted "
ULINTPF ":" ULINTPF ".",
space_ids[i], page_nos[i]);
break;
default:
ut_error;
ib_logf(IB_LOG_LEVEL_FATAL, "Error %u (%s) in insert buffer read", err, ut_strerr(err));
}
}
......
......@@ -428,13 +428,14 @@ buf_read_ahead_random(
space, i);
break;
case DB_DECRYPTION_FAILED:
case DB_PAGE_CORRUPTED:
ib_logf(IB_LOG_LEVEL_ERROR,
"Random readahead failed to decrypt page "
"Random readahead failed to decrypt page or page corrupted "
ULINTPF ":" ULINTPF ".",
i, space);
break;
default:
ut_error;
ib_logf(IB_LOG_LEVEL_FATAL, "Error %u (%s) in random readahead", err, ut_strerr(err));
}
}
}
......@@ -570,13 +571,14 @@ buf_read_page_async(
break;
case DB_DECRYPTION_FAILED:
case DB_PAGE_CORRUPTED:
ib_logf(IB_LOG_LEVEL_ERROR,
"Async page read failed to decrypt page "
"Async page read failed to decrypt page or page corrupted "
ULINTPF ":" ULINTPF ".",
space, offset);
break;
default:
ut_error;
ib_logf(IB_LOG_LEVEL_FATAL, "Error %u (%s) in async page read", err, ut_strerr(err));
}
srv_stats.buf_pool_reads.add(count);
......@@ -863,13 +865,14 @@ buf_read_ahead_linear(
break;
case DB_DECRYPTION_FAILED:
case DB_PAGE_CORRUPTED:
ib_logf(IB_LOG_LEVEL_ERROR,
"Linear readahead failed to decrypt page "
"Linear readahead failed to decrypt page or page corrupted"
ULINTPF ":" ULINTPF ".",
i, space);
break;
default:
ut_error;
ib_logf(IB_LOG_LEVEL_FATAL, "Error %u (%s) in linear readahead", err, ut_strerr(err));
}
}
}
......@@ -963,13 +966,14 @@ buf_read_ibuf_merge_pages(
ibuf_delete_for_discarded_space(space_ids[i]);
break;
case DB_DECRYPTION_FAILED:
case DB_PAGE_CORRUPTED:
ib_logf(IB_LOG_LEVEL_ERROR,
"Failed to decrypt insert buffer page "
"Failed to decrypt insert buffer page or page corrupted "
ULINTPF ":" ULINTPF ".",
space_ids[i], page_nos[i]);
break;
default:
ut_error;
ib_logf(IB_LOG_LEVEL_FATAL, "Error %u (%s) in insert buffer read", err, ut_strerr(err));
}
}
......
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