1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-04 01:23:45 +03:00
Files
mariadb/mysql-test/suite/sys_vars/r/log_slow_queries_basic.result
Martin Hansson df2bdd6063 Bug#14498355: DEPRECATION WARNINGS SHOULD NOT CONTAIN MYSQL VERSION
NUMBERS

If a system variable was declared as deprecated without mention of an
alternative, the message would look funny, e.g. for @@delayed_insert_limit:

Warning 1287 '@@delayed_insert_limit' is deprecated and
will be removed in MySQL .

The message was meant to display the version number, but it's not
possible to give one when declaring a system variable.

The fix does two things:

1) The definition of the message
ER_WARN_DEPRECATED_SYNTAX_NO_REPLACEMENT is changed so that it does
not display a version number. I.e. in English the message now reads:

Warning 1287 The syntax '@@delayed_insert_limit' is deprecated and
will be removed in a future version.

2) The message ER_WARN_DEPRECATED_SYNTAX_WITH_VER is discontinued in
favor of ER_WARN_DEPRECATED_SYNTAX for system variables. This change
was already done in versions 5.6 and above as part of wl#5265. This
part is simply back-ported from the worklog.
2012-08-24 10:17:08 +02:00

133 lines
6.2 KiB
Plaintext

SET @start_value = @@global.log_slow_queries;
SELECT @start_value;
@start_value
1
'#---------------------FN_DYNVARS_004_01-------------------------#'
SET @@global.log_slow_queries = DEFAULT;
Warnings:
Warning 1287 '@@log_slow_queries' is deprecated and will be removed in a future release. Please use '@@slow_query_log' instead
SELECT @@global.log_slow_queries = 0;
@@global.log_slow_queries = 0
1
'#--------------------FN_DYNVARS_004_02------------------------#'
SET @@global.log_slow_queries = ON;
Warnings:
Warning 1287 '@@log_slow_queries' is deprecated and will be removed in a future release. Please use '@@slow_query_log' instead
SELECT @@global.log_slow_queries;
@@global.log_slow_queries
1
SET @@global.log_slow_queries = OFF;
Warnings:
Warning 1287 '@@log_slow_queries' is deprecated and will be removed in a future release. Please use '@@slow_query_log' instead
SELECT @@global.log_slow_queries;
@@global.log_slow_queries
0
'#--------------------FN_DYNVARS_004_03-------------------------#'
SET @@global.log_slow_queries = 2;
ERROR 42000: Variable 'log_slow_queries' can't be set to the value of '2'
SET @@global.log_slow_queries = -1;
ERROR 42000: Variable 'log_slow_queries' can't be set to the value of '-1'
SET @@global.log_slow_queries = TRUEF;
ERROR 42000: Variable 'log_slow_queries' can't be set to the value of 'TRUEF'
SET @@global.log_slow_queries = TRUE_F;
ERROR 42000: Variable 'log_slow_queries' can't be set to the value of 'TRUE_F'
SET @@global.log_slow_queries = FALSE0;
ERROR 42000: Variable 'log_slow_queries' can't be set to the value of 'FALSE0'
SET @@global.log_slow_queries = OON;
ERROR 42000: Variable 'log_slow_queries' can't be set to the value of 'OON'
SET @@global.log_slow_queries = ONN;
ERROR 42000: Variable 'log_slow_queries' can't be set to the value of 'ONN'
SET @@global.log_slow_queries = OOFF;
ERROR 42000: Variable 'log_slow_queries' can't be set to the value of 'OOFF'
SET @@global.log_slow_queries = 0FF;
ERROR 42000: Variable 'log_slow_queries' can't be set to the value of '0FF'
SET @@global.log_slow_queries = ' ';
ERROR 42000: Variable 'log_slow_queries' can't be set to the value of ' '
SET @@global.log_slow_queries = " ";
ERROR 42000: Variable 'log_slow_queries' can't be set to the value of ' '
SET @@global.log_slow_queries = '';
ERROR 42000: Variable 'log_slow_queries' can't be set to the value of ''
'#-------------------FN_DYNVARS_004_04----------------------------#'
SET @@session.log_slow_queries = OFF;
ERROR HY000: Variable 'log_slow_queries' is a GLOBAL variable and should be set with SET GLOBAL
SELECT @@session.log_slow_queries;
ERROR HY000: Variable 'log_slow_queries' is a GLOBAL variable
'#----------------------FN_DYNVARS_004_05------------------------#'
SELECT IF(@@global.log_slow_queries, "ON", "OFF") = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='log_slow_queries';
IF(@@global.log_slow_queries, "ON", "OFF") = VARIABLE_VALUE
1
'#---------------------FN_DYNVARS_004_06----------------------#'
SET @@global.log_slow_queries = 0;
Warnings:
Warning 1287 '@@log_slow_queries' is deprecated and will be removed in a future release. Please use '@@slow_query_log' instead
SELECT @@global.log_slow_queries;
@@global.log_slow_queries
0
SELECT IF(@@global.log_slow_queries, "ON", "OFF") = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='log_slow_queries';
IF(@@global.log_slow_queries, "ON", "OFF") = VARIABLE_VALUE
1
SET @@global.log_slow_queries = 1;
Warnings:
Warning 1287 '@@log_slow_queries' is deprecated and will be removed in a future release. Please use '@@slow_query_log' instead
SELECT @@global.log_slow_queries;
@@global.log_slow_queries
1
SELECT IF(@@global.log_slow_queries, "ON", "OFF") = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='log_slow_queries';
IF(@@global.log_slow_queries, "ON", "OFF") = VARIABLE_VALUE
1
'#---------------------FN_DYNVARS_004_07----------------------#'
SET @@global.log_slow_queries = TRUE;
Warnings:
Warning 1287 '@@log_slow_queries' is deprecated and will be removed in a future release. Please use '@@slow_query_log' instead
SELECT @@global.log_slow_queries;
@@global.log_slow_queries
1
SELECT IF(@@global.log_slow_queries, "ON", "OFF") = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='log_slow_queries';
IF(@@global.log_slow_queries, "ON", "OFF") = VARIABLE_VALUE
1
SET @@global.log_slow_queries = FALSE;
Warnings:
Warning 1287 '@@log_slow_queries' is deprecated and will be removed in a future release. Please use '@@slow_query_log' instead
SELECT @@global.log_slow_queries;
@@global.log_slow_queries
0
SELECT IF(@@global.log_slow_queries, "ON", "OFF") = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='log_slow_queries';
IF(@@global.log_slow_queries, "ON", "OFF") = VARIABLE_VALUE
1
'#---------------------FN_DYNVARS_004_08----------------------#'
SET @@global.log_slow_queries = ON;
Warnings:
Warning 1287 '@@log_slow_queries' is deprecated and will be removed in a future release. Please use '@@slow_query_log' instead
SELECT @@log_slow_queries = @@global.log_slow_queries;
@@log_slow_queries = @@global.log_slow_queries
1
'#---------------------FN_DYNVARS_004_09----------------------#'
SET log_slow_queries = ON;
ERROR HY000: Variable 'log_slow_queries' is a GLOBAL variable and should be set with SET GLOBAL
SET local.log_slow_queries = OFF;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'log_slow_queries = OFF' at line 1
SELECT local.log_slow_queries;
ERROR 42S02: Unknown table 'local' in field list
SET global.log_slow_queries = ON;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'log_slow_queries = ON' at line 1
SELECT global.log_slow_queries;
ERROR 42S02: Unknown table 'global' in field list
SELECT log_slow_queries = @@session.log_slow_queries;
ERROR 42S22: Unknown column 'log_slow_queries' in 'field list'
SET @@global.log_slow_queries = @start_value;
Warnings:
Warning 1287 '@@log_slow_queries' is deprecated and will be removed in a future release. Please use '@@slow_query_log' instead
SELECT @@global.log_slow_queries;
@@global.log_slow_queries
1