1
0
mirror of https://github.com/MariaDB/server.git synced 2025-05-02 19:25:03 +03:00
mariadb/mysql-test/suite/binlog/r/binlog_truncate_multi_log_unsafe.result
Sujatha 583516bbb9 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
2021-08-13 14:01:26 +05:30

61 lines
2.3 KiB
Plaintext

SET @@global.max_binlog_size= 4096;
call mtr.add_suppression("Table '.*tm' is marked as crashed and should be repaired");
call mtr.add_suppression("Got an error from unknown thread");
call mtr.add_suppression("Checking table: '.*tm'");
call mtr.add_suppression("Recovering table: '.*tm'");
call mtr.add_suppression("Cannot truncate the binary log to file");
call mtr.add_suppression("Crash recovery failed");
call mtr.add_suppression("Can.t init tc log");
call mtr.add_suppression("Aborting");
call mtr.add_suppression("Found 1 prepared transactions");
call mtr.add_suppression("mysqld: Table.*tm.*is marked as crashed");
call mtr.add_suppression("Checking table.*tm");
RESET MASTER;
FLUSH LOGS;
SET @@global.sync_binlog=1;
CREATE TABLE ti (a INT PRIMARY KEY, b MEDIUMTEXT) ENGINE=Innodb;
CREATE TABLE tm (f INT) ENGINE=MYISAM;
INSERT INTO tm VALUES(1);
connect master1,localhost,root,,;
connect master2,localhost,root,,;
connect master3,localhost,root,,;
connection master1;
SET DEBUG_SYNC= "commit_after_release_LOCK_after_binlog_sync SIGNAL master1_ready WAIT_FOR master1_go_never_arrives";
INSERT INTO ti VALUES (5 - 1, REPEAT("x", 4100));
connection master2;
SET DEBUG_SYNC= "now WAIT_FOR master1_ready";
SET DEBUG_SYNC= "commit_before_get_LOCK_commit_ordered SIGNAL master2_ready WAIT_FOR master2_go_never_arrives";
INSERT INTO ti VALUES (5, REPEAT("x", 1));
connection master3;
SET DEBUG_SYNC= "now WAIT_FOR master2_ready";
SET DEBUG_SYNC= "commit_before_get_LOCK_after_binlog_sync SIGNAL master3_ready";
INSERT INTO tm VALUES (2);
connection default;
SET DEBUG_SYNC= "now WAIT_FOR master3_ready";
# The gtid binlog state prior the crash must be restored at the end of the test;
SELECT @@global.gtid_binlog_state;
@@global.gtid_binlog_state
0-1-9
# Kill the server
# Failed restart as the semisync slave
# Normal restart
# restart
FOUND 1 /Cannot truncate the binary log to file/ in mysqld.1.err
# Proof that the in-doubt transactions are recovered by the 2nd normal server restart
SELECT COUNT(*) = 5 as 'True' FROM ti;
True
1
SELECT COUNT(*) <= 1 FROM tm;
COUNT(*) <= 1
1
# The gtid binlog state prior the crash is restored now
SELECT @@GLOBAL.gtid_binlog_state;
@@GLOBAL.gtid_binlog_state
0-1-9
SELECT @@GLOBAL.gtid_binlog_pos;
@@GLOBAL.gtid_binlog_pos
0-1-9
# Cleanup
DROP TABLE ti, tm;
End of test