Bug #94727 Replicate_Wild_Ignore_Table is not working for cross database query
Submitted: 20 Mar 2019 20:23 Modified: 28 Mar 2019 9:46
Reporter: Michal Vrabel Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server: Replication Severity:S2 (Serious)
Version:8.0.15 OS:CentOS (7.6.1810/x86_64)
Assigned to: MySQL Verification Team CPU Architecture:x86
Tags: ignore database

[20 Mar 2019 20:23] Michal Vrabel
Description:
Replication with this ignore settings:

SHOW SLAVE STATUS (on all servers in replication)
Replicate_Ignore_DB:  db_tmp
Replicate_Wild_Ignore_Table: db_tmp.%

binlog_format   = MIXED

Do not ignore cross db query.

How to repeat:
USE db;
CREATE TABLE db_tmp.test (`test_id` int NOT NULL);
also
CREATE TABLE `db_tmp`.test (`test_id` int NOT NULL);

... will be replicated ... (incorrect behavior, I think)

USE db_tmp;
CREATE TABLE db_tmp.test (`test_id` int NOT NULL);
also
CREATE TABLE test (`test_id` int NOT NULL);

... will NOT be replicated (correct behavior).

Suggested fix:
Ignore cross db query for replication.
[20 Mar 2019 20:26] Michal Vrabel
=>serious severity
[20 Mar 2019 20:32] Michal Vrabel
OS/CPU added.
[28 Mar 2019 9:46] MySQL Verification Team
Hi,

This is not a bug.

As documented filters only look at the "default" database in the moment query is executed, not the "affected" database.

all best
Bogdan