mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Merge 10.2 into 10.3
FIXME: Properly resolve conflicts between MDEV-18883 and MDEV-7742/MDEV-8305, and record the correct result for main.log_slow
This commit is contained in:
@ -77,3 +77,40 @@ set @@log_slow_filter=default;
|
||||
set @@log_slow_verbosity=default;
|
||||
set global log_output= default;
|
||||
truncate mysql.slow_log;
|
||||
#
|
||||
# MDEV-18333 Slow_queries count doesn't increase when slow_query_log is turned off
|
||||
#
|
||||
SET SESSION slow_query_log=OFF;
|
||||
SET GLOBAL slow_query_log=OFF;
|
||||
SET long_query_time=0.1;
|
||||
# Although this query is disallowed by slow_query_log, it should still increment Slow_queries
|
||||
SELECT VARIABLE_VALUE INTO @global_slow_queries
|
||||
FROM INFORMATION_SCHEMA.GLOBAL_STATUS
|
||||
WHERE VARIABLE_NAME='SLOW_QUERIES';
|
||||
SELECT sleep(0.2) INTO @tmp FROM DUAL;
|
||||
SELECT
|
||||
CAST(VARIABLE_VALUE AS UNSIGNED)-@global_slow_queries AS Slow_queries_increment
|
||||
FROM
|
||||
INFORMATION_SCHEMA.GLOBAL_STATUS
|
||||
WHERE
|
||||
VARIABLE_NAME='SLOW_QUERIES';
|
||||
Slow_queries_increment
|
||||
0
|
||||
# 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;
|
||||
SELECT VARIABLE_VALUE INTO @global_slow_queries
|
||||
FROM INFORMATION_SCHEMA.GLOBAL_STATUS
|
||||
WHERE VARIABLE_NAME='SLOW_QUERIES';
|
||||
SELECT sleep(0.2) INTO @tmp FROM DUAL;
|
||||
SELECT
|
||||
CAST(VARIABLE_VALUE AS UNSIGNED)-@global_slow_queries AS Slow_queries_increment
|
||||
FROM
|
||||
INFORMATION_SCHEMA.GLOBAL_STATUS
|
||||
WHERE
|
||||
VARIABLE_NAME='SLOW_QUERIES';
|
||||
Slow_queries_increment
|
||||
0
|
||||
SET log_slow_filter=DEFAULT;
|
||||
SET @@long_query_time=default;
|
||||
SET GLOBAL slow_query_log= @org_slow_query_log;
|
||||
|
Reference in New Issue
Block a user