Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-12498

wild-do-table doesn't work for multisource replication with rewriten database name

Details

    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

      Attachments

        Activity

          Hussain Hussain Akbar added a comment -

          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.

          Hussain Hussain Akbar added a comment - 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.

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

          elenst Elena Stepanova added a comment - In MariaDB before 10.2 the default binlog format is STATEMENT. Starting from 10.2 the default format is MIXED.

          People

            Unassigned Unassigned
            Hussain Hussain Akbar
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.