| 1 |
# |
| 2 |
# This test verifies that the server can be shut down even if |
| 3 |
# some of the wsrep transactions are in QUERY_COMMITTING state. |
| 4 |
# In this case the shutdown sequence may do a BF abort for the |
| 5 |
# connection. |
| 6 |
# |
| 7 |
|
| 8 |
--source include/have_innodb.inc |
| 9 |
--source include/galera_cluster.inc |
| 10 |
--source include/have_debug_sync.inc |
| 11 |
|
| 12 |
# Save original auto_increment_offset values. |
| 13 |
--let $node_1=node_1 |
| 14 |
--let $node_2=node_2 |
| 15 |
--source include/auto_increment_offset_save.inc |
| 16 |
|
| 17 |
--connection node_1 |
| 18 |
CREATE TABLE t1 (f1 INT PRIMARY KEY); |
| 19 |
|
| 20 |
--connection node_2 |
| 21 |
call mtr.add_suppression("WSREP: Failed to scan the last segment to the end\\. Last events may be missing\\. Last recovered event: "); |
| 22 |
SET DEBUG_SYNC = 'wsrep_before_certification WAIT_FOR continue'; |
| 23 |
--send INSERT INTO t1 VALUES (1) |
| 24 |
|
| 25 |
--connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2 |
| 26 |
--source include/shutdown_mysqld.inc |
| 27 |
|
| 28 |
# On node_1, verify that the node has left the cluster. |
| 29 |
--connection node_1 |
| 30 |
--let $wait_condition = SELECT VARIABLE_VALUE = 1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'; |
| 31 |
--source include/wait_condition.inc |
| 32 |
|
| 33 |
--connection node_2a |
| 34 |
--source include/start_mysqld.inc |
| 35 |
|
| 36 |
--connection node_1 |
| 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 |
# Restore original auto_increment_offset values. |
| 41 |
--let $node_2=node_2a |
| 42 |
--source include/auto_increment_offset_restore.inc |
| 43 |
|
| 44 |
DROP TABLE t1; |