Bug #96158 default_table_encryption can be changed on running member via SET PERSIST
Submitted: 10 Jul 2019 12:32 Modified: 18 Jul 2019 14:33
Reporter: Narendra Singh Chauhan Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Group Replication Severity:S2 (Serious)
Version:8.0.18 OS:Any
Assigned to: CPU Architecture:Any

[10 Jul 2019 12:32] Narendra Singh Chauhan
Description:
Scenario: Try changing default_table_encryption which are not allowed to be changed during GR is running.

Observation: 
* With "SET GLOBAL" we are hitting error as expected for variable "default_table_encryption".
* With "SET PERSIST" we are not hitting error as expected for variable "default_table_encryption".

Concerns:
* This way we allows blocked changes while GR is running.
* The group might have different settings on members, which is not allowed.

How to repeat:
Steps to repro:-
================
On an ONLINE GR member:-
1. SET GLOBAL default_table_encryption=ON;
ERROR 3093 (HY000): The default_table_encryption option cannot be changed when Group replication is running.
2. SET PERSIST default_table_encryption=ON;  << ISSUE HERE.
Query OK, 0 rows affected (0.00 sec)

mysql> set global gtid_mode=2;                                                                                                                 ERROR 3111 (HY000): SET @@GLOBAL.GTID_MODE = ON_PERMISSIVE is not allowed because group replication requires @@GLOBAL.GTID_MODE=ON.
mysql> set persist gtid_mode=2;
ERROR 3111 (HY000): SET @@GLOBAL.GTID_MODE = ON_PERMISSIVE is not allowed because group replication requires @@GLOBAL.GTID_MODE=ON.

mysql> set global default_table_encryption=ON;
ERROR 3093 (HY000): The default_table_encryption option cannot be changed when Group replication is running.
mysql> set persist default_table_encryption=ON;
Query OK, 0 rows affected (0.00 sec)
[18 Jul 2019 14:33] Margaret Fisher
Posted by developer:
 
Changelog entry added for MySQL 8.0.18:

The value of the default_table_encryption system variable must be the same on all members of a replication group and cannot be changed while Group Replication is running. Changing the value of the system variable was disallowed by Group Replication if a SET GLOBAL statement was used, but was incorrectly allowed if a SET PERSIST statement was used.