SYNOPSIS

mysqlbinlog binary_or_relay_log_file | filter_mysqlbinlog

Note that this script is now obsolete and not used by \s-1MHA\s0 by default.

DESCRIPTION

mysqlbinlog command provided by Oracle implicitly adds \s-1ROLLBACK\s0 statements and equivalent \s-1BINLOG\s0 events. But this causes problems when recovering slave servers. To recover slaves, \s-1MHA\s0 might need to apply the following binlog events. 1) Relay log events from Relay_Log_Pos to the end of the relay log file 2) Differential relay log events from the latest slave 3) Differential binary log events from the dead master mysqlbinlog command needs to be executed on these files separately. If a transaction does not end by 1) or 2), implicit \s-1ROLLBACK\s0 event rolls back the transaction, which will result in inconsistency. filter_mysqlbinlog is a tool to fix this issue. Note that \s-1ROLLBACK\s0 statements themselves are added in usual situations. For example, when you execute 1. \s-1BEGIN\s0; 2. Updating transactional tables 3. Updating non-transactional tables 4. \s-1ROLLBACK\s0, a \s-1ROLLBACK\s0 statement is written to the binary log to rollback transactional queries. This is normal situation so filter_mysqlbinlog must not remove all \s-1ROLLBACK\s0 events.

Note that this script is now obsolete and not used by \s-1MHA\s0 by default.