Skip to content

Commit 44e109b

Browse files
authored
Merge pull request #220 from codership/GCF-1058-bugs-5.7-v25
Fix GCF-1058 MTR test galera.MW-86 fails on repeated runs
2 parents 1214ccb + dfc1d2e commit 44e109b

File tree

7 files changed

+212
-158
lines changed

7 files changed

+212
-158
lines changed
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
SELECT @@debug_sync;
2+
@@debug_sync
3+
ON - signals: ''
4+
SET SESSION wsrep_sync_wait = 1;
5+
SET GLOBAL debug = "+d,sync.wsrep_apply_cb";
6+
CREATE TABLE t_wait1 (f1 INTEGER) ENGINE=InnoDB;
7+
INSERT INTO t_wait1 VALUES (1);
8+
SHOW BINARY LOGS;
9+
SHOW BINLOG EVENTS;
10+
SHOW COLUMNS FROM t1;
11+
SHOW CREATE EVENT e1;
12+
SHOW CREATE FUNCTION f1;
13+
SHOW CREATE PROCEDURE p1;
14+
SHOW CREATE TABLE t1;
15+
SHOW CREATE TRIGGER tr1;
16+
SHOW CREATE VIEW v1;
17+
SHOW DATABASES;
18+
SHOW ENGINE InnoDB STATUS;
19+
SHOW FUNCTION CODE f1;
20+
SHOW FUNCTION STATUS;
21+
SHOW GRANTS FOR 'root'@'localhost';
22+
SHOW INDEX FROM t1;
23+
SHOW OPEN TABLES;
24+
SHOW PROCEDURE CODE p1;
25+
SHOW PROCEDURE STATUS;
26+
SHOW PRIVILEGES;
27+
SHOW STATUS LIKE 'wsrep_cluster_size';
28+
SHOW TABLE STATUS;
29+
SHOW TABLES;
30+
SHOW TRIGGERS;
31+
SHOW GLOBAL VARIABLES LIKE 'foo_bar';
32+
SHOW WARNINGS;
33+
SET GLOBAL debug = "-d,sync.wsrep_apply_cb";
34+
SET SESSION debug_sync = "now SIGNAL signal.wsrep_apply_cb";
35+
SET SESSION wsrep_sync_wait = default;
36+
DROP TABLE t_wait1;
37+
SELECT @@debug_sync;
38+
@@debug_sync
39+
ON - signals: ''
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
SELECT @@debug_sync;
2+
@@debug_sync
3+
ON - signals: ''
4+
SET SESSION wsrep_sync_wait = 8;
5+
SET GLOBAL debug = "+d,sync.wsrep_apply_cb";
6+
CREATE TABLE t_wait8 (f1 INTEGER) ENGINE=InnoDB;
7+
INSERT INTO t_wait8 VALUES (1);
8+
SET GLOBAL wsrep_provider_options = "repl.causal_read_timeout=PT0.1S";
9+
SHOW BINARY LOGS;
10+
SHOW BINLOG EVENTS;
11+
SHOW COLUMNS FROM t1;
12+
SHOW CREATE DATABASE db1;
13+
SHOW CREATE EVENT e1;
14+
SHOW CREATE FUNCTION f1;
15+
SHOW CREATE PROCEDURE p1;
16+
SHOW CREATE TABLE t1;
17+
SHOW CREATE TRIGGER tr1;
18+
SHOW CREATE VIEW v1;
19+
SHOW DATABASES;
20+
SHOW ENGINE InnoDB STATUS;
21+
SHOW FUNCTION CODE f1;
22+
SHOW FUNCTION STATUS;
23+
SHOW GRANTS FOR 'root'@'localhost';
24+
SHOW INDEX FROM t1;
25+
SHOW OPEN TABLES;
26+
SHOW PROCEDURE CODE p1;
27+
SHOW PROCEDURE STATUS;
28+
SHOW PRIVILEGES;
29+
SHOW STATUS LIKE 'wsrep_cluster_size';
30+
SHOW TABLE STATUS;
31+
SHOW TABLES;
32+
SHOW TRIGGERS;
33+
SHOW GLOBAL VARIABLES LIKE 'foo_bar';
34+
SHOW CREATE USER 'root';
35+
SHOW WARNINGS;
36+
SET GLOBAL debug = "-d,sync.wsrep_apply_cb";
37+
SET DEBUG_SYNC = "now SIGNAL signal.wsrep_apply_cb";
38+
SET SESSION wsrep_sync_wait = default;
39+
DROP TABLE t_wait8;
40+
SELECT @@debug_sync;
41+
@@debug_sync
42+
ON - signals: ''

mysql-test/suite/galera/r/MW-86.result

Lines changed: 0 additions & 66 deletions
This file was deleted.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
--log-bin --log-slave-updates
Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
#
2+
# SHOW commands no longer obey wsrep_sync_wait = 1 (WSREP_SYNC_WAIT_BEFORE_READ)
3+
# (they do not wait for the background INSERT in the applier in node_2 to
4+
# complete)
5+
#
6+
--source include/galera_cluster.inc
7+
--source include/have_binlog_format_row.inc
8+
--source include/have_debug_sync.inc
9+
10+
--connection node_2
11+
# Make sure no signals have been leftover from previous tests to surprise us.
12+
SELECT @@debug_sync;
13+
14+
SET SESSION wsrep_sync_wait = 1;
15+
SET GLOBAL debug = "+d,sync.wsrep_apply_cb";
16+
17+
--connection node_1
18+
CREATE TABLE t_wait1 (f1 INTEGER) ENGINE=InnoDB;
19+
# This will complete in node_1 but will start a background apply in node_2
20+
# which will stop because of sync.wsrep_apply_cb we set above.
21+
INSERT INTO t_wait1 VALUES (1);
22+
23+
--connection node_2
24+
25+
--disable_result_log
26+
27+
SHOW BINARY LOGS;
28+
29+
SHOW BINLOG EVENTS;
30+
31+
--error ER_NO_SUCH_TABLE
32+
SHOW COLUMNS FROM t1;
33+
34+
--error ER_EVENT_DOES_NOT_EXIST
35+
SHOW CREATE EVENT e1;
36+
37+
--error ER_SP_DOES_NOT_EXIST
38+
SHOW CREATE FUNCTION f1;
39+
40+
--error ER_SP_DOES_NOT_EXIST
41+
SHOW CREATE PROCEDURE p1;
42+
43+
--error ER_NO_SUCH_TABLE
44+
SHOW CREATE TABLE t1;
45+
46+
--error ER_TRG_DOES_NOT_EXIST
47+
SHOW CREATE TRIGGER tr1;
48+
49+
--error ER_NO_SUCH_TABLE
50+
SHOW CREATE VIEW v1;
51+
52+
SHOW DATABASES;
53+
54+
SHOW ENGINE InnoDB STATUS;
55+
56+
--error ER_SP_DOES_NOT_EXIST
57+
SHOW FUNCTION CODE f1;
58+
59+
SHOW FUNCTION STATUS;
60+
61+
SHOW GRANTS FOR 'root'@'localhost';
62+
63+
--error ER_NO_SUCH_TABLE
64+
SHOW INDEX FROM t1;
65+
66+
SHOW OPEN TABLES;
67+
68+
--error ER_SP_DOES_NOT_EXIST
69+
SHOW PROCEDURE CODE p1;
70+
71+
SHOW PROCEDURE STATUS;
72+
73+
SHOW PRIVILEGES;
74+
75+
SHOW STATUS LIKE 'wsrep_cluster_size';
76+
77+
SHOW TABLE STATUS;
78+
79+
SHOW TABLES;
80+
81+
SHOW TRIGGERS;
82+
83+
SHOW GLOBAL VARIABLES LIKE 'foo_bar';
84+
85+
--error 0
86+
SHOW WARNINGS;
87+
88+
--enable_result_log
89+
90+
# Unblock the background INSERT and remove the sync point.
91+
SET GLOBAL debug = "-d,sync.wsrep_apply_cb";
92+
SET SESSION debug_sync = "now SIGNAL signal.wsrep_apply_cb";
93+
94+
SET SESSION wsrep_sync_wait = default;
95+
96+
# This will wait for the background INSERT to complete before we quit
97+
# from the test.
98+
DROP TABLE t_wait1;
99+
100+
# Make sure no pending signals are leftover to surprise subsequent tests.
101+
SELECT @@debug_sync;
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
--log-bin --log-slave-updates

0 commit comments

Comments
 (0)