FILTER_...LBINLOG(1p)
π FILTER_MYSQLBINLOG π
okay bestie, gather round, because we're talking about filter_mysqlbinlog β a little Perl script from the FILTER_...LBINLOG(1p) corner of the manual, and honestly? she's retired. π
β¨ NAME β¨
filter_mysqlbinlog β trims out the ROLLBACK statements and the equivalent BINLOG events that mysqlbinlog likes to sneak in. and yeah, this script is now obsolete, no cap.
πΈ SYNOPSIS πΈ
mysqlbinlog binary_or_relay_log_file | filter_mysqlbinlog
not me having to tell you twice: this script is now obsolete and is not used by MHA by default. periodt. π
π¦ DESCRIPTION π¦
so here's the lore. the mysqlbinlog command that Oracle ships implicitly adds ROLLBACK statements and equivalent BINLOG events. sounds harmless, right? wrong. π it causes problems when you're recovering slave servers.
to recover slaves, MHA might need to apply the following binlog events:
- Relay log events from
Relay_Log_Posto the end of the relay log file - Differential relay log events from the latest slave
- Differential binary log events from the dead master
and the mysqlbinlog command needs to be executed on these files separately. so if a transaction does not end by 1) or 2), that implicit ROLLBACK event rolls back the transaction, which will result in inconsistency. it's giving chaos. it's giving data corruption energy. π
that's the whole reason filter_mysqlbinlog exists β it's a tool to fix this issue. she's the cleanup crew. π§
β οΈ but WAIT. plot twist. ROLLBACK statements themselves are added in usual situations too. for example, when you execute: 1.BEGIN;2. Updating transactional tables 3. Updating non-transactional tables 4.ROLLBACKa ROLLBACK statement is written to the binary log to rollback transactional queries. that's a normal situation, bestie. sofilter_mysqlbinlogmust not remove all ROLLBACK events. she's picky about which ones she deletes. she has standards. π
and one more time for the people in the back: this script is now obsolete and is not used by MHA by default. π«Ά
π SEE ALSO π
nothing here, bestie β the original didn't list any references, so we're not inventing any. no guessing, that's the rule. π
and that's the tea, fr fr. this page came to you courtesy of User Contributed Perl Documentation, running on perl v5.36.0, dated 2023-10-03. iconic of her to still be documented while being fully obsolete. slay. β¨ππ
π¦ where this page comes from
- debian trixie: mha4mysql-node 0.58-2 Β· GPL-2.0-or-later
- ubuntu noble: mha4mysql-node 0.58-2 Β· GPL-2.0-or-later
- ubuntu questing: mha4mysql-node 0.58-2
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms