Bug #64562 replicate-do-db: inconsistency between actual behaviour and docs
Submitted: 6 Mar 2012 10:32 Modified: 23 Mar 2012 12:11
Reporter: Denis Kukharev Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server: Documentation Severity:S3 (Non-critical)
Version:5.5 OS:Any
Assigned to: Jon Stephens CPU Architecture:Any
Tags: inconsistency, replicate-do-db, replication, table options

[6 Mar 2012 10:32] Denis Kukharev
Description:
Hi!
A common way to set up simple replication at slave side is to provide several replicate-do-db options. Let's assume in addition that we have no table options at all. All works fine and reasonable, namely if an event's DB doesn't match any one provided in replicate-do-db list, the event will be rejected.

However, this doc page http://dev.mysql.com/doc/refman/5.5/en/replication-rules-table-options.html says, first:
"The slave checks for and evaluates table options only if no matching database options were found" (that is the case) and  second, that if no table option is given (that is the case, too) then the update WILL be executed. This is applicable for the activity diagram provided on the page and its step-by-step description below.

I believe (and hope) the bug is in the documentation itself rather than in MySQL functionality.

How to repeat:
1. set up simple master-slave replication with only DB-level (replicate-do-db) options on slave.
2. execute SBR statement on master having default DB set to not match any DB given in slave's replicate-do-db list.
3. compare slave behaviour to the documentation

Suggested fix:
Update the documentation
[6 Mar 2012 12:35] Sveta Smirnova
Thank you for the report.

Verified as described: if look at the diagram only one can think if there is no replicate-*-table option is given statement will be executed independently if replicate-do-db option was set or not.
[6 Mar 2012 14:04] Denis Kukharev
Sveta, having taken the text above the diagram into account (about pre-checking db-level options) as I've described and everyone should :), one can think an update is to be executed, too.
[23 Mar 2012 12:11] Jon Stephens
Duplicate of BUG#60188. 

(NB-That bug refers to the binlog versions of these options, but we will review the docs for all the the *db* filtering options in the course of fixing that issue.)