A few days ago, a friend of mine asked me if I knew of a way of
filtering a bunch of binary logs, to extract only statements
related to a single table. The task was about filtering a few
hundred binary log files.
It's a tricky problem. Even with my experience with regular expressions, I knew that using a script to extract statements related to a single table was going to be a nasty business.
However, I know of an entity that can filter by table name efficiently, and that's the MySQL replication system. So I suggested using replication to a sandbox with a replicate-wild-do-table statement to get the job done.
My friend was …