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

binlog-do-db bypassed by 'create table' DDL

    Details

      Description

      my.cnf (full file attached)

      ...
      binlog-format                  = ROW
      binlog-do-db                   = test_db1
      binlog-do-db                   = test_db2
      ...
      

      Test case:

      Server version: 10.0.19-MariaDB-log MariaDB Server
      
      Copyright (c) 2000, 2015, Oracle, MariaDB Corporation Ab and others.
      
      Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
      
      MariaDB [(none)]> create database test_db1;
      Query OK, 1 row affected (0.00 sec)
      
      MariaDB [(none)]> create database test_db2;
      Query OK, 1 row affected (0.00 sec)
      
      MariaDB [(none)]> create database test_db3;
      Query OK, 1 row affected (0.00 sec)
      
      MariaDB [(none)]> create table test_db1.t(i int);
      Query OK, 0 rows affected (0.00 sec)
      
      MariaDB [(none)]> create table test_db2.t(i int);
      Query OK, 0 rows affected (0.01 sec)
      
      MariaDB [(none)]> create table test_db3.t(i int);
      Query OK, 0 rows affected (0.01 sec)
      
      MariaDB [(none)]> insert into test_db1.t values (1);
      Query OK, 1 row affected (0.00 sec)
      
      MariaDB [(none)]> insert into test_db2.t values (1);
      Query OK, 1 row affected (0.00 sec)
      
      MariaDB [(none)]> insert into test_db3.t values (1);
      Query OK, 1 row affected (0.00 sec)
      

      Relevant entries in binlog (full file attached)

      create database test_db1
      create database test_db2
      create table test_db1.t(i int)
      create table test_db2.t(i int)
      create table test_db3.t(i int)
      ### INSERT INTO `test_db1`.`t`
      ### INSERT INTO `test_db2`.`t`
      

      Even though test_db3 is not included in binlog-do-db options, 'create table test_db3.t(i int)' is logged.

      TIA

        Gliffy Diagrams

          Attachments

            Activity

            Hide
            elenst Elena Stepanova added a comment - - edited

            Thanks for the report.

            It is most likely a change in behavior introduced by the upstream fix for MySQL#60188. The bug was about binlog-ignore-db option, but apparently the fix affected binlog-do-db as well. I don't know if it was intentional, but I doubt that since the current behavior is weird. At the very least, it does not seem to correspond the description of binlog-do-db in the MySQL manual.

            For upstream bugs, our normal routine is to report them at bugs.mysql.com, see how they are handled there, and then take actions accordingly.
            There might already be such bug report there, but it's not easy to find due to the generic nature of the problem.

            Carol,
            Are you willing to report the bug to MySQL, or should we do it on your behalf?

            Show
            elenst Elena Stepanova added a comment - - edited Thanks for the report. It is most likely a change in behavior introduced by the upstream fix for MySQL#60188 . The bug was about binlog-ignore-db option, but apparently the fix affected binlog-do-db as well. I don't know if it was intentional, but I doubt that since the current behavior is weird. At the very least, it does not seem to correspond the description of binlog-do-db in the MySQL manual . For upstream bugs, our normal routine is to report them at bugs.mysql.com, see how they are handled there, and then take actions accordingly. There might already be such bug report there, but it's not easy to find due to the generic nature of the problem. Carol , Are you willing to report the bug to MySQL, or should we do it on your behalf?

              People

              • Assignee:
                Unassigned
                Reporter:
                carolmazoy Carol
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated: