Skip to content

Commit 7b5783b

Browse files
committed
Fix two issues that caused the MTR tests
galera.galera_performance_schema, galera.galera_retry_applying, and galera.GCF-939 to fail: 1) Moved mtr.add_suppression() calls to the beginning of the galera_retry_applying MTR test. 2) Modified the condition in wsrep_apply_events() for calling wsrep_dump_rbr_buf_with_header() function.
1 parent eab212c commit 7b5783b

File tree

3 files changed

+13
-10
lines changed

3 files changed

+13
-10
lines changed

mysql-test/suite/galera/r/galera_retry_applying.result

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
connection node_2;
22
connection node_1;
3+
CALL mtr.add_suppression("Event .* Update_rows.* apply failed");
4+
CALL mtr.add_suppression("Inconsistency detected");
5+
CALL mtr.add_suppression("Failed to apply write set:.*");
6+
CALL mtr.add_suppression("Event .* Write_rows.* apply failed");
37
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY DEFAULT 0, f2 char(12));
48
CREATE TABLE t3 (f1 INTEGER PRIMARY KEY DEFAULT 0, f2 char(12));
59
START TRANSACTION;
@@ -10,7 +14,6 @@ COMMIT;
1014
connection node_2;
1115
SET GLOBAL wsrep_applier_retry_count = 2;
1216
SET GLOBAL debug_dbug = "d,apply_event_fail_once:o,/dev/null";
13-
CALL mtr.add_suppression("Event .* Write_rows.* apply failed");
1417
connection node_1;
1518
START TRANSACTION;
1619
UPDATE t3 SET f2 = 'ax' WHERE f1 = 1;
@@ -46,9 +49,6 @@ connection node_1;
4649
SET wsrep_sync_wait=0;
4750
CREATE TABLE t2 (f1 INTEGER PRIMARY KEY DEFAULT 0, f2 char(12));
4851
connection node_2;
49-
CALL mtr.add_suppression("Event .* Update_rows.* apply failed");
50-
CALL mtr.add_suppression("Inconsistency detected");
51-
CALL mtr.add_suppression("Failed to apply write set:.*");
5252
SET GLOBAL wsrep_applier_retry_count = 2;
5353
SET GLOBAL debug_dbug = '';
5454
SET GLOBAL debug_dbug = "d,apply_event_fail_always:o,/dev/null";

mysql-test/suite/galera/t/galera_retry_applying.test

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@
55
--source include/galera_cluster.inc
66
--source include/have_debug_sync.inc
77

8+
CALL mtr.add_suppression("Event .* Update_rows.* apply failed");
9+
CALL mtr.add_suppression("Inconsistency detected");
10+
CALL mtr.add_suppression("Failed to apply write set:.*");
11+
CALL mtr.add_suppression("Event .* Write_rows.* apply failed");
12+
813
#
914
# Case 1: Retrying succeeds after one retry event, no error is raised.
1015
#
@@ -26,7 +31,6 @@ COMMIT;
2631

2732
SET GLOBAL wsrep_applier_retry_count = 2;
2833
SET GLOBAL debug_dbug = "d,apply_event_fail_once:o,/dev/null";
29-
CALL mtr.add_suppression("Event .* Write_rows.* apply failed");
3034

3135
--connection node_1
3236
START TRANSACTION;
@@ -86,9 +90,6 @@ SET wsrep_sync_wait=0;
8690
CREATE TABLE t2 (f1 INTEGER PRIMARY KEY DEFAULT 0, f2 char(12));
8791

8892
--connection node_2
89-
CALL mtr.add_suppression("Event .* Update_rows.* apply failed");
90-
CALL mtr.add_suppression("Inconsistency detected");
91-
CALL mtr.add_suppression("Failed to apply write set:.*");
9293

9394
SET GLOBAL wsrep_applier_retry_count = 2;
9495
SET GLOBAL debug_dbug = '';

sql/wsrep_applier.cc

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -311,9 +311,11 @@ int wsrep_apply_events(THD* thd,
311311
trans_release_savepoint(thd, savepoint);
312312
}
313313

314-
if (ret && !thd->wsrep_has_ignored_error)
314+
if (ret || wsrep_thd_has_ignored_error(thd))
315315
{
316-
wsrep_store_error(thd, err, include_msg);
316+
if (ret) {
317+
wsrep_store_error(thd, err, include_msg);
318+
}
317319
wsrep_dump_rbr_buf_with_header(thd, data.data(), data.size());
318320
}
319321

0 commit comments

Comments
 (0)