| 1 |
################################################################################ |
| 2 |
# WL#7660 - GCS PLUGIN IMPLEMENTATION |
| 3 |
# |
| 4 |
# This test checks the basic functionality of Group Replication |
| 5 |
# plugin which should work with the .opt file in which the plugin |
| 6 |
# options are passed as options. |
| 7 |
# |
| 8 |
# Test: |
| 9 |
# 0. The test requires one server. Set group name on .opt file. |
| 10 |
# 1. Check group_replication_group_name variable. |
| 11 |
# 2. Restart M1 with group_replication_start_on_boot=ON. |
| 12 |
# 3. Try executing START GR command. It should error out stating GR is already |
| 13 |
# running. |
| 14 |
# 4. Check that the member information is correct in the P_S table. |
| 15 |
################################################################################ |
| 16 |
|
| 17 |
--source include/have_group_replication_plugin.inc |
| 18 |
--source include/force_restart.inc |
| 19 |
|
| 20 |
SELECT @@group_replication_group_name; |
| 21 |
|
| 22 |
# We need to restart server to simulate start_on_boot option since |
| 23 |
# on MTR it is impossible to compute ports on configuration files. |
| 24 |
--let $_group_replication_local_address= `SELECT @@GLOBAL.group_replication_local_address` |
| 25 |
--let $_group_replication_group_seeds= `SELECT @@GLOBAL.group_replication_group_seeds` |
| 26 |
--let $restart_parameters=restart:--group_replication_local_address=$_group_replication_local_address --group_replication_group_seeds=$_group_replication_group_seeds --group_replication_bootstrap_group=1 --group_replication_start_on_boot=1 |
| 27 |
--replace_result $_group_replication_local_address GROUP_REPLICATION_LOCAL_ADDRESS $_group_replication_group_seeds GROUP_REPLICATION_GROUP_SEEDS |
| 28 |
--source include/restart_mysqld.inc |
| 29 |
|
| 30 |
SELECT @@group_replication_group_name; |
| 31 |
SELECT @@group_replication_start_on_boot; |
| 32 |
|
| 33 |
--error ER_GROUP_REPLICATION_RUNNING |
| 34 |
START GROUP_REPLICATION; |
| 35 |
|
| 36 |
#Check if the member information is correct on the table |
| 37 |
|
| 38 |
--let $server_uuid= `SELECT @@GLOBAL.SERVER_UUID` |
| 39 |
|
| 40 |
--let $wait_condition= SELECT count(*)=1 FROM performance_schema.replication_group_members WHERE member_id= '$server_uuid' ; |
| 41 |
--source include/wait_condition.inc |
| 42 |
|
| 43 |
--source include/stop_group_replication.inc |