diff options
Diffstat (limited to 'sql/sql_class.cc')
-rw-r--r-- | sql/sql_class.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sql/sql_class.cc b/sql/sql_class.cc index c1c252955aa..a48ebd450bb 100644 --- a/sql/sql_class.cc +++ b/sql/sql_class.cc @@ -1238,7 +1238,6 @@ Sql_condition* THD::raise_condition(uint sql_errno, got_warning= 1; break; case Sql_condition::WARN_LEVEL_ERROR: - mysql_audit_general(this, MYSQL_AUDIT_GENERAL_ERROR, sql_errno, msg); break; default: DBUG_ASSERT(FALSE); @@ -1249,6 +1248,8 @@ Sql_condition* THD::raise_condition(uint sql_errno, if (level == Sql_condition::WARN_LEVEL_ERROR) { + mysql_audit_general(this, MYSQL_AUDIT_GENERAL_ERROR, sql_errno, msg); + is_slave_error= 1; // needed to catch query errors during replication if (!da->is_error()) |