Skip to content

Commit

Permalink
MDEV-30892 test galera.galera_log_bin is not deterministic
Browse files Browse the repository at this point in the history
galera.galera_log_bin test created the test tables and executed initial DML into node 2
Then connection is switched to node 1, where ALTER TABLE was attempted. But there is no guarantee that the table to alter was yet replicated to node 1.

The fix in this commit, creates the test tables in node 1 instead, so it is guaranteed that they are available for the later ALTER

Signed-off-by: Julius Goryavsky <julius.goryavsky@mariadb.com>
  • Loading branch information
saraj22 authored and sysprg committed May 3, 2023
1 parent 7f96dd5 commit 9b6f87b
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions mysql-test/suite/galera/r/galera_log_bin.result
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
connection node_2;
connection node_1;
connection node_1;
connection node_2;
set global wsrep_on=OFF;
reset master;
set global wsrep_on=ON;
connection node_2;
connection node_1;
set global wsrep_on=OFF;
reset master;
set global wsrep_on=ON;
Expand Down
4 changes: 2 additions & 2 deletions mysql-test/suite/galera/r/galera_log_bin_ext.result
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ connection node_2;
connection node_1;
connection node_1;
connection node_2;
connection node_1;
connection node_2;
set global wsrep_on=OFF;
reset master;
set global wsrep_on=ON;
connection node_2;
connection node_1;
set global wsrep_on=OFF;
reset master;
set global wsrep_on=ON;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ connection node_2;
connection node_1;
connection node_1;
connection node_2;
connection node_1;
connection node_2;
set global wsrep_on=OFF;
reset master;
set global wsrep_on=ON;
connection node_2;
connection node_1;
set global wsrep_on=OFF;
reset master;
set global wsrep_on=ON;
Expand Down
4 changes: 2 additions & 2 deletions mysql-test/suite/galera/r/galera_log_bin_opt.result
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
connection node_2;
connection node_1;
connection node_1;
connection node_2;
set global wsrep_on=OFF;
reset master;
set global wsrep_on=ON;
connection node_2;
connection node_1;
set global wsrep_on=OFF;
reset master;
set global wsrep_on=ON;
Expand Down
4 changes: 2 additions & 2 deletions mysql-test/suite/galera/t/galera_log_bin.inc
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
--source include/galera_cluster.inc
--source include/force_restart.inc

--connection node_1
--connection node_2
set global wsrep_on=OFF;
reset master;
set global wsrep_on=ON;
--connection node_2
--connection node_1
set global wsrep_on=OFF;
reset master;
set global wsrep_on=ON;
Expand Down
4 changes: 2 additions & 2 deletions mysql-test/suite/galera/t/galera_log_bin_sst.inc
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
--let $node_2=node_2
--source include/auto_increment_offset_save.inc

--connection node_1
--connection node_2
set global wsrep_on=OFF;
reset master;
set global wsrep_on=ON;
--connection node_2
--connection node_1
set global wsrep_on=OFF;
reset master;
set global wsrep_on=ON;
Expand Down

0 comments on commit 9b6f87b

Please sign in to comment.