1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

BUG#42851: Spurious "Statement is not safe to log in statement

format." warnings
      
Despite the fact that a statement would be filtered out from binlog, a
warning would still be thrown if it was issued with the LIMIT.
      
This patch addresses this issue by checking the filtering rules before
printing out the warning.
This commit is contained in:
Luis Soares
2009-06-27 14:18:47 +01:00
parent 4c1333e6ed
commit 92536e4213
4 changed files with 107 additions and 1 deletions

View File

@ -27,6 +27,7 @@
#include "mysql_priv.h"
#include "rpl_rli.h"
#include "rpl_filter.h"
#include "rpl_record.h"
#include "slave.h"
#include <my_bitmap.h>
@ -3684,7 +3685,8 @@ int THD::binlog_query(THD::enum_binlog_query_type qtype, char const *query_arg,
we should print a warning.
*/
if (sql_log_bin_toplevel && lex->is_stmt_unsafe() &&
variables.binlog_format == BINLOG_FORMAT_STMT)
variables.binlog_format == BINLOG_FORMAT_STMT &&
binlog_filter->db_ok(this->db))
{
/*
A warning can be elevated a error when STRICT sql mode.