[MDEV-12498] wild-do-table doesn't work for multisource replication with rewriten database name Created: 2017-04-13  Updated: 2017-05-01  Resolved: 2017-05-01

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

Type: Bug Priority: Major
Reporter: Hussain Akbar Assignee: Unassigned
Resolution: Not a Bug Votes: 0
Labels: multisource, replication
Environment:

RedHat 7



 Description   

Two masters, one slave. All are running MariaDB 10,1.

Slave's my.cnf:
m1.replicate-rewrite-db=testdb->m1testdb
replicate-do-db=m1testdb
replicate-wild-do-table=m1testdb.%

m2.replicate-rewrite-db=testdb->m2testdb
replicate-do-db=m2testdb
replicate-wild-do-table=m2testdb.%

Inserting, updating & deleting on the masters work and changes are replicated to the slave but only when testdb is current db and the table name is unqualified.

insert into testdb.testtable values(1,2,3) <-- Does NOT work whether testdb is current or not
insert into testtable values(1,2,3) <-- Works



 Comments   
Comment by Hussain Akbar [ 2017-04-17 ]

Sorry, should have checked better.

This behaviour was resulting due to binlog format. I was going by the MySQL documentation which stated that the default is 'row'. Apparently, it is not. Setting the format explicitly on the masters fixed this.

Comment by Elena Stepanova [ 2017-05-01 ]

In MariaDB before 10.2 the default binlog format is STATEMENT. Starting from 10.2 the default format is MIXED.

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