mariadb/storage
Thirunarayanan Balathandayuthapani ada1074bb1 MDEV-14398 innodb_encryption_rotate_key_age=0 causes innodb_encrypt_tables to be ignored
The statement

SET GLOBAL innodb_encryption_rotate_key_age=0;

would have the unwanted side effect that ENCRYPTION=DEFAULT tablespaces
would no longer be encrypted or decrypted according to the setting of
innodb_encrypt_tables.

We implement a trigger, so that whenever one of the following is executed:

SET GLOBAL innodb_encrypt_tables=OFF;
SET GLOBAL innodb_encrypt_tables=ON;
SET GLOBAL innodb_encrypt_tables=FORCE;

all wrong-state ENCRYPTION=DEFAULT tablespaces will be added to
fil_system_t::rotation_list, so that the encryption will be added
or removed.

Note: This will *NOT* happen automatically after a server restart.
Before reading the first page of a data file, InnoDB cannot know
the encryption status of the data file. The statement
SET GLOBAL innodb_encrypt_tables will have the side effect that
all not-yet-read InnoDB data files will be accessed in order to
determine the encryption status.

innodb_encrypt_tables_validate(): Stop disallowing
SET GLOBAL innodb_encrypt_tables when innodb_encryption_rotate_key_age=0.
This reverts part of commit 50eb40a2a8
that addressed MDEV-11738 and MDEV-11581.

fil_system_t::read_page0(): Trigger a call to fil_node_t::read_page0().
Refactored from fil_space_get_space().

fil_crypt_rotation_list_fill(): If innodb_encryption_rotate_key_age=0,
initialize fil_system->rotation_list. This is invoked both on
SET GLOBAL innodb_encrypt_tables and
on SET GLOBAL innodb_encryption_rotate_key_age=0.

fil_space_set_crypt_data(): Remove.

fil_parse_write_crypt_data(): Simplify the logic.

This is joint work with Marko Mäkelä.
2019-05-02 13:31:59 +03:00
..
archive Merge 10.1 into 10.2 2019-04-25 09:04:09 +03:00
blackhole
cassandra
connect Merge branch '10.1' into 10.2 2019-03-29 10:58:20 +01:00
csv Merge branch '10.0' into 10.1 2018-06-12 18:55:27 +03:00
example
federated Merge 10.1 into 10.2 2019-04-03 19:58:47 +03:00
federatedx Merge 10.1 into 10.2 2019-04-03 19:58:47 +03:00
heap Merge 10.1 into 10.2 2018-11-06 08:41:48 +02:00
innobase MDEV-14398 innodb_encryption_rotate_key_age=0 causes innodb_encrypt_tables to be ignored 2019-05-02 13:31:59 +03:00
maria Merge 10.1 into 10.2 2019-04-25 09:04:09 +03:00
mroonga Merge branch '10.1' into 10.2 2019-03-29 10:58:20 +01:00
myisam Merge 10.1 into 10.2 2019-04-25 09:04:09 +03:00
myisammrg Merge 10.1 into 10.2 2019-03-27 12:26:11 +02:00
oqgraph Merge 10.1 into 10.2 2018-04-24 09:39:45 +03:00
perfschema Merge 10.1 into 10.2 2019-04-25 09:04:09 +03:00
rocksdb cmake: don't use generated files to detect a submodule 2019-04-07 13:49:04 +02:00
sequence Merge branch '10.1' into 10.2 2019-03-15 21:00:41 +01:00
sphinx MDEV-16544 - crash in ha_sphinx::create() 2018-08-04 22:53:16 +01:00
spider Merge branch '10.1' into 10.2 2019-03-29 10:58:20 +01:00
test_sql_discovery MDEV-13712 Spelling errors in the error message 2017-09-18 10:12:23 +02:00
tokudb Merge 10.1 into 10.2 2019-04-03 10:32:21 +03:00
xtradb Merge 10.1 into 10.2 2019-04-25 09:04:09 +03:00