[MDEV-8175] binlog-do-db bypassed by 'create table' DDL Created: 2015-05-18  Updated: 2022-09-08

Status: Confirmed
Project: MariaDB Server
Component/s: Replication
Affects Version/s: 10.0.19, 5.1.73, 5.5, 10.0, 10.1
Fix Version/s: 5.5, 10.1

Type: Bug Priority: Minor
Reporter: Carol Assignee: Sergei Golubchik
Resolution: Unresolved Votes: 0
Labels: upstream-wontfix

Attachments: File my.cnf     File mysql-bin.000003    
Sprint: 5.5.48-0

 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



 Comments   
Comment by Elena Stepanova [ 2015-05-18 ]

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.

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

Comment by Elena Stepanova [ 2015-10-21 ]

Meanwhile, somebody has already reported it upstream: https://bugs.mysql.com/bug.php?id=77673

Comment by Daniel Black [ 2018-01-01 ]

Upstream updated documentation to map to exhibited behaviour.

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