1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

MDEV-6339 deprecate log_slow_admin_statements

log_slow_filter=admin as been available for a long time.

Uses can migrate from log_slow_statements_statements=OFF by removing
'admin' from the default log_slow_filter variable setting.
This commit is contained in:
Daniel Black
2022-12-05 09:03:06 +11:00
parent 61161cdaf9
commit 26ef4875e6
6 changed files with 37 additions and 6 deletions

View File

@@ -11,6 +11,8 @@ SET GLOBAL log_output = 'file,table';
SET GLOBAL slow_query_log = on;
SET SESSION long_query_time = 0;
SET SESSION log_slow_admin_statements = on;
Warnings:
Warning 1287 '@@log_slow_admin_statements' is deprecated and will be removed in a future release. Please use '@@log_slow_filter' instead
ALTER TABLE log_slow_admin_statements ADD COLUMN k INT DEFAULT 17;
CREATE PROCEDURE add_rows()
BEGIN
@@ -42,22 +44,32 @@ SET @@global.log_output= @old_log_output;
SET @@global.slow_query_log= @old_slow_query_log;
SET @@session.long_query_time= @old_long_query_time;
SET @@global.log_slow_admin_statements= @old_log_slow_admin_statements;
Warnings:
Warning 1287 '@@log_slow_admin_statements' is deprecated and will be removed in a future release. Please use '@@log_slow_filter' instead
DROP PROCEDURE add_rows;
TRUNCATE TABLE mysql.slow_log;
SET @save_log_slow_disabled_statements= @@global.log_slow_disabled_statements;
SET @@SESSION.log_slow_admin_statements= TRUE;
Warnings:
Warning 1287 '@@log_slow_admin_statements' is deprecated and will be removed in a future release. Please use '@@log_slow_filter' instead
select @@SESSION.log_slow_disabled_statements;
@@SESSION.log_slow_disabled_statements
sp
SET @@SESSION.log_slow_admin_statements= FALSE;
Warnings:
Warning 1287 '@@log_slow_admin_statements' is deprecated and will be removed in a future release. Please use '@@log_slow_filter' instead
select @@SESSION.log_slow_disabled_statements;
@@SESSION.log_slow_disabled_statements
admin,sp
SET @@GLOBAL.log_slow_admin_statements= TRUE;
Warnings:
Warning 1287 '@@log_slow_admin_statements' is deprecated and will be removed in a future release. Please use '@@log_slow_filter' instead
select @@GLOBAL.log_slow_disabled_statements;
@@GLOBAL.log_slow_disabled_statements
sp
SET @@GLOBAL.log_slow_admin_statements= FALSE;
Warnings:
Warning 1287 '@@log_slow_admin_statements' is deprecated and will be removed in a future release. Please use '@@log_slow_filter' instead
select @@GLOBAL.log_slow_disabled_statements;
@@GLOBAL.log_slow_disabled_statements
admin,sp

View File

@@ -1665,7 +1665,7 @@ COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME LOG_SLOW_ADMIN_STATEMENTS
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BOOLEAN
VARIABLE_COMMENT Log slow OPTIMIZE, ANALYZE, ALTER and other administrative statements to the slow log if it is open. Resets or sets the option 'admin' in log_slow_disabled_statements
VARIABLE_COMMENT Log slow OPTIMIZE, ANALYZE, ALTER and other administrative statements to the slow log if it is open. Resets or sets the option 'admin' in log_slow_filter. Deprecated, use log_slow_filter without 'admin'.
NUMERIC_MIN_VALUE NULL
NUMERIC_MAX_VALUE NULL
NUMERIC_BLOCK_SIZE NULL

View File

@@ -1815,7 +1815,7 @@ COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME LOG_SLOW_ADMIN_STATEMENTS
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BOOLEAN
VARIABLE_COMMENT Log slow OPTIMIZE, ANALYZE, ALTER and other administrative statements to the slow log if it is open. Resets or sets the option 'admin' in log_slow_disabled_statements
VARIABLE_COMMENT Log slow OPTIMIZE, ANALYZE, ALTER and other administrative statements to the slow log if it is open. Resets or sets the option 'admin' in log_slow_filter. Deprecated, use log_slow_filter without 'admin'.
NUMERIC_MIN_VALUE NULL
NUMERIC_MAX_VALUE NULL
NUMERIC_BLOCK_SIZE NULL