Commit cf9070a8 authored by Marko Mäkelä's avatar Marko Mäkelä

Merge 10.1 into 10.2

parents 0b73b96f 50c9469b
......@@ -314,10 +314,16 @@ static bool page_is_corrupted(byte *page, ulint page_no, xb_fil_cur_t *cursor,
return false;
}
/* Validate encrypted pages. */
if (mach_read_from_4(page + FIL_PAGE_FILE_FLUSH_LSN_OR_KEY_VERSION)
&& (space->crypt_data
&& space->crypt_data->type != CRYPT_SCHEME_UNENCRYPTED)) {
/* Validate encrypted pages. The first page is never encrypted.
In the system tablespace, the first page would be written with
FIL_PAGE_FILE_FLUSH_LSN at shutdown, and if the LSN exceeds
4,294,967,295, the mach_read_from_4() below would wrongly
interpret the page as encrypted. We prevent that by checking
page_no first. */
if (page_no
&& mach_read_from_4(page + FIL_PAGE_FILE_FLUSH_LSN_OR_KEY_VERSION)
&& space->crypt_data
&& space->crypt_data->type != CRYPT_SCHEME_UNENCRYPTED) {
if (!fil_space_verify_crypt_checksum(page, cursor->page_size))
return true;
......
--innodb-encrypt-log=ON
--innodb-tablespaces-encryption
--innodb-encrypt-tables=ON
--innodb-encryption-rotate-key-age=1
--innodb-encryption-threads=4
--plugin-load-add=$FILE_KEY_MANAGEMENT_SO
--loose-file-key-management
--loose-file-key-management-filekey=FILE:$MTR_SUITE_DIR/filekeys-data.key
......
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