| 1 |
################################################################################ |
| 2 |
# When using the MySQL communication stack, if we start three mysqls in the same |
| 3 |
# physical server and we misconfigure one of them with MySQL stack data, |
| 4 |
# START GROUP_REPLICATION must fail with an appropriate ERROR. |
| 5 |
# This can only happen with the XCom communication stack in place. |
| 6 |
# |
| 7 |
# Test: |
| 8 |
# 0. The test requires three servers: |
| 9 |
# - M1 and M2 will start with XCom |
| 10 |
# - M3 will be configured as XCom, but not started |
| 11 |
# 1. Skip the group start |
| 12 |
# 2. Start and bootstrap the group with server 1 |
| 13 |
# 3. Start server 2 |
| 14 |
# 4. Change server 3 communication stack and local address to MySQL |
| 15 |
# 5. Manually start server 3 and expect it to fail while joining the group |
| 16 |
# 6. Restore server 3 original address |
| 17 |
# 7. Server 3 must successfully join the group |
| 18 |
# 8. Clean up. |
| 19 |
# |
| 20 |
################################################################################ |
| 21 |
|
| 22 |
--source include/have_group_replication_xcom_communication_stack.inc |
| 23 |
--source include/big_test.inc |
| 24 |
--source include/have_group_replication_plugin.inc |
| 25 |
|
| 26 |
--echo # 1. Skip the group start |
| 27 |
--let $rpl_skip_group_replication_start= 1 |
| 28 |
--let $rpl_server_count= 3 |
| 29 |
--source include/group_replication.inc |
| 30 |
|
| 31 |
--echo # 2. Start and bootstrap the group with server 1 |
| 32 |
--let $rpl_connection_name= server1 |
| 33 |
--source include/rpl_connection.inc |
| 34 |
--source include/start_and_bootstrap_group_replication.inc |
| 35 |
|
| 36 |
--echo # 3. Start server 2 |
| 37 |
--let $rpl_connection_name= server2 |
| 38 |
--source include/rpl_connection.inc |
| 39 |
--source include/start_group_replication.inc |
| 40 |
|
| 41 |
--echo # 4. Change server 3 communication stack and local address to MySQL |
| 42 |
--let $rpl_connection_name= server3 |
| 43 |
--source include/rpl_connection.inc |
| 44 |
|
| 45 |
--let $server_3_local_address= `SELECT @@GLOBAL.group_replication_local_address` |
| 46 |
--let $server_3_comm_stack= `SELECT @@GLOBAL.group_replication_communication_stack` |
| 47 |
|
| 48 |
# Adding suppressions |
| 49 |
SET SESSION sql_log_bin= 0; |
| 50 |
call mtr.add_suppression("\\[GCS\\] Error connecting to all peers. Member join failed. Local port:*"); |
| 51 |
call mtr.add_suppression("\\[GCS\\] The member was unable to join the group.*"); |
| 52 |
call mtr.add_suppression("Timeout on wait for view after joining group"); |
| 53 |
SET SESSION sql_log_bin= 1; |
| 54 |
|
| 55 |
--let $server_3_mysql_address= 127.0.0.1:$SERVER_MYPORT_3 |
| 56 |
|
| 57 |
--replace_result $server_3_mysql_address GROUP_REPLICATION_SERVER_3_ADDRESS |
| 58 |
--eval SET GLOBAL group_replication_local_address= "$server_3_mysql_address" |
| 59 |
SET GLOBAL group_replication_communication_stack= MySQL; |
| 60 |
|
| 61 |
|
| 62 |
--echo # 5. Manually start server 3 and expect it to fail while joining the |
| 63 |
--echo # group |
| 64 |
|
| 65 |
--replace_result $group_replication_group_name GROUP_REPLICATION_GROUP_NAME |
| 66 |
--eval SET GLOBAL group_replication_group_name= "$group_replication_group_name" |
| 67 |
|
| 68 |
--error ER_GROUP_REPLICATION_CONFIGURATION |
| 69 |
START GROUP_REPLICATION; |
| 70 |
|
| 71 |
--echo # 6. Restore server 3 original address |
| 72 |
--replace_result $server_3_local_address GROUP_REPLICATION_SERVER_3_LOCAL_ADDRESS |
| 73 |
--eval SET GLOBAL group_replication_local_address= "$server_3_local_address" |
| 74 |
--eval SET GLOBAL group_replication_communication_stack= "$server_3_comm_stack" |
| 75 |
|
| 76 |
--echo # 7. Server 3 must successfully join the group |
| 77 |
--source include/start_group_replication.inc |
| 78 |
|
| 79 |
--echo # 8. Clean up. |
| 80 |
|
| 81 |
# This is the end... My only friend the end! |
| 82 |
--source include/group_replication_end.inc |