diff options
author | Andrei Elkin <aelkin@mysql.com> | 2008-09-03 13:01:18 +0300 |
---|---|---|
committer | Andrei Elkin <aelkin@mysql.com> | 2008-09-03 13:01:18 +0300 |
commit | 2f8c0a16754147d451a0472866cc78e116f318cf (patch) | |
tree | ba4636ffd73b34acee8e5d4e18c542b0f5ddb364 /sql/log_event.cc | |
parent | 8b0e99fe26db6c41ae4bdddd31777e1f63638efe (diff) | |
download | mariadb-git-2f8c0a16754147d451a0472866cc78e116f318cf.tar.gz |
Bug#36099 replicate-do-db affects replaying RBR events with mysqlbinlog
The replication filtering rules were inappropiately applied when
executing BINLOG pseudo-query. The rules are supposed to be active
only at times when the slave's sql thread executes an event.
Fixed with correcting a condition to call replication rules only if
the slave sql thread executes the event.
mysql-test/suite/rpl/r/rpl_binlog_query_filter_rules.result:
new result file
mysql-test/suite/rpl/t/rpl_binlog_query_filter_rules-master.opt:
a filtering option that would refuse to replicate a row event of the main test on
slave
mysql-test/suite/rpl/t/rpl_binlog_query_filter_rules.test:
a regression test for the bug
sql/log_event.cc:
avoiding to call the filtering rules if the execution thread is not a slave.
Diffstat (limited to 'sql/log_event.cc')
-rw-r--r-- | sql/log_event.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sql/log_event.cc b/sql/log_event.cc index d2e45adbe0e..27e81c8ecd3 100644 --- a/sql/log_event.cc +++ b/sql/log_event.cc @@ -7843,8 +7843,9 @@ int Table_map_log_event::do_apply_event(Relay_log_info const *rli) int error= 0; - if (!rpl_filter->db_ok(table_list->db) || - (rpl_filter->is_on() && !rpl_filter->tables_ok("", table_list))) + if (rli->sql_thd->slave_thread /* filtering is for slave only */ && + (!rpl_filter->db_ok(table_list->db) || + (rpl_filter->is_on() && !rpl_filter->tables_ok("", table_list)))) { my_free(memory, MYF(MY_WME)); } |