| 1 |
# |
| 2 |
# GCF-832 SR: mysql.wsrep_streaming_log table remains populated on all nodes after crash |
| 3 |
# followed by immediate recovery |
| 4 |
# |
| 5 |
--source include/galera_cluster.inc |
| 6 |
--source include/have_debug_sync.inc |
| 7 |
--source include/force_restart.inc |
| 8 |
|
| 9 |
--connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3 |
| 10 |
|
| 11 |
# Save original auto_increment_offset values. |
| 12 |
--let $node_1=node_1 |
| 13 |
--let $node_2=node_2 |
| 14 |
--let $node_3=node_3 |
| 15 |
--source ../galera/include/auto_increment_offset_save.inc |
| 16 |
|
| 17 |
--connection node_2 |
| 18 |
--let $wait_condition = SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'; |
| 19 |
--source include/wait_condition.inc |
| 20 |
|
| 21 |
SET GLOBAL debug_dbug="d,crash_last_fragment_commit_after_fragment_removal"; |
| 22 |
|
| 23 |
--let $_expect_file_name= `select regexp_replace(@@tmpdir, '^.*/','')` |
| 24 |
--let $_expect_file_name= $MYSQLTEST_VARDIR/tmp/$_expect_file_name.expect |
| 25 |
--write_line wait $_expect_file_name |
| 26 |
|
| 27 |
CREATE TABLE t1 (f1 VARCHAR(30) not null primary key) ENGINE=InnoDB; |
| 28 |
|
| 29 |
SET AUTOCOMMIT=OFF; |
| 30 |
SET SESSION wsrep_trx_fragment_size=1; |
| 31 |
START TRANSACTION; |
| 32 |
|
| 33 |
INSERT INTO t1 VALUES ('primary1'),('primary2'),('primary3'),('primary4'),('primary5'); |
| 34 |
--error 2013,2026 |
| 35 |
COMMIT; |
| 36 |
|
| 37 |
--connection node_1 |
| 38 |
--let $wait_condition = SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'; |
| 39 |
--source include/wait_condition.inc |
| 40 |
|
| 41 |
--connection node_2 |
| 42 |
--source include/start_mysqld.inc |
| 43 |
|
| 44 |
--connection node_1 |
| 45 |
--let $wait_condition = SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'; |
| 46 |
--source include/wait_condition.inc |
| 47 |
SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log; |
| 48 |
SELECT * FROM t1; |
| 49 |
|
| 50 |
--connection node_2 |
| 51 |
--enable_reconnect |
| 52 |
SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log; |
| 53 |
SELECT * FROM t1; |
| 54 |
|
| 55 |
DROP TABLE t1; |
| 56 |
|
| 57 |
--source ../galera/include/auto_increment_offset_restore.inc |