Commit 80f29211 authored by Marko Mäkelä's avatar Marko Mäkelä

Fix a crash in CHECK TABLE for corrupted encrypted root page

btr_root_get(): Ignore the root->page.encrypted flag.
The purpose of this flag is questionable since
commit 8c43f963.

btr_validate_index(): Avoid crash if btr_root_get() returns NULL.
parent 1d0380e0
......@@ -272,11 +272,6 @@ btr_root_get(
And block the segment list access by others.*/
buf_block_t* root = btr_root_block_get(index, RW_SX_LATCH,
mtr);
if (root && root->page.encrypted == true) {
root = NULL;
}
return(root ? buf_block_get_frame(root) : NULL);
}
......@@ -5398,8 +5393,8 @@ btr_validate_index(
page_t* root = btr_root_get(index, &mtr);
if (root == NULL && !index->is_readable()) {
err = DB_DECRYPTION_FAILED;
if (!root) {
err = DB_CORRUPTION;
mtr_commit(&mtr);
return 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