| 1 |
# |
| 2 |
# Construct a situation where Donor node partitions in the |
| 3 |
# middle of SST. The Donor should stay in non-Primary state instead of |
| 4 |
# crashing in assertion in wsrep-lib. |
| 5 |
# |
| 6 |
# In the test, node_2 is restarted and node_1 configured to be |
| 7 |
# the donor. Node_1 execution is stopped before sst_sent() is |
| 8 |
# called and node_1 is made to partition from the cluster. |
| 9 |
# |
| 10 |
|
| 11 |
--source include/galera_cluster.inc |
| 12 |
--source include/have_innodb.inc |
| 13 |
--source include/have_debug_sync.inc |
| 14 |
--source include/big_test.inc |
| 15 |
|
| 16 |
--let $galera_connection_name = node_3 |
| 17 |
--let $galera_server_number = 3 |
| 18 |
--source include/galera_connect.inc |
| 19 |
|
| 20 |
--let $node_1=node_1 |
| 21 |
--let $node_2=node_2 |
| 22 |
--let $node_3=node_3 |
| 23 |
--source ../galera/include/auto_increment_offset_save.inc |
| 24 |
|
| 25 |
--connection node_2 |
| 26 |
--source include/shutdown_mysqld.inc |
| 27 |
--remove_file $MYSQLTEST_VARDIR/mysqld.2/data/grastate.dat |
| 28 |
|
| 29 |
--connection node_1 |
| 30 |
SET GLOBAL debug_dbug = '+d,sync.wsrep_sst_donor_after_donation'; |
| 31 |
|
| 32 |
--connection node_2 |
| 33 |
--source include/start_mysqld.inc |
| 34 |
|
| 35 |
--connection node_1 |
| 36 |
SET DEBUG_SYNC = 'now WAIT_FOR sync.wsrep_sst_donor_after_donation_reached'; |
| 37 |
SET GLOBAL wsrep_provider_options = 'gmcast.isolate=1'; |
| 38 |
SET SESSION wsrep_sync_wait=0; |
| 39 |
--let $wait_condition = SELECT VARIABLE_VALUE = 'non-Primary' FROM information_schema.global_status WHERE VARIABLE_NAME = 'wsrep_cluster_status' |
| 40 |
--source include/wait_condition.inc |
| 41 |
|
| 42 |
SET DEBUG_SYNC = 'now SIGNAL signal.wsrep_sst_donor_after_donation_continue'; |
| 43 |
SET DEBUG_SYNC = 'RESET'; |
| 44 |
SET GLOBAL debug_dbug = ''; |
| 45 |
|
| 46 |
SET GLOBAL wsrep_provider_options = 'gmcast.isolate=0'; |
| 47 |
SET SESSION wsrep_sync_wait=15; |
| 48 |
|
| 49 |
--let $wait_condition = SELECT VARIABLE_VALUE = 3 FROM information_schema.global_status WHERE VARIABLE_NAME = 'wsrep_cluster_size' |
| 50 |
--connection node_1 |
| 51 |
--source include/wait_condition.inc |
| 52 |
--connection node_2 |
| 53 |
--source include/wait_condition.inc |
| 54 |
--connection node_3 |
| 55 |
|
| 56 |
--connection node_1 |
| 57 |
--let $wait_condition = SELECT VARIABLE_VALUE = 'ON' FROM information_schema.global_status WHERE VARIABLE_NAME = 'wsrep_ready' |
| 58 |
--source include/wait_condition.inc |
| 59 |
|
| 60 |
--source ../galera/include/auto_increment_offset_restore.inc |
| 61 |
|
| 62 |
--connection node_1 |
| 63 |
CALL mtr.add_suppression("WSREP: sst sent called when not SST donor, state CONNECTED"); |
| 64 |
CALL mtr.add_suppression("WSREP: .* returned an error: Not connected to Primary Component"); |