summaryrefslogtreecommitdiff
path: root/sql/sql_lex.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/sql_lex.cc')
-rw-r--r--sql/sql_lex.cc14
1 files changed, 14 insertions, 0 deletions
diff --git a/sql/sql_lex.cc b/sql/sql_lex.cc
index c5aaa8e3cca..7c330151545 100644
--- a/sql/sql_lex.cc
+++ b/sql/sql_lex.cc
@@ -4719,6 +4719,20 @@ bool LEX::is_partition_management() const
alter_info.flags == Alter_info::ALTER_REORGANIZE_PARTITION));
}
+
+bool Sql_cmd::log_slow_enabled_statement(const THD *thd) const
+{
+ return global_system_variables.sql_log_slow && thd->variables.sql_log_slow;
+}
+
+
+bool Sql_cmd_admin::log_slow_enabled_statement(const THD *thd) const
+{
+ return opt_log_slow_admin_statements &&
+ Sql_cmd::log_slow_enabled_statement(thd);
+}
+
+
#ifdef MYSQL_SERVER
uint binlog_unsafe_map[256];