1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

MDEV-25962: binlog.binlog_truncate_multi_log_unsafe test fails in buildbot

1. sync_binlog=1 is needed to ensure that on flush binlog is available on
   disk.
2. Insert on 'connection master2' should wait for 'master1_ready' from
   'connection master1'.

Added sync_binlog=1 to all tests that got added as part of MDEV-21117 fix

@mysql-test/suite/binlog/t/binlog_truncate_multi_log_unsafe.test
@mysql-test/suite/binlog/t/binlog_truncate_multi_engine.test
@mysql-test/suite/binlog/t/binlog_truncate_active_log.test
@mysql-test/suite/binlog/t/binlog_truncate_multi_log.test
This commit is contained in:
Sujatha
2021-08-13 14:01:26 +05:30
parent 9ac1ac0061
commit 583516bbb9
9 changed files with 40 additions and 31 deletions

View File

@@ -1,5 +1,6 @@
call mtr.add_suppression("Can.t init tc log");
call mtr.add_suppression("Aborting");
SET @@global.sync_binlog= 1;
CREATE TABLE t1 (a INT PRIMARY KEY, b MEDIUMTEXT) ENGINE=Innodb;
CREATE TABLE t2 (a INT PRIMARY KEY, b MEDIUMTEXT) ENGINE=rocksdb;
#
@@ -30,9 +31,9 @@ Log_name File_size
master-bin.000001 #
master-bin.000002 #
master-bin.000003 #
# restart the server with --rpl-semi-sync-slave-enabled=1
# restart the server with --rpl-semi-sync-slave-enabled=1 --sync-binlog=1
# the server is restarted
# restart: --rpl-semi-sync-slave-enabled=1
# restart: --rpl-semi-sync-slave-enabled=1 --sync-binlog=1
connection default;
#
# *** Summary: 1 row should be present in both tables; binlog is truncated; number of binlogs at reconnect - 3:
@@ -97,7 +98,7 @@ INSERT INTO t2 VALUES (2, REPEAT("x", 4100));
INSERT INTO t1 VALUES (2, REPEAT("x", 4100));
COMMIT;
connection default;
# restart: --rpl-semi-sync-slave-enabled=1
# restart: --rpl-semi-sync-slave-enabled=1 --sync-binlog=1
connection default;
#
# *** Summary: 2 rows should be present in both tables; no binlog truncation; one extra binlog file compare with A; number of binlogs at reconnect - 4:
@@ -154,9 +155,9 @@ Log_name File_size
master-bin.000001 #
master-bin.000002 #
master-bin.000003 #
# restart the server with --rpl-semi-sync-slave-enabled=1
# restart the server with --rpl-semi-sync-slave-enabled=1 --sync-binlog=1
# the server is restarted
# restart: --rpl-semi-sync-slave-enabled=1
# restart: --rpl-semi-sync-slave-enabled=1 --sync-binlog=1
connection default;
#
# *** Summary: 2 rows should be present in both tables; no binlog truncation; the same # of binlog files as in B; number of binlogs at reconnect - 4:
@@ -186,4 +187,5 @@ DELETE FROM t2;
disconnect con1;
#
DROP TABLE t1, t2;
SET @@global.sync_binlog= default;
# End of the tests