summaryrefslogtreecommitdiff
path: root/sql/log_event.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/log_event.cc')
-rw-r--r--sql/log_event.cc13
1 files changed, 1 insertions, 12 deletions
diff --git a/sql/log_event.cc b/sql/log_event.cc
index 6a85893803e..27dddb69144 100644
--- a/sql/log_event.cc
+++ b/sql/log_event.cc
@@ -4280,6 +4280,7 @@ int Query_log_event::do_apply_event(rpl_group_info *rgi,
THD_STAGE_INFO(thd, stage_init);
MYSQL_SET_STATEMENT_TEXT(thd->m_statement_psi, thd->query(), thd->query_length());
+ thd->enable_slow_log= thd->variables.sql_log_slow;
mysql_parse(thd, thd->query(), thd->query_length(), &parser_state);
/* Finalize server status flags after executing a statement. */
thd->update_server_status();
@@ -4287,18 +4288,6 @@ int Query_log_event::do_apply_event(rpl_group_info *rgi,
}
thd->variables.option_bits&= ~OPTION_MASTER_SQL_ERROR;
-
- /*
- Resetting the enable_slow_log thd variable.
-
- We need to reset it back to the opt_log_slow_slave_statements
- value after the statement execution (and slow logging
- is done). It might have changed if the statement was an
- admin statement (in which case, down in mysql_parse execution
- thd->enable_slow_log is set to the value of
- opt_log_slow_admin_statements).
- */
- thd->enable_slow_log= opt_log_slow_slave_statements;
}
else
{