Skip to content

Commit 7b66063

Browse files
committed
Bug#36475850 ndb_rpl_log_updates and ndb_rpl_log_updates_filter fails in
PB2 Test does not wait for data changes to be replicated before performing validations. The only wait is for own server to binlog the changes and that does not mean it has been replicated to the other clusters. Fix by waiting for DDL and DML changes to propagate through the replication topology before performing validations. Remove wait for own server to binlog. Removed fix for ndb_rpl_log_updates_filter as part of backporting. Change-Id: Iad4ed872453bfa1cfcdcbbaf5127e77f47a249a0 (cherry picked from commit eabdbb8e70c9df9c56cf90fcf6f00ed0f9b2c851)
1 parent 2c3bacc commit 7b66063

File tree

2 files changed

+12
-8
lines changed

2 files changed

+12
-8
lines changed

mysql-test/suite/ndb_rpl/r/ndb_rpl_log_updates.result

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,19 +18,19 @@ include/rpl_connect.inc [creating replica.7]
1818
[connection source.1]
1919
CREATE TABLE t1 (k INT PRIMARY KEY, c CHAR) ENGINE = NDB;
2020
INSERT INTO t1 VALUES (1, 'a');
21-
# Wait for ndb_binlog thread...
21+
# Sync the replication topology (propagates the table to all clusters)
22+
include/rpl/sync.inc
2223
[connection source.2]
2324
INSERT INTO t1 VALUES (2, 'b');
24-
# Wait for ndb_binlog thread...
2525
[connection source.4]
2626
SET sql_log_bin= OFF;
2727
INSERT INTO t1 VALUES (3, 'c');
2828
SET sql_log_bin= ON;
2929
INSERT INTO t1 VALUES (4, 'd');
30-
# Wait for ndb_binlog thread...
3130
[connection source.5]
3231
INSERT INTO t1 VALUES (5, 'e');
33-
# Wait for ndb_binlog thread...
32+
# Sync the replication topology (propagates the data changes)
33+
include/rpl/sync.inc
3434
[connection replica.3]
3535
SELECT * FROM t1 ORDER BY k;
3636
k c

mysql-test/suite/ndb_rpl/t/ndb_rpl_log_updates.test

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,25 +45,29 @@
4545
--source include/rpl_connection.inc
4646
CREATE TABLE t1 (k INT PRIMARY KEY, c CHAR) ENGINE = NDB;
4747
INSERT INTO t1 VALUES (1, 'a');
48-
--source suite/ndb/include/ndb_binlog_wait_own_changes.inc
48+
49+
--echo # Sync the replication topology (propagates the table to all clusters)
50+
--let $use_gtids=0
51+
--source include/rpl_sync.inc
4952

5053
--let $rpl_connection_name= source.2
5154
--source include/rpl_connection.inc
5255
INSERT INTO t1 VALUES (2, 'b');
53-
--source suite/ndb/include/ndb_binlog_wait_own_changes.inc
5456

5557
--let $rpl_connection_name= source.4
5658
--source include/rpl_connection.inc
5759
SET sql_log_bin= OFF;
5860
INSERT INTO t1 VALUES (3, 'c');
5961
SET sql_log_bin= ON;
6062
INSERT INTO t1 VALUES (4, 'd');
61-
--source suite/ndb/include/ndb_binlog_wait_own_changes.inc
6263

6364
--let $rpl_connection_name= source.5
6465
--source include/rpl_connection.inc
6566
INSERT INTO t1 VALUES (5, 'e');
66-
--source suite/ndb/include/ndb_binlog_wait_own_changes.inc
67+
68+
--echo # Sync the replication topology (propagates the data changes)
69+
--let $use_gtids=0
70+
--source include/rpl_sync.inc
6771

6872
# Verify replica.3
6973
--let $rpl_connection_name= replica.3

0 commit comments

Comments
 (0)