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

Stored procedures are replicated unexpectedly

    XMLWordPrintable

Details

    Description

      We are using multi-source replication and observed in MDEV-10652 that stored procedures are replicated unconditionally.

      The setup includes:

      1. ROW-based binary logs at masters. Masters are MySQL 5.6 at AWS RDS and standalone MariaDB 10.1.x.
      2. Slave channel configuration:

      foo.replicate_wild_do_table = foo.%
      foo.replicate_ignore_table = foo.beep
      foo.replicate_ignore_table = foo.tmp
      

      What seems correct: changes to the foo database are replicated, changes to the mysql database or any other databases are ignored, GRANT, REVOKE are ignored, procedures bound to the foo database are replicated (DROP PROCEDURE foo.xxx, CREATE PROCEDURE foo.xxx, etc.).

      What seems wrong: procedures bound to other databases are replicated as well regardless of replication options. E. i. DROP PROCEDURE mysql.yyy and CREATE PROCEDURE mysql.yyy is executed on the slave.

      I tried various replication options like do-db, ignore-db and setting default database before working with procedures on the master, and this made no difference. E. g.:

      USE mysql;
      CREATE PROCEDURE yyy ...;
      

      I think since the user managment commands (GRANT, REVOKE) are ignored in this setup, procedures bound to other databases should be ignored as well.

      Usage of sql_log_bin=0; is not an option, because it may require the SUPER privilege and would break other slaves that are supposed to replicate the entire master. Same for @@skip_replication which is in addition a MariaDB-specific feature.

      Attachments

        Issue Links

          Activity

            People

              greenman Ian Gilfillan
              ip1981 Igor Pashev
              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.