diff options
-rw-r--r-- | mysql-test/suite/binlog/r/binlog_stm_unsafe_warning.result | 2 | ||||
-rw-r--r-- | sql/sql_class.cc | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/mysql-test/suite/binlog/r/binlog_stm_unsafe_warning.result b/mysql-test/suite/binlog/r/binlog_stm_unsafe_warning.result index 65f2d9d2510..87ffb6cdd9f 100644 --- a/mysql-test/suite/binlog/r/binlog_stm_unsafe_warning.result +++ b/mysql-test/suite/binlog/r/binlog_stm_unsafe_warning.result @@ -67,7 +67,7 @@ DROP TABLE t1; SET GLOBAL log_warnings = @old_log_warnings; # Count the number of times the "Unsafe" message was printed # to the error log. -Occurrences: 0 +Occurrences: 1 create table t1 (n1 int, n2 int, n3 int, key (n1, n2, n3), key (n2, n3, n1), diff --git a/sql/sql_class.cc b/sql/sql_class.cc index 29ed59b2c34..482178e80b5 100644 --- a/sql/sql_class.cc +++ b/sql/sql_class.cc @@ -6145,7 +6145,7 @@ void THD::issue_unsafe_warnings() ER_BINLOG_UNSAFE_STATEMENT, ER(ER_BINLOG_UNSAFE_STATEMENT), ER(LEX::binlog_stmt_unsafe_errcode[unsafe_type])); - if (global_system_variables.log_warnings > 1 && + if (global_system_variables.log_warnings > 0 && !protect_against_unsafe_warning_flood(unsafe_type)) print_unsafe_warning_to_log(unsafe_type, buf, query()); } |