Commit f0cd7075 authored by Alexander Barkov's avatar Alexander Barkov

After-merge fix for MDEV-18333 Slow_queries count doesn't increase when...

After-merge fix for MDEV-18333 Slow_queries count doesn't increase when slow_query_log is turned off
parent 77103e98
......@@ -95,7 +95,7 @@ INFORMATION_SCHEMA.GLOBAL_STATUS
WHERE
VARIABLE_NAME='SLOW_QUERIES';
Slow_queries_increment
0
1
# Although this query is disallowed by log_slow_filter, it should still increment Slow_queries
SET log_slow_filter=filesort;
SELECT sleep(0.2) INTO @tmp FROM DUAL;
......@@ -110,7 +110,7 @@ INFORMATION_SCHEMA.GLOBAL_STATUS
WHERE
VARIABLE_NAME='SLOW_QUERIES';
Slow_queries_increment
0
1
SET log_slow_filter=DEFAULT;
SET @@long_query_time=default;
SET GLOBAL slow_query_log= @org_slow_query_log;
......@@ -4839,8 +4839,6 @@ class THD :public Statement,
inline void prepare_logs_for_admin_command()
{
enable_slow_log&= !MY_TEST(variables.log_slow_disabled_statements &
LOG_SLOW_DISABLE_ADMIN);
query_plan_flags|= QPLAN_ADMIN;
}
};
......
......@@ -7702,7 +7702,7 @@ void THD::reset_for_next_command(bool do_clear_error)
if (opt_bin_log)
reset_dynamic(&user_var_events);
DBUG_ASSERT(user_var_events_alloc == &main_mem_root);
enable_slow_log= variables.sql_log_slow;
enable_slow_log= true;
get_stmt_da()->reset_for_next_command();
rand_used= 0;
m_sent_row_count= m_examined_row_count= 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment