MDEV-17228 Encrypted temporary tables are not encrypted

- Introduce a new variable called innodb_encrypt_temporary_tables which is
a boolean variable. It decides whether to encrypt the temporary tablespace.
- Encrypts the temporary tablespace based on full checksum format.
- Introduced a new counter to track encrypted and decrypted temporary
tablespace pages.
- Warnings issued if temporary table creation has conflict value with
innodb_encrypt_temporary_tables
- Added a new test case which reads and writes the pages from/to temporary
tablespace.
This commit is contained in:
Thirunarayanan Balathandayuthapani 2019-06-27 16:23:03 +05:30
commit 723a4b1d78
19 changed files with 280 additions and 72 deletions

View file

@ -450,6 +450,9 @@ my_bool srv_print_innodb_lock_monitor;
PRIMARY KEY */
my_bool srv_force_primary_key;
/** Key version to encrypt the temporary tablespace */
my_bool innodb_encrypt_temporary_tables;
/* Array of English strings describing the current state of an
i/o handler thread */
@ -1646,6 +1649,12 @@ srv_export_innodb_status(void)
export_vars.innodb_n_rowlog_blocks_encrypted = srv_stats.n_rowlog_blocks_encrypted;
export_vars.innodb_n_rowlog_blocks_decrypted = srv_stats.n_rowlog_blocks_decrypted;
export_vars.innodb_n_temp_blocks_encrypted =
srv_stats.n_temp_blocks_encrypted;
export_vars.innodb_n_temp_blocks_decrypted =
srv_stats.n_temp_blocks_decrypted;
export_vars.innodb_defragment_compression_failures =
btr_defragment_compression_failures;
export_vars.innodb_defragment_failures = btr_defragment_failures;