Bug #87843 mysqlbinlog should allow filtering by table
Submitted: 22 Sep 2017 14:59 Modified: 26 Sep 2017 12:14
Reporter: Sheeri Cabral (Candidate Quality Contributor) Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server: Replication Severity:S4 (Feature request)
Version:5.7 OS:Any
Assigned to: CPU Architecture:Any

[22 Sep 2017 14:59] Sheeri Cabral
Description:
I would love to be able to filter mysql binlog events by table. The replication process can do/ignore based on table name, but I'd love to be able to use the mysqlbinlog tool to extract only certain tables.

grep doesn't quite do the job because there's no defined # of lines in a binlog event. I can make a kind of parser using awk (or more complex in perl), to indicate new events start at "# at POSITION", but that's a hack.

How to repeat:
neither the manual nor mysqlbinlog --help show any way to extract events based on tables.

Suggested fix:
Something like the following command, to extract full events from only the table.

mysqlbinlog --tables foo,bar,baz mysql-bin.000001
[26 Sep 2017 12:14] MySQL Verification Team
Hello Sheeri,

Thank you for the reasonable feature request!
This reminds me of a similar feature request from Simon - Bug #70263.
Marking this as duplicate of Bug #70263 for now.

Regards,
Umesh