| 1 |
################################################################################ |
| 2 |
# Validates that a member that does have the default_table_encryption global |
| 3 |
# server option behaves like if the option value is OFF. |
| 4 |
# |
| 5 |
# Test: |
| 6 |
# 0. This test requires 2 members. |
| 7 |
# 1. Bootstrap a group on server 1 faking that it is a |
| 8 |
# server that does not have the option default_table_encryption, |
| 9 |
# thence it will not send it to group on join the handshake. |
| 10 |
# 2. Try join a member with |
| 11 |
# GLOBAL.default_table_encryption = ON |
| 12 |
# to the group, it shall fail. |
| 13 |
# 3. Try join a member with |
| 14 |
# GLOBAL.default_table_encryption = OFF |
| 15 |
# to the group, it shall succeed. |
| 16 |
# 4. Cleanup. |
| 17 |
################################################################################ |
| 18 |
--source include/have_debug.inc |
| 19 |
--source include/have_group_replication_plugin.inc |
| 20 |
--let $rpl_skip_group_replication_start= 1 |
| 21 |
--source include/group_replication.inc |
| 22 |
|
| 23 |
|
| 24 |
--echo |
| 25 |
--echo ############################################################ |
| 26 |
--echo # 1. Bootstrap a group on server 1 faking that it is a |
| 27 |
--echo # server that does not have the option default_table_encryption, |
| 28 |
--echo # thence it will not send it to group on join the handshake. |
| 29 |
--let $rpl_connection_name= server1 |
| 30 |
--source include/rpl_connection.inc |
| 31 |
SET @@GLOBAL.DEBUG='+d,group_replication_skip_encode_default_table_encryption'; |
| 32 |
--source include/start_and_bootstrap_group_replication.inc |
| 33 |
|
| 34 |
|
| 35 |
--echo |
| 36 |
--echo ############################################################ |
| 37 |
--echo # 2. Try join a member with |
| 38 |
--echo # GLOBAL.default_table_encryption = ON |
| 39 |
--echo # to the group, it shall fail. |
| 40 |
--let $rpl_connection_name= server2 |
| 41 |
--source include/rpl_connection.inc |
| 42 |
|
| 43 |
SET SESSION sql_log_bin = 0; |
| 44 |
call mtr.add_suppression("The member is configured with a default_table_encryption option value '1' different from the group '0'. The member will now exit the group."); |
| 45 |
SET SESSION sql_log_bin = 1; |
| 46 |
|
| 47 |
--disable_query_log |
| 48 |
--eval SET GLOBAL group_replication_group_name= "$group_replication_group_name" |
| 49 |
--enable_query_log |
| 50 |
|
| 51 |
SET @table_encryption_default= @@GLOBAL.default_table_encryption; |
| 52 |
SET @@GLOBAL.default_table_encryption = ON; |
| 53 |
--error ER_GROUP_REPLICATION_CONFIGURATION |
| 54 |
START GROUP_REPLICATION; |
| 55 |
|
| 56 |
|
| 57 |
--echo |
| 58 |
--echo ############################################################ |
| 59 |
--echo # 3. Try join a member with |
| 60 |
--echo # GLOBAL.default_table_encryption = OFF |
| 61 |
--echo # to the group, it shall succeed. |
| 62 |
SET @@GLOBAL.default_table_encryption = OFF; |
| 63 |
--source include/start_group_replication.inc |
| 64 |
|
| 65 |
|
| 66 |
--echo |
| 67 |
--echo ############################################################ |
| 68 |
--echo # 4. Clean up. |
| 69 |
--let $rpl_connection_name= server1 |
| 70 |
--source include/rpl_connection.inc |
| 71 |
--source include/stop_group_replication.inc |
| 72 |
SET @@GLOBAL.DEBUG='-d,group_replication_skip_encode_default_table_encryption'; |
| 73 |
|
| 74 |
--let $rpl_connection_name= server2 |
| 75 |
--source include/rpl_connection.inc |
| 76 |
--source include/stop_group_replication.inc |
| 77 |
SET @@GLOBAL.default_table_encryption= @table_encryption_default; |
| 78 |
|
| 79 |
--source include/group_replication_end.inc |