| 1 |
############################################################################### |
| 2 |
# |
| 3 |
# After a configuration change returns successfully to the user |
| 4 |
# in the invoking member, its effects should be visible in all |
| 5 |
# members. |
| 6 |
# |
| 7 |
# Test: |
| 8 |
# 0. Start the 2 members in multi primary mode |
| 9 |
# 1. Change to single primary mode. |
| 10 |
# 2. Check the values on the other member first and then on the invoker |
| 11 |
# 3. Change to multi primary mode |
| 12 |
# 4. Check the values on the other member first and then on the invoker |
| 13 |
# 5. Cleanup |
| 14 |
# |
| 15 |
############################################################################### |
| 16 |
|
| 17 |
--source include/have_group_replication_plugin.inc |
| 18 |
--source include/group_replication.inc |
| 19 |
|
| 20 |
--echo # |
| 21 |
--echo # 1. Change to single primary mode. |
| 22 |
|
| 23 |
--let $server1_uuid= query_get_value(SELECT @@SERVER_UUID, @@SERVER_UUID, 1) |
| 24 |
|
| 25 |
--replace_result $server1_uuid MEMBER1_UUID |
| 26 |
--eval SELECT group_replication_switch_to_single_primary_mode("$server1_uuid") |
| 27 |
|
| 28 |
--echo # |
| 29 |
--echo # 2. Check the values on the other member first and then on the invoker |
| 30 |
|
| 31 |
--let $rpl_connection_name= server2 |
| 32 |
--source include/rpl_connection.inc |
| 33 |
|
| 34 |
--source include/gr_assert_secondary_member.inc |
| 35 |
|
| 36 |
--let $rpl_connection_name= server1 |
| 37 |
--source include/rpl_connection.inc |
| 38 |
|
| 39 |
--source include/gr_assert_primary_member.inc |
| 40 |
|
| 41 |
--echo # |
| 42 |
--echo # 3. Change to multi primary mode |
| 43 |
|
| 44 |
--let $rpl_connection_name= server1 |
| 45 |
--source include/rpl_connection.inc |
| 46 |
|
| 47 |
SELECT group_replication_switch_to_multi_primary_mode(); |
| 48 |
|
| 49 |
--echo # |
| 50 |
--echo # 4. Check the values on the other member first and then on the invoker |
| 51 |
|
| 52 |
--let $rpl_connection_name= server2 |
| 53 |
--source include/rpl_connection.inc |
| 54 |
|
| 55 |
--source include/gr_assert_multi_primary_mode.inc |
| 56 |
|
| 57 |
--let $rpl_connection_name= server1 |
| 58 |
--source include/rpl_connection.inc |
| 59 |
|
| 60 |
--source include/gr_assert_multi_primary_mode.inc |
| 61 |
|
| 62 |
--echo # |
| 63 |
--echo # 5. Cleanup |
| 64 |
|
| 65 |
--let $rpl_group_replication_reset_persistent_vars=1 |
| 66 |
--source include/group_replication_end.inc |