From dda2e940fb035d41852e95a1c2f513ab1534b041 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Mon, 11 Mar 2019 16:45:38 +0100 Subject: pass the slow logging information in thd->query_plan_flags This solves the following issues: * unlike lex->m_sql_cmd and lex->sql_command, thd->query_plan_flags is not reset in Prepared_statement::execute, it survives till the log_slow_statement(), so slow logging behaves correctly in --ps * using thd->query_plan_flags for both slow_log_filter and log_slow_admin_statements means the definition of "admin" statements for the slow log is the same no matter how it is filtered out. --- sql/sql_cmd.h | 15 --------------- 1 file changed, 15 deletions(-) (limited to 'sql/sql_cmd.h') diff --git a/sql/sql_cmd.h b/sql/sql_cmd.h index 9cb2a728f41..904578134b4 100644 --- a/sql/sql_cmd.h +++ b/sql/sql_cmd.h @@ -145,8 +145,6 @@ public: */ virtual bool execute(THD *thd) = 0; - virtual bool log_slow_enabled_statement(const THD *thd) const; - protected: Sql_cmd() {} @@ -163,17 +161,4 @@ protected: } }; - -class Sql_cmd_admin: public Sql_cmd -{ -public: - Sql_cmd_admin() - {} - ~Sql_cmd_admin() - {} - bool log_slow_enabled_statement(const THD *thd) const; -}; - - - #endif // SQL_CMD_INCLUDED -- cgit v1.2.1