1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

After-merge fix for MDEV-18333 Slow_queries count doesn't increase when slow_query_log is turned off

This commit is contained in:
Alexander Barkov
2019-03-06 23:44:58 +04:00
parent 77103e9832
commit f0cd707503
3 changed files with 3 additions and 5 deletions

View File

@ -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;

View File

@ -4839,8 +4839,6 @@ public:
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;
}
};

View File

@ -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;