| 1 |
################################################################################ |
| 2 |
# Check that it is not possible to flush Group Replication applier channel |
| 3 |
# through FLUSH LOG command. |
| 4 |
# |
| 5 |
# Test: |
| 6 |
# 0. The test requires two servers: M1 and M2. |
| 7 |
# 1. Setup a new group with two members. |
| 8 |
# 2. Check there are two relay logs of applier channel before the attempt to |
| 9 |
# flush it. |
| 10 |
# 3. Try flush relay logs on applier channel with member ONLINE. It must |
| 11 |
# SUCCEED. |
| 12 |
# 4. Check there is a new relay log of applier channel after the attempt |
| 13 |
# to flush it. |
| 14 |
# 5. Try flush relay logs on applier channel with member OFFLINE. It must |
| 15 |
# SUCCEED. |
| 16 |
# 6. Check there is a new relay log of applier channel after the attempt |
| 17 |
# to flush it. |
| 18 |
################################################################################ |
| 19 |
|
| 20 |
--source include/have_group_replication_plugin.inc |
| 21 |
--echo # |
| 22 |
--echo # Setup a new group with two members. |
| 23 |
--echo # |
| 24 |
--source include/group_replication.inc |
| 25 |
|
| 26 |
--echo # |
| 27 |
--echo # There are two relay logs of Group Replication applier |
| 28 |
--echo # channel before the attempt to flush it. |
| 29 |
--echo # |
| 30 |
--file_exists $MYSQLTEST_VARDIR/mysqld.2/data/server-relay-log-group_replication_applier.000001 |
| 31 |
--file_exists $MYSQLTEST_VARDIR/mysqld.2/data/server-relay-log-group_replication_applier.000002 |
| 32 |
|
| 33 |
--echo # |
| 34 |
--echo # Try flush applier channel with Group Replication working. |
| 35 |
--echo # |
| 36 |
--connection server2 |
| 37 |
FLUSH RELAY LOGS FOR CHANNEL "group_replication_applier"; |
| 38 |
|
| 39 |
--echo # |
| 40 |
--echo # There is a new relay log of Group Replication applier channel after |
| 41 |
--echo # trying to flush it. |
| 42 |
--echo # |
| 43 |
--file_exists $MYSQLTEST_VARDIR/mysqld.2/data/server-relay-log-group_replication_applier.000003 |
| 44 |
|
| 45 |
--echo # |
| 46 |
--echo # Try flush applier channel with Group Replication stopped. |
| 47 |
--echo # |
| 48 |
--source include/stop_group_replication.inc |
| 49 |
FLUSH LOCAL RELAY LOGS FOR CHANNEL "group_replication_applier"; |
| 50 |
|
| 51 |
--echo # |
| 52 |
--echo # There is a new relay log of Group Replication applier channel after |
| 53 |
--echo # trying to flush it. |
| 54 |
--echo # |
| 55 |
--file_exists $MYSQLTEST_VARDIR/mysqld.2/data/server-relay-log-group_replication_applier.000004 |
| 56 |
|
| 57 |
--source include/group_replication_end.inc |