mirror of
https://github.com/MariaDB/server.git
synced 2025-01-30 18:41:56 +01:00
55a7159f53
MDEV-4725: Incorrect binlog state recovery if crash while writing event group The binlog state was not recovered correctly if XA is not used (eg. InnoDB disabled), or if server crashed in the middle of writing an event group to the binlog. With this patch, we ensure that recovery of binlog state is done even if we do not do the full XA binlog recovery, and we ensure that we only recover fully written event groups into the binlog state.
24 lines
589 B
Text
24 lines
589 B
Text
include/rpl_init.inc [topology=1->2]
|
|
*** Test crashing master with InnoDB disabled, the binlog gtid state should still be correctly recovered. ***
|
|
CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=MyISAM;
|
|
include/stop_slave.inc
|
|
CHANGE MASTER TO master_use_gtid=slave_pos;
|
|
include/start_slave.inc
|
|
INSERT INTO t1 VALUES (1);
|
|
INSERT INTO t1 VALUES (2);
|
|
SELECT * FROM t1 ORDER BY a;
|
|
a
|
|
1
|
|
2
|
|
FLUSH TABLES;
|
|
SET SESSION debug_dbug="+d,crash_dispatch_command_before";
|
|
SELECT 1;
|
|
Got one of the listed errors
|
|
INSERT INTO t1 VALUES (3);
|
|
SELECT * FROM t1 ORDER BY a;
|
|
a
|
|
1
|
|
2
|
|
3
|
|
DROP TABLE t1;
|
|
include/rpl_end.inc
|