WL#13775: InnoDB: Encrypt DBLWR files

Affects: Server-8.0   —   Status: Complete

Currently, all the pages in the double write files are unencrypted. Even pages belonging to encrypted tablespaces, remain unencrypted in the double write files. The goal of this worklog is to enhance the security of the double write files. The purpose of this worklog is to ensure that the pages in double write files belonging to encrypted tablespaces are also encrypted. Likewise, the pages in dblwr files that belong to unencrypted tablespace remain unencrypted. There is no separate encryption key for the double write files. The pages are encrypted making use of the respective tablespace encryption keys. The same encrypted page that will be written to the data file of a tablespace is also written to the double write file. The high level steps would be:

  • If transparent compression is enabled for a tablespace, do compression.
  • If encryption is enabled for a tablespace, do encryption using the tablespace key.
  • Flush the compressed+encrypted page to the dblwr file.
  • Flush the same compressed+encrypted page to the data file of tablespace.

The double write files now contain different types of pages depending on the tablespaces. Some of them are unencrypted, some are encrypted with their respective tablespaces keys, and the remaining are compressed+encrypted with their respective tablespace keys.