Bug #17188 CRBR: ignores --binlog_ignore_db= settings

parent 53040a07
......@@ -8,12 +8,12 @@ create database mysqltest;
use mysqltest;
create table t1 (a int primary key) engine=ndb;
create table t2 (a int primary key) engine=ndb;
show binlog events from 102;
show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin1.000001 # Query # # create database mysqltest
master-bin1.000001 # Query # # use `mysqltest`; create table t1 (a int primary key) engine=ndb
master-bin1.000001 # Query # # use `test`; create table t2 (a int primary key) engine=ndb
show binlog events from 102;
show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # create database mysqltest
master-bin.000001 # Query # # use `mysqltest`; create table t1 (a int primary key) engine=ndb
......@@ -21,7 +21,7 @@ master-bin.000001 # Query # # use `test`; create table t2 (a int primary key) en
reset master;
reset master;
alter table t2 add column (b int);
show binlog events from 102;
show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin1.000001 # Query # # BEGIN
master-bin1.000001 # Table_map # # cluster_replication.apply_status
......@@ -32,7 +32,7 @@ reset master;
reset master;
ALTER DATABASE mysqltest CHARACTER SET latin1;
drop table mysqltest.t1;
show binlog events from 102;
show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # ALTER DATABASE mysqltest CHARACTER SET latin1
master-bin.000001 # Query # # BEGIN
......@@ -46,7 +46,7 @@ use test;
insert into t2 values (1,2);
drop database mysqltest;
create table t1 (a int primary key) engine=ndb;
show binlog events from 102;
show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin1.000001 # Query # # BEGIN
master-bin1.000001 # Table_map # # cluster_replication.apply_status
......@@ -88,7 +88,7 @@ ENGINE = NDB;
DROP LOGFILE GROUP lg1
ENGINE =NDB;
drop table t1;
show binlog events from 102;
show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin1.000001 # Query # # CREATE LOGFILE GROUP lg1
ADD UNDOFILE 'undofile.dat'
......
drop table if exists t1;
drop database if exists mysqltest;
create database mysqltest;
use mysqltest;
create table t1 (a int primary key, b int) engine=ndb;
insert into t1 values (1, 1);
show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # use `test`; drop table if exists t1
drop database mysqltest;
......@@ -33,10 +33,12 @@ create table t1 (a int primary key) engine=ndb;
--connection server2
create table t2 (a int primary key) engine=ndb;
--replace_result $binlog_start <binlog_start>
--replace_column 2 # 4 # 5 #
--eval show binlog events from $binlog_start
--connection server1
--replace_result $binlog_start <binlog_start>
--replace_column 2 # 4 # 5 #
--eval show binlog events from $binlog_start
......@@ -51,6 +53,7 @@ reset master;
alter table t2 add column (b int);
--connections server1
--replace_result $binlog_start <binlog_start>
--replace_column 2 # 4 # 5 #
--eval show binlog events from $binlog_start
......@@ -70,6 +73,7 @@ ALTER DATABASE mysqltest CHARACTER SET latin1;
drop table mysqltest.t1;
--connection server1
--replace_result $binlog_start <binlog_start>
--replace_column 2 # 4 # 5 #
--eval show binlog events from $binlog_start
......@@ -87,6 +91,7 @@ drop database mysqltest;
create table t1 (a int primary key) engine=ndb;
--connection server2
--replace_result $binlog_start <binlog_start>
--replace_column 2 # 4 # 5 #
--eval show binlog events from $binlog_start
......@@ -139,5 +144,6 @@ ENGINE =NDB;
drop table t1;
--connection server2
--replace_result $binlog_start <binlog_start>
--replace_column 2 # 4 # 5 #
--eval show binlog events from $binlog_start
-- source include/have_ndb.inc
-- source include/have_binlog_format_row.inc
--let $binlog_start=102
--disable_warnings
drop table if exists t1;
drop database if exists mysqltest;
--enable_warnings
create database mysqltest;
use mysqltest;
create table t1 (a int primary key, b int) engine=ndb;
insert into t1 values (1, 1);
--replace_result $binlog_start <binlog_start>
--replace_column 2 # 4 # 5 #
--eval show binlog events from $binlog_start
drop database mysqltest;
......@@ -20,6 +20,7 @@
#ifdef HAVE_NDB_BINLOG
#include "rpl_injector.h"
#include "rpl_filter.h"
#include "slave.h"
#include "ha_ndbcluster_binlog.h"
......@@ -2019,6 +2020,12 @@ ndbcluster_create_event_ops(NDB_SHARE *share, const NDBTAB *ndbtab,
DBUG_RETURN(0);
}
if (!binlog_filter->db_ok(share->db))
{
share->flags|= NSF_NO_BINLOG;
DBUG_RETURN(0);
}
if (share->op)
{
assert(share->op->getCustomData() == (void *) share);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment