mirror of
https://github.com/MariaDB/server.git
synced 2025-01-29 02:05:57 +01:00
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 8c43f96388
.
btr_validate_index(): Avoid crash if btr_root_get() returns NULL.
This commit is contained in:
parent
1d0380e029
commit
80f29211eb
1 changed files with 2 additions and 7 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue