FILTER_...LBINLOG(1p)

πŸ“¦
version 0.58 Β· 3 versions
, in debian trixie, ubuntu noble, ubuntu questing

πŸ’– 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:

  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

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. ROLLBACK a ROLLBACK statement is written to the binary log to rollback transactional queries. that's a normal situation, bestie. so filter_mysqlbinlog must 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