| 1 |
# |
| 2 |
# This test kill -9-s a slave while small updates have been performed on the master. |
| 3 |
# |
| 4 |
|
| 5 |
--source include/galera_cluster.inc |
| 6 |
--source include/have_innodb.inc |
| 7 |
|
| 8 |
# Save original auto_increment_offset values. |
| 9 |
--let $node_1=node_1 |
| 10 |
--let $node_2=node_2 |
| 11 |
--source include/auto_increment_offset_save.inc |
| 12 |
|
| 13 |
--connection node_1 |
| 14 |
call mtr.add_suppression("WSREP: Last Applied Action message in non-primary configuration from member "); |
| 15 |
|
| 16 |
# Enable the master to continue running during the split-brain situation that |
| 17 |
# occurs when the slave is killed |
| 18 |
--let $wsrep_provider_options_orig = `SELECT @@wsrep_provider_options` |
| 19 |
SET GLOBAL wsrep_provider_options = 'pc.ignore_sb=true'; |
| 20 |
|
| 21 |
CREATE TABLE t1 (f1 INTEGER NOT NULL PRIMARY KEY) ENGINE=InnoDB; |
| 22 |
|
| 23 |
--connection node_2 |
| 24 |
--source include/kill_galera.inc |
| 25 |
|
| 26 |
--connection node_1 |
| 27 |
ALTER TABLE t1 ADD COLUMN f2 INTEGER; |
| 28 |
|
| 29 |
--connection node_2 |
| 30 |
--source include/start_mysqld.inc |
| 31 |
|
| 32 |
--let $galera_connection_name = node_2a |
| 33 |
--let $galera_server_number = 2 |
| 34 |
--source include/galera_connect.inc |
| 35 |
--connection node_2a |
| 36 |
|
| 37 |
--let $wait_condition = SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'; |
| 38 |
--source include/wait_condition.inc |
| 39 |
|
| 40 |
--let $wait_condition = SELECT VARIABLE_VALUE = 'Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status'; |
| 41 |
--source include/wait_condition.inc |
| 42 |
|
| 43 |
# Restore original auto_increment_offset values. |
| 44 |
--source include/auto_increment_offset_restore.inc |
| 45 |
|
| 46 |
SELECT COUNT(*) FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME='t1'; |
| 47 |
|
| 48 |
--connection node_1 |
| 49 |
--disable_query_log |
| 50 |
--eval SET GLOBAL wsrep_provider_options = '$wsrep_provider_options_orig'; |
| 51 |
--enable_query_log |
| 52 |
|
| 53 |
DROP TABLE t1; |