mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +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:
@ -95,7 +95,7 @@ INFORMATION_SCHEMA.GLOBAL_STATUS
|
|||||||
WHERE
|
WHERE
|
||||||
VARIABLE_NAME='SLOW_QUERIES';
|
VARIABLE_NAME='SLOW_QUERIES';
|
||||||
Slow_queries_increment
|
Slow_queries_increment
|
||||||
0
|
1
|
||||||
# Although this query is disallowed by log_slow_filter, it should still increment Slow_queries
|
# Although this query is disallowed by log_slow_filter, it should still increment Slow_queries
|
||||||
SET log_slow_filter=filesort;
|
SET log_slow_filter=filesort;
|
||||||
SELECT sleep(0.2) INTO @tmp FROM DUAL;
|
SELECT sleep(0.2) INTO @tmp FROM DUAL;
|
||||||
@ -110,7 +110,7 @@ INFORMATION_SCHEMA.GLOBAL_STATUS
|
|||||||
WHERE
|
WHERE
|
||||||
VARIABLE_NAME='SLOW_QUERIES';
|
VARIABLE_NAME='SLOW_QUERIES';
|
||||||
Slow_queries_increment
|
Slow_queries_increment
|
||||||
0
|
1
|
||||||
SET log_slow_filter=DEFAULT;
|
SET log_slow_filter=DEFAULT;
|
||||||
SET @@long_query_time=default;
|
SET @@long_query_time=default;
|
||||||
SET GLOBAL slow_query_log= @org_slow_query_log;
|
SET GLOBAL slow_query_log= @org_slow_query_log;
|
||||||
|
@ -4839,8 +4839,6 @@ public:
|
|||||||
|
|
||||||
inline void prepare_logs_for_admin_command()
|
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;
|
query_plan_flags|= QPLAN_ADMIN;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -7702,7 +7702,7 @@ void THD::reset_for_next_command(bool do_clear_error)
|
|||||||
if (opt_bin_log)
|
if (opt_bin_log)
|
||||||
reset_dynamic(&user_var_events);
|
reset_dynamic(&user_var_events);
|
||||||
DBUG_ASSERT(user_var_events_alloc == &main_mem_root);
|
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();
|
get_stmt_da()->reset_for_next_command();
|
||||||
rand_used= 0;
|
rand_used= 0;
|
||||||
m_sent_row_count= m_examined_row_count= 0;
|
m_sent_row_count= m_examined_row_count= 0;
|
||||||
|
Reference in New Issue
Block a user