| 1 |
################################################################################ |
| 2 |
# This test verifies that the error conditions are properly handled during the |
| 3 |
# initialization of the group_gtid_executed which is used for the skip gtid |
| 4 |
# handling. |
| 5 |
# |
| 6 |
# Test: |
| 7 |
# 0. The test requires two servers: M1 and M2. |
| 8 |
# 1. Bootstrap group M1. Inject error using DEBUG point in M2. Start on M2 |
| 9 |
# should fail. |
| 10 |
# 2. Assert check that the warning was indeed thrown. |
| 11 |
# 3. Clean up. |
| 12 |
################################################################################ |
| 13 |
|
| 14 |
--source include/have_debug.inc |
| 15 |
--let $group_replication_group_name= 32e181b1-01d2-11e6-a992-02420ef39c5b |
| 16 |
--source include/have_group_replication_plugin.inc |
| 17 |
--let $rpl_skip_group_replication_start= 1 |
| 18 |
--source include/group_replication.inc |
| 19 |
|
| 20 |
--echo # |
| 21 |
--echo # Setup a new group |
| 22 |
--echo # |
| 23 |
|
| 24 |
--let $rpl_connection_name= server1 |
| 25 |
--source include/rpl_connection.inc |
| 26 |
--source include/start_and_bootstrap_group_replication.inc |
| 27 |
|
| 28 |
--let $rpl_connection_name= server2 |
| 29 |
--source include/rpl_connection.inc |
| 30 |
--eval SET GLOBAL group_replication_group_name= "$group_replication_group_name" |
| 31 |
SET @debug_save= @@GLOBAL.DEBUG; |
| 32 |
SET @@GLOBAL.DEBUG= '+d,gr_server_gtid_executed_extraction_error'; |
| 33 |
|
| 34 |
# The start GR will error out here due to the error injection. |
| 35 |
--error ER_GROUP_REPLICATION_APPLIER_INIT_ERROR |
| 36 |
START GROUP_REPLICATION; |
| 37 |
|
| 38 |
--echo # Asserting that the warning was indeed thrown. |
| 39 |
--let $grep_file=$MYSQLTEST_VARDIR/tmp/group_replication_group_gtid_initialize_error.err |
| 40 |
--let $grep_pattern=Error when extracting this member GTID executed set. Certification module can't be properly initialized |
| 41 |
--let $grep_output= print_count |
| 42 |
--source include/grep_pattern.inc |
| 43 |
|
| 44 |
--echo # Asserting that the warning was indeed thrown. |
| 45 |
--let $grep_file=$MYSQLTEST_VARDIR/tmp/group_replication_group_gtid_initialize_error.err |
| 46 |
--let $grep_pattern=Error during Certification module initialization. |
| 47 |
--let $grep_output= print_count |
| 48 |
--source include/grep_pattern.inc |
| 49 |
|
| 50 |
# Cleanup |
| 51 |
SET @@GLOBAL.DEBUG= @debug_save; |
| 52 |
--let $rpl_connection_name= server1 |
| 53 |
--source include/rpl_connection.inc |
| 54 |
STOP GROUP_REPLICATION; |
| 55 |
|
| 56 |
--source include/group_replication_end.inc |