Details
-
Bug
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
11.4, 12.0(EOL), 11.8
-
None
Description
In STATEMENT format we don't log CREATE TABLE or any data which we write into it if the table is part of binlog_ignore_db. But we log statements like INSERT INTO test.t1 SELECT * FROM ignoredDB.t2 which causes replication failure on slave.
How to repeat?
opt file:
--binlog_ignore_db=ignoredDB
|
--binlog_format=statement |
mtr test file:
--source include/have_innodb.inc
|
--source include/have_binlog_format_statement.inc
|
--source include/master-slave.inc
|
|
SELECT @@binlog_format;
|
SELECT @@binlog_ignore_db;
|
|
|
CREATE DATABASE ignoredDB;
|
USE ignoredDB;
|
CREATE TABLE t1 (id INT) ENGINE=InnoDB;
|
INSERT INTO t1 VALUES (1);
|
|
|
USE test;
|
CREATE TABLE t2 (id INT) ENGINE=InnoDB;
|
INSERT INTO test.t2 SELECT * FROM ignoredDB.t1;
|
|
|
--sync_slave_with_master
|
--connection master
|
--source include/rpl_end.inc
|
Last_Errno 1146
|
Last_Error Error 'Table 'ignoredDB.t1' doesn't exist' on query. Default database: 'test'. Query: 'INSERT INTO test.t2 SELECT * FROM ignoredDB.t1'
|
Expected behavior:
In statement format we shouldn't log any query that uses objects from a binlog_ignore_db list.