Bug #99374 replicate-do-db ignoring create table
Submitted: 27 Apr 2020 21:02 Modified: 28 Apr 2020 10:07
Reporter: Vinicius Malvestio Grippa Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:5.7.29 OS:Any
Assigned to: MySQL Verification Team CPU Architecture:Any

[27 Apr 2020 21:02] Vinicius Malvestio Grippa
Description:
The test case below:

# master
mysql> create table tracking.vinni_test (i int primary key);                                                                                                       Query OK, 0 rows affected (0.02 sec)

mysql> select @@version;
+-----------------------------+
| @@version                   |
+-----------------------------+
| 5.7.29-0ubuntu0.16.04.1-log |
+-----------------------------+
1 row in set (0.00 sec)

Shows the command on the binary log:

SET @@SESSION.GTID_NEXT= 'ANONYMOUS'/*!*/;
--
SET TIMESTAMP=1588021067/*!*/;
/*!\C utf8 *//*!*/;
SET @@session.character_set_client=33,@@session.collation_connection=33,@@session.collation_server=8/*!*/;
create table tracking.vinni_test (i int primary key)
/*!*/;
# at 41790600
#200427 20:57:48 server id 1  end_log_pos 41790665 CRC32 0x4d730ce5 	Anonymous_GTID	last_committed=7965	sequence_number=7966	rbr_only=no
SET @@SESSION.GTID_NEXT= 'ANONYMOUS'/*!*/;

And on the relay log:
SET @@session.character_set_client=33,@@session.collation_connection=33,@@session.collation_server=8/*!*/;
create table tracking.vinni_test (i int primary key)
/*!*/;
# at 7643234
#200427 20:57:48 server id 1  end_log_pos 41790665 CRC32 0x4d730ce5 	Anonymous_GTID	last_committed=7965	sequence_number=7966	rbr_only=no
SET @@SESSION.GTID_NEXT= 'ANONYMOUS'/*!*/;

and the show slave status

              Master_Log_File: mysql-bin.003996
          Read_Master_Log_Pos: 44053815
               Relay_Log_File: massive001-relay-bin.000248
                Relay_Log_Pos: 9906449
        Relay_Master_Log_File: mysql-bin.003996
             Slave_IO_Running: Yes
            Slave_SQL_Running: Yes
              Replicate_Do_DB: modelo,historico,tracking

And the table is not present.

How to repeat:
The test was provided above. 

Suggested fix:
Replica the DDL.
[28 Apr 2020 10:07] MySQL Verification Team
Hi,

This is not a bug but designed behavior.

Instead of 

> create table tracking.vinni_test (i int primary key);

do 

> USE tracking;
> create table vinni_test (i int primary key);

kind regards
Bogdan