What's the detail of BinLogStreamReader's option "only_schemas"?

119 views
Skip to first unread message

郭枫

unread,
Jan 8, 2018, 3:06:24 AM1/8/18
to Python MySQL replication
From BinLogStreamReader Doc, BinLogStreamReader has an option "only_schemas=None", I wonder which method does  Python-MySQL-replication use to limit just  the schema I want, for example: if a binlog file countains testA、testB、testC three databases, and I just write "only_schemas=testA"~

Method 1: Python-MySQL-replication read binlog and parse all three
database
-- testAtestBtestC, but just gives the sql that contains testA
method
 
2: Python-MySQL-replication encode text 'testA' to binary format text
MySQL use for binlog, then read binlog and find binary section that
contains encoded text
'testA', then convert  binary section to sql


Julien Duponchelle

unread,
Jan 8, 2018, 4:49:49 PM1/8/18
to 郭枫, Python MySQL replication
Hi,

The lib don't convert to SQL it's read the binlog entry. If it's SQL it's return SQL otherwise it's parse the event.

If you choose to ignore a schema only the event header is read but it will parse event details (like updated row).

--
You received this message because you are subscribed to the Google Groups "Python MySQL replication" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python-mysql-repli...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages