1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105
|
################################################################################
# Validates that a member can only join a group when both the group and the new
# member have the value on the default_table_encryption global server option.
#
# Test:
# 0. This test requires 2 members.
# 1. Bootstrap a group on server 1 with
# GLOBAL.default_table_encryption = ON
# 2. Try join a member with
# GLOBAL.default_table_encryption = OFF
# to the group, it shall fail.
# 3. Try join a member with
# GLOBAL.default_table_encryption = ON
# to the group, it shall succeed.
# 4. Try to change GLOBAL.default_table_encryption while
# Group Replication is running, it shall fail.
# 5. Try to change SESSION.default_table_encryption while
# Group Replication is running, it shall succeed.
# 6. Try to PERSIST default_table_encryption while
# Group Replication is running, it shall fail.
# 7. Cleanup.
################################################################################
--source include/have_group_replication_plugin.inc
--let $rpl_skip_group_replication_start= 1
--source include/group_replication.inc
--echo
--echo ############################################################
--echo # 1. Bootstrap a group on server 1 with
--echo # GLOBAL.default_table_encryption = ON
--let $rpl_connection_name= server1
--source include/rpl_connection.inc
SET @table_encryption_default= @@GLOBAL.default_table_encryption;
SET @@GLOBAL.default_table_encryption = ON;
--source include/start_and_bootstrap_group_replication.inc
--echo
--echo ############################################################
--echo # 2. Try join a member with
--echo # GLOBAL.default_table_encryption = OFF
--echo # to the group, it shall fail.
--let $rpl_connection_name= server2
--source include/rpl_connection.inc
SET SESSION sql_log_bin = 0;
call mtr.add_suppression("The member is configured with a default_table_encryption option value '0' different from the group '1'. The member will now exit the group.");
SET SESSION sql_log_bin = 1;
--disable_query_log
--eval SET GLOBAL group_replication_group_name= "$group_replication_group_name"
--enable_query_log
SET @table_encryption_default= @@GLOBAL.default_table_encryption;
SET @@GLOBAL.default_table_encryption = OFF;
--error ER_GROUP_REPLICATION_CONFIGURATION
START GROUP_REPLICATION;
--echo
--echo ############################################################
--echo # 3. Try join a member with
--echo # GLOBAL.default_table_encryption = ON
--echo # to the group, it shall succeed.
SET @@GLOBAL.default_table_encryption = ON;
--source include/start_group_replication.inc
--echo
--echo ############################################################
--echo # 4. Try to change GLOBAL.default_table_encryption while
--echo # Group Replication is running, it shall fail.
--error ER_GROUP_REPLICATION_RUNNING
SET @@GLOBAL.default_table_encryption = OFF;
--echo
--echo ############################################################
--echo # 5. Try to change SESSION.default_table_encryption while
--echo # Group Replication is running, it shall succeed.
SET @@SESSION.default_table_encryption = OFF;
--echo
--echo ############################################################
--echo # 6. Try to PERSIST default_table_encryption while
--echo # Group Replication is running, it shall fail.
--error ER_GROUP_REPLICATION_RUNNING
SET PERSIST default_table_encryption=ON;
--echo
--echo ############################################################
--echo # 7. Clean up.
--let $rpl_connection_name= server1
--source include/rpl_connection.inc
--source include/stop_group_replication.inc
SET @@GLOBAL.default_table_encryption= @table_encryption_default;
--let $rpl_connection_name= server2
--source include/rpl_connection.inc
--source include/stop_group_replication.inc
SET @@GLOBAL.default_table_encryption= @table_encryption_default;
SET @@SESSION.default_table_encryption= @table_encryption_default;
--source include/group_replication_end.inc
|