Description:
When the keyring plugin is not available, innodb_redo_log_encrypt and innodb_undo_log_encrypt silently fail to apply and do not emit a client warning.
Instead, we have entries in the log:
2019-05-06T14:03:10.808494Z 0 [ERROR] [MY-012661] [InnoDB] Encryption can't find master key, please check the keyring plugin is loaded.
2019-05-06T14:03:10.808512Z 0 [ERROR] [MY-013068] [InnoDB] Can't set redo log tablespace to be encrypted.
2019-05-06T14:03:10.808525Z 0 [ERROR] [MY-012661] [InnoDB] Encryption can't find master key, please check the keyring plugin is loaded.
2019-05-06T14:03:10.808531Z 0 [ERROR] [MY-012877] [InnoDB] Can't set undo tablespace 'innodb_undo_001' to be encrypted.
How to repeat:
mysql> set global innodb_undo_log_encrypt = ON, innodb_redo_log_encrypt = ON;
Query OK, 0 rows affected (0.00 sec)
mysql> show warnings;
Empty set (0.00 sec)
mysql> show global variables like '%encrypt%';
+------------------------------------------------+-------------+
| Variable_name | Value |
+------------------------------------------------+-------------+
| binlog_encryption | OFF |
| binlog_rotate_encryption_master_key_at_startup | OFF |
| block_encryption_mode | aes-128-ecb |
| innodb_redo_log_encrypt | OFF |
| innodb_undo_log_encrypt | OFF |
+------------------------------------------------+-------------+
5 rows in set (0.00 sec)
Suggested fix:
Emit client warnings when failing to set a variable