| 1 |
--source include/galera_cluster.inc |
| 2 |
--source include/have_innodb.inc |
| 3 |
|
| 4 |
# Save original auto_increment_offset values. |
| 5 |
--let $node_1=node_1 |
| 6 |
--let $node_2=node_2 |
| 7 |
--source include/auto_increment_offset_save.inc |
| 8 |
|
| 9 |
--connection node_1 |
| 10 |
|
| 11 |
CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB; |
| 12 |
INSERT INTO t1 VALUES('test'); |
| 13 |
CREATE DATABASE db; |
| 14 |
|
| 15 |
--connection node_2 |
| 16 |
--let $expected_position_uuid = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_state_uuid'` |
| 17 |
--let $expected_position_seqno = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_last_committed'` |
| 18 |
|
| 19 |
--let $expected_position = $expected_position_uuid:$expected_position_seqno |
| 20 |
|
| 21 |
--echo Shutting down server 2 ... |
| 22 |
--source include/shutdown_mysqld.inc |
| 23 |
|
| 24 |
--echo Recovering server 2 ... |
| 25 |
--let $galera_wsrep_recover_server_id=2 |
| 26 |
--source suite/galera/include/galera_wsrep_recover.inc |
| 27 |
|
| 28 |
if ($galera_wsrep_start_position != $expected_position) |
| 29 |
{ |
| 30 |
die(Expected position: $expected_position, found $galera_wsrep_start_position); |
| 31 |
} |
| 32 |
|
| 33 |
--echo Restarting server ... |
| 34 |
--source include/start_mysqld.inc |
| 35 |
|
| 36 |
--let $wait_condition = SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size' |
| 37 |
--source include/wait_condition.inc |
| 38 |
--source include/wait_until_ready.inc |
| 39 |
|
| 40 |
--connection node_1 |
| 41 |
DROP TABLE t1; |
| 42 |
DROP DATABASE db; |
| 43 |
|
| 44 |
--connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2 |
| 45 |
--source include/wait_until_connected_again.inc |
| 46 |
|
| 47 |
# Restore original auto_increment_offset values. |
| 48 |
--let $node_2=node_2a |
| 49 |
--source include/auto_increment_offset_restore.inc |
| 50 |
|
| 51 |
--source include/galera_end.inc |