| 1 |
################################################################################ |
| 2 |
# Verify that when a new member is added to the group the important messages are |
| 3 |
# logged with SYSTEM level. |
| 4 |
# |
| 5 |
# 0. Start 2 servers |
| 6 |
# 1. Bootstrap group replication on first server |
| 7 |
# 2. Add second server to the group |
| 8 |
# 3. Verify that messages are logged with SYSTEM level |
| 9 |
# 4. Cleanup |
| 10 |
################################################################################ |
| 11 |
|
| 12 |
--echo |
| 13 |
--echo ############################################################ |
| 14 |
--echo # 0. Start 2 servers |
| 15 |
--source include/have_group_replication_plugin.inc |
| 16 |
--let $rpl_skip_group_replication_start= 1 |
| 17 |
--source include/group_replication.inc |
| 18 |
|
| 19 |
--echo |
| 20 |
--echo ############################################################ |
| 21 |
--echo # 1. Bootstrap group replication on first server |
| 22 |
--let $rpl_connection_name= server1 |
| 23 |
--source include/rpl_connection.inc |
| 24 |
--source include/start_and_bootstrap_group_replication.inc |
| 25 |
|
| 26 |
--echo |
| 27 |
--echo ############################################################ |
| 28 |
--echo # 2. Add second server to the group |
| 29 |
--let $rpl_connection_name= server2 |
| 30 |
--source include/rpl_connection.inc |
| 31 |
--source include/start_group_replication.inc |
| 32 |
|
| 33 |
--echo |
| 34 |
--echo ############################################################ |
| 35 |
--echo # 3. Verify that messages are logged with SYSTEM level |
| 36 |
|
| 37 |
--let $assert_file = $MYSQLTEST_VARDIR/tmp/gr_add_member_error_message.2.err |
| 38 |
--let $assert_select = \[System\] \[MY-013587\] \[Repl\] Plugin group_replication reported: 'Plugin 'group_replication' is starting\.' |
| 39 |
--let $assert_count = 1 |
| 40 |
--let $assert_text = Found message informing that group replication plugin has started. |
| 41 |
--source include/assert_grep.inc |
| 42 |
|
| 43 |
--let $assert_file = $MYSQLTEST_VARDIR/tmp/gr_add_member_error_message.2.err |
| 44 |
--let $assert_only_after= Plugin 'group_replication' is starting |
| 45 |
--let $assert_select = \[System\] \[MY-011565\] \[Repl\] Plugin group_replication reported: 'Setting super_read_only=ON\.' |
| 46 |
--let $assert_count = 2 |
| 47 |
--let $assert_text = Found message informing that `super_read_only` is ON. |
| 48 |
--source include/assert_grep.inc |
| 49 |
|
| 50 |
--let $assert_file = $MYSQLTEST_VARDIR/tmp/gr_add_member_error_message.2.err |
| 51 |
--let $assert_only_after= Plugin group_replication reported: 'Setting super_read_only=ON\.' |
| 52 |
--let $assert_select = \[System\] \[MY-013471\] \[Repl\] Plugin group_replication reported: 'Distributed recovery will transfer data using: Incremental recovery from a group donor' |
| 53 |
--let $assert_count = 1 |
| 54 |
--let $assert_text = Found message informing the strategy for distributed recovery. |
| 55 |
--source include/assert_grep.inc |
| 56 |
|
| 57 |
--let $assert_file = $MYSQLTEST_VARDIR/tmp/gr_add_member_error_message.2.err |
| 58 |
--let $assert_only_after= Plugin group_replication reported: 'Distributed recovery will transfer data using.* |
| 59 |
--let $assert_select = \[System\] \[MY-011503\] \[Repl\] Plugin group_replication reported: 'Group membership changed to .* on view .*' |
| 60 |
--let $assert_count = 1 |
| 61 |
--let $assert_text = Found message informing that group membership has changed. |
| 62 |
--source include/assert_grep.inc |
| 63 |
|
| 64 |
--let $assert_file = $MYSQLTEST_VARDIR/tmp/gr_add_member_error_message.2.err |
| 65 |
--let $assert_only_after= Plugin group_replication reported: 'Group membership changed to .* on view .*' |
| 66 |
--let $assert_select = \[System\] \[MY-011490\] \[Repl\] Plugin group_replication reported: 'This server was declared online within the replication group\.' |
| 67 |
--let $assert_count = 1 |
| 68 |
--let $assert_text = Found message informing that server was declared online withing the replication group. |
| 69 |
--source include/assert_grep.inc |
| 70 |
|
| 71 |
--let $assert_file = $MYSQLTEST_VARDIR/tmp/gr_add_member_error_message.2.err |
| 72 |
--let $assert_only_after= Plugin group_replication reported: 'This server was declared online within the replication group\.' |
| 73 |
--let $assert_select = \[System\] \[MY-011566\] \[Repl\] Plugin group_replication reported: 'Setting super_read_only=OFF\.' |
| 74 |
--let $assert_count = 1 |
| 75 |
--let $assert_text = Found message informing that `super_read_only` is OFF. |
| 76 |
--source include/assert_grep.inc |
| 77 |
|
| 78 |
--let $assert_file = $MYSQLTEST_VARDIR/tmp/gr_add_member_error_message.1.err |
| 79 |
--let $assert_only_after= Plugin group_replication reported: 'Setting super_read_only=OFF\.' |
| 80 |
--let $assert_select = \[System\] \[MY-011492\] \[Repl\] Plugin group_replication reported: 'The member with address .* was declared online within the replication group\.' |
| 81 |
--let $assert_count = 1 |
| 82 |
--let $assert_text = Found message informing that member was declared online withing the group. |
| 83 |
--source include/assert_grep.inc |
| 84 |
|
| 85 |
--source include/group_replication_end.inc |