Skip to content

Commit

Permalink
Merge pull request percona#3128 from robgolebiowski/PS-5547_redo_log_…
Browse files Browse the repository at this point in the history
…encryption_is_not_working

PS-5547: redo log encryption is not working.
  • Loading branch information
robgolebiowski authored Apr 12, 2019
2 parents ac692ab + a2666a5 commit a339a99
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions storage/innobase/fil/fil0fil.cc
Original file line number Diff line number Diff line change
Expand Up @@ -5926,9 +5926,12 @@ fil_io_set_encryption(
return;
}

/* Don't encrypt the log, page 0 of all tablespaces, all pages
/* Don't encrypt the page 0 of all tablespaces,
don't encrypt TRX_SYS_SPACE.TRX_SYS_PAGE_NO as it contains address to dblwr buffer */
if (!req_type.is_log() && page_id.page_no() > 0 && (TRX_SYS_SPACE != page_id.space() || TRX_SYS_PAGE_NO != page_id.page_no())
if ((req_type.is_log()
|| (page_id.page_no() > 0
&& (TRX_SYS_SPACE != page_id.space()
|| TRX_SYS_PAGE_NO != page_id.page_no())))
&& space->encryption_type != Encryption::NONE) {
if (space->encryption_type == Encryption::KEYRING) {
ut_ad(space->crypt_data != NULL);
Expand Down

0 comments on commit a339a99

Please sign in to comment.