Skip to content

Commit 62e0a45

Browse files
committed
Merge branch '10.0-galera' into 10.1
2 parents 3361aee + f629f53 commit 62e0a45

File tree

5 files changed

+76
-0
lines changed

5 files changed

+76
-0
lines changed
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
2+
SET GLOBAL wsrep_provider_options='gmcast.isolate=1';
3+
SET SESSION wsrep_on = OFF;
4+
SET SESSION wsrep_on = ON;
5+
START SLAVE;
6+
include/wait_for_slave_param.inc [Slave_IO_Running]
7+
SET GLOBAL wsrep_provider_options='gmcast.isolate=0';
8+
include/wait_for_slave_to_start.inc
9+
INSERT INTO t1 VALUES (1);
10+
DROP TABLE t1;
11+
STOP SLAVE;
12+
RESET SLAVE ALL;
13+
CALL mtr.add_suppression('failed registering on master');

mysql-test/suite/galera/t/MW-284.cnf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
!include ../galera_2nodes_as_master.cnf

mysql-test/suite/galera/t/MW-284.test

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
#
2+
# MW-284 Slave I/O retry on ER_COM_UNKNOWN_ERROR
3+
#
4+
5+
--source include/galera_cluster.inc
6+
--source include/have_innodb.inc
7+
8+
--connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3
9+
--disable_query_log
10+
--eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=$NODE_MYPORT_1, MASTER_USER='root', MASTER_CONNECT_RETRY=1;
11+
--enable_query_log
12+
13+
--connection node_1
14+
CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
15+
SET GLOBAL wsrep_provider_options='gmcast.isolate=1';
16+
SET SESSION wsrep_on = OFF;
17+
--let $wait_condition = SELECT VARIABLE_VALUE = 'non-Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status'
18+
--source include/wait_condition.inc
19+
SET SESSION wsrep_on = ON;
20+
21+
--connection node_3
22+
START SLAVE;
23+
--sleep 1
24+
--let $slave_param= Slave_IO_Running
25+
--let $slave_param_value= Connecting
26+
--source include/wait_for_slave_param.inc
27+
28+
--connection node_1
29+
SET GLOBAL wsrep_provider_options='gmcast.isolate=0';
30+
31+
# We expect the slave to reconnect and resume replication
32+
33+
--connection node_3
34+
--source include/wait_for_slave_to_start.inc
35+
36+
--connection node_1
37+
INSERT INTO t1 VALUES (1);
38+
39+
--connection node_3
40+
--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't1'
41+
--source include/wait_condition.inc
42+
--let $wait_condition = SELECT COUNT(*) > 0 FROM t1
43+
--source include/wait_condition.inc
44+
45+
# Cleanup
46+
47+
--connection node_1
48+
DROP TABLE t1;
49+
50+
--connection node_3
51+
--let $wait_condition = SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't1'
52+
--source include/wait_condition.inc
53+
54+
STOP SLAVE;
55+
RESET SLAVE ALL;
56+
57+
CALL mtr.add_suppression('failed registering on master');

mysql-test/suite/galera/t/mysql-wsrep#237.test

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ SET DEBUG_SYNC= 'now SIGNAL continue';
2828
--connection node_1
2929
--reap
3030

31+
# Cleanup
3132
DROP TABLE t;
3233
--connection node_1a
3334
SET DEBUG_SYNC= 'RESET';

sql/slave.cc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1362,6 +1362,10 @@ bool is_network_error(uint errorno)
13621362
errorno == ER_NET_READ_INTERRUPTED ||
13631363
errorno == ER_SERVER_SHUTDOWN)
13641364
return TRUE;
1365+
#ifdef WITH_WSREP
1366+
if (errorno == ER_UNKNOWN_COM_ERROR)
1367+
return TRUE;
1368+
#endif
13651369

13661370
return FALSE;
13671371
}

0 commit comments

Comments
 (0)