[MDEV-8891] Slave replication filters do not work as excepted Created: 2015-10-03  Updated: 2015-10-09  Resolved: 2015-10-09

Status: Closed
Project: MariaDB Server
Component/s: Replication
Affects Version/s: 10.0.21
Fix Version/s: N/A

Type: Bug Priority: Major
Reporter: Vitaliy Margolen Assignee: Unassigned
Resolution: Not a Bug Votes: 0
Labels: None
Environment:

OpenSuSE 13.2



 Description   

Have a replication slave setup with following configuration:

[mysqld]
replicate-rewrite-db = APPLICATION->APPLICATION_QA
 
replicate-wild-do-table = APPLICATION.%
replicate-wild-do-table = APPLICATION_QA.%
 
replicate-wild-ignore-table=APPLICATION_QA.%_tmp
replicate-wild-ignore-table=APPLICATION_QA.%_old
replicate-wild-ignore-table=APPLICATION_QA.%upload
 
replicate-wild-ignore-table=APPLICATION.%_tmp
replicate-wild-ignore-table=APPLICATION.%_old
replicate-wild-ignore-table=APPLICATION.%upload

The intention is to replicate only one specific schema but renaming it (from APPLICATION to APPLICATION_QA). However need to filter some tables. In the example above its %_tmp, %_old, %upload.

The problem: all tables from master's APPLICATION schema are being replicated.



 Comments   
Comment by Elena Stepanova [ 2015-10-09 ]

Vitaliy,

It appears you are misusing the options.
First, if you check the description of replicate-rewrite-db option, it says that the replacement is performed before other replicate- rules are applied; so, your table-level rules might be totally ignored.

Second, even regardless the replacement, using both replicate-wild-do- and replicate-wild-ignore- is an overuse that defeats the purpose. According to the diagram for this options, do has precedence, and if your tables match the pattern, ignore won't be applied at all. But you don't need do, if you make it match ALL tables in the schema; you would want the database-level options instead.

Generated at Thu Feb 08 07:30:34 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.