diff options
author | Luis Soares <luis.soares@sun.com> | 2009-09-24 15:52:52 +0100 |
---|---|---|
committer | Luis Soares <luis.soares@sun.com> | 2009-09-24 15:52:52 +0100 |
commit | 9ae9f84ef45b57e29c328f9449004c07f8a62e3a (patch) | |
tree | 853b60ee4d659a71d405efc7d93c0968b3f44bd5 /sql/sql_class.cc | |
parent | e3f7f7a5c9a0a13440793416d0ce6bf5da9d697d (diff) | |
download | mariadb-git-9ae9f84ef45b57e29c328f9449004c07f8a62e3a.tar.gz |
BUG#42829: binlogging enabled for all schemas regardless of
binlog-db-db / binlog-ignore-db
InnoDB will return an error if statement based replication is used
along with transaction isolation level READ-COMMITTED (or weaker),
even if the statement in question is filtered out according to the
binlog-do-db rules set. In this case, an error should not be printed.
This patch addresses this issue by extending the existing check in
external_lock to take into account the filter rules before deciding to
print an error. Furthermore, it also changes decide_logging_format to
take into consideration whether the statement is filtered out from
binlog before decision is made.
sql/sql_base.cc:
Changed the check on decide_logging_format to take into account
whether statement is filtered or not in SBR.
sql/sql_class.cc:
Added the thd_binlog_filter_ok to INNODB_COMPATIBILITY_HOOKS set.
storage/innobase/handler/ha_innodb.cc:
Extended check in external_lock to take into consideration the
filtering when deciding to throw an error.
storage/innobase/handler/ha_innodb.h:
Added declaration of new hook.
storage/innodb_plugin/handler/ha_innodb.cc:
Extended check in external_lock to take into consideration the
filtering when deciding to throw an error.
storage/innodb_plugin/handler/ha_innodb.h:
Added declaration of new hook.
Diffstat (limited to 'sql/sql_class.cc')
-rw-r--r-- | sql/sql_class.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sql/sql_class.cc b/sql/sql_class.cc index 3f568566c89..9269e97cc4c 100644 --- a/sql/sql_class.cc +++ b/sql/sql_class.cc @@ -42,6 +42,7 @@ #include "sp_rcontext.h" #include "sp_cache.h" +#include "rpl_filter.h" /* The following is used to initialise Table_ident with a internal @@ -2980,6 +2981,11 @@ extern "C" void thd_mark_transaction_to_rollback(MYSQL_THD thd, bool all) { mark_transaction_to_rollback(thd, all); } + +extern "C" bool thd_binlog_filter_ok(const MYSQL_THD thd) +{ + return binlog_filter->db_ok(thd->db); +} #endif // INNODB_COMPATIBILITY_HOOKS */ /**************************************************************************** |