Debian Codegraph @

mysql-test/suite/binlog/r/binlog_truncate_multi_log_unsafe.result

raw
1 SET @@global.max_binlog_size= 4096;
2 call mtr.add_suppression("Table '.*tm' is marked as crashed and should be repaired");
3 call mtr.add_suppression("Got an error from unknown thread");
4 call mtr.add_suppression("Checking table: '.*tm'");
5 call mtr.add_suppression("Recovering table: '.*tm'");
6 call mtr.add_suppression("Cannot truncate the binary log to file");
7 call mtr.add_suppression("Crash recovery failed");
8 call mtr.add_suppression("Can.t init tc log");
9 call mtr.add_suppression("Aborting");
10 call mtr.add_suppression("Found 1 prepared transactions");
11 call mtr.add_suppression("mysqld: Table.*tm.*is marked as crashed");
12 call mtr.add_suppression("Checking table.*tm");
13 RESET MASTER;
14 FLUSH LOGS;
15 SET @@global.sync_binlog=1;
16 CREATE TABLE ti (a INT PRIMARY KEY, b MEDIUMTEXT) ENGINE=Innodb;
17 CREATE TABLE tm (f INT) ENGINE=MYISAM;
18 INSERT INTO tm VALUES(1);
19 connect master1,localhost,root,,;
20 connect master2,localhost,root,,;
21 connect master3,localhost,root,,;
22 connection master1;
23 SET DEBUG_SYNC= "commit_after_release_LOCK_after_binlog_sync SIGNAL master1_ready WAIT_FOR master1_go_never_arrives";
24 INSERT INTO ti VALUES (5 - 1, REPEAT("x", 4100));
25 connection master2;
26 SET DEBUG_SYNC= "now WAIT_FOR master1_ready";
27 SET DEBUG_SYNC= "commit_before_get_LOCK_commit_ordered SIGNAL master2_ready WAIT_FOR master2_go_never_arrives";
28 INSERT INTO ti VALUES (5, REPEAT("x", 1));
29 connection master3;
30 SET DEBUG_SYNC= "now WAIT_FOR master2_ready";
31 SET DEBUG_SYNC= "commit_before_get_LOCK_after_binlog_sync SIGNAL master3_ready";
32 INSERT INTO tm VALUES (2);
33 connection default;
34 SET DEBUG_SYNC= "now WAIT_FOR master3_ready";
35 # The gtid binlog state prior the crash must be restored at the end of the test;
36 SELECT @@global.gtid_binlog_state;
37 @@global.gtid_binlog_state
38 0-1-9
39 # Kill the server
40 # Failed restart as the semisync slave
41 # Normal restart
42 # restart
43 FOUND 1 /Cannot truncate the binary log to file/ in mysqld.1.err
44 # Proof that the in-doubt transactions are recovered by the 2nd normal server restart
45 SELECT COUNT(*) = 5 as 'True' FROM ti;
46 True
47 1
48 SELECT COUNT(*) <= 1 FROM tm;
49 COUNT(*) <= 1
50 1
51 # The gtid binlog state prior the crash is restored now
52 SELECT @@GLOBAL.gtid_binlog_state;
53 @@GLOBAL.gtid_binlog_state
54 0-1-9
55 SELECT @@GLOBAL.gtid_binlog_pos;
56 @@GLOBAL.gtid_binlog_pos
57 0-1-9
58 # Cleanup
59 DROP TABLE ti, tm;
60 End of test