Debian Codegraph @

mysql-test/suite/group_replication/t/gr_relay_log_name_change.test

raw
1 # ==== Purpose ====
2 #
3 # This test case will test the server behavior while enabling group replication
4 # on startup and changing the relay-log option.
5 #
6 # First, it will ensure that the server starts and enable GR if properly
7 # configured.
8 #
9 # Then, it will restart the server again change the relay-log option. The
10 # expected behavior is that GR should not fail to start. At start GR will
11 # simply use the first relay log file with the new name.
12 # Finally, the test will restart the server again and the GR plug-in should
13 # work fine.
14 #
15 # ==== Related Bugs and Worklogs ====
16 #
17 # BUG#23600405 CRASH IF RELAY LOG ISN'T FOUND
18 # WL#7491: GTID-based replication applier recovery and positioning
19 #
20
21 --source include/have_group_replication_plugin.inc
22
23 --source include/start_and_bootstrap_group_replication.inc
24
25 --echo
26 --echo ##############################################
27 --echo # 1: Restart the server enabling GR on startup
28 --let $allow_rpl_inited=1
29 --let $_group_replication_local_address= `SELECT @@GLOBAL.group_replication_local_address`
30 --let $_group_replication_group_seeds= `SELECT @@GLOBAL.group_replication_group_seeds`
31 --let $restart_parameters=restart:--group-replication-start-on-boot=ON --group-replication-group-name=$group_replication_group_name --group_replication_local_address=$_group_replication_local_address --group_replication_group_seeds=$_group_replication_group_seeds --group_replication_bootstrap_group=ON
32 --replace_result $group_replication_group_name GROUP_REPLICATION_GROUP_NAME $_group_replication_local_address GROUP_REPLICATION_LOCAL_ADDRESS $_group_replication_group_seeds GROUP_REPLICATION_GROUP_SEEDS
33 --source include/restart_mysqld.inc
34
35 --let $group_replication_member_state= ONLINE
36 --source include/gr_wait_for_member_state.inc
37
38 --echo
39 --echo #####################################################
40 --echo # 2: Restart the server changing the relay-log option
41 --let $allow_rpl_inited=1
42 --let $restart_parameters= $restart_parameters --relay-log=new-relay-log-name
43 --replace_result $group_replication_group_name GROUP_REPLICATION_GROUP_NAME $_group_replication_local_address GROUP_REPLICATION_LOCAL_ADDRESS $_group_replication_group_seeds GROUP_REPLICATION_GROUP_SEEDS
44 --source include/restart_mysqld.inc
45
46 --let $group_replication_member_state= ONLINE
47 --source include/gr_wait_for_member_state.inc
48
49 --echo
50 --echo #######################################################
51 --echo # 3: Cleanup
52
53 --let $allow_rpl_inited=1
54 --let $restart_parameters= $restart_parameters --relay-log=server-relay-log --group_replication_start_on_boot=OFF
55 --replace_result $group_replication_group_name GROUP_REPLICATION_GROUP_NAME $_group_replication_local_address GROUP_REPLICATION_LOCAL_ADDRESS $_group_replication_group_seeds GROUP_REPLICATION_GROUP_SEEDS
56 --source include/restart_mysqld.inc
57
58 --let $rpl_server_number= 1
59 --let $rpl_connection_name= server_1
60 --source include/rpl_connect.inc
61
62 --let $skip_recovery_configuration= 1
63 --source include/gr_clear_configuration.inc