mirror of
https://github.com/MariaDB/server.git
synced 2026-01-06 05:22:24 +03:00
WL#4681: Took the system variable tests out of the main test suite, put them into "sys_vars", updated some reult files and tests.
This commit is contained in:
126
mysql-test/suite/sys_vars/r/expire_logs_days_basic.result
Normal file
126
mysql-test/suite/sys_vars/r/expire_logs_days_basic.result
Normal file
@@ -0,0 +1,126 @@
|
||||
SET @start_value = @@global.expire_logs_days;
|
||||
SELECT @start_value;
|
||||
@start_value
|
||||
0
|
||||
'#--------------------FN_DYNVARS_029_01------------------------#'
|
||||
SET @@global.expire_logs_days = 99;
|
||||
SET @@global.expire_logs_days = DEFAULT;
|
||||
SELECT @@global.expire_logs_days;
|
||||
@@global.expire_logs_days
|
||||
0
|
||||
'#---------------------FN_DYNVARS_029_02-------------------------#'
|
||||
SET @@global.expire_logs_days = @start_value;
|
||||
SELECT @@global.expire_logs_days = 0;
|
||||
@@global.expire_logs_days = 0
|
||||
1
|
||||
'#--------------------FN_DYNVARS_029_03------------------------#'
|
||||
SET @@global.expire_logs_days = 0;
|
||||
SELECT @@global.expire_logs_days;
|
||||
@@global.expire_logs_days
|
||||
0
|
||||
SET @@global.expire_logs_days = 99;
|
||||
SELECT @@global.expire_logs_days;
|
||||
@@global.expire_logs_days
|
||||
99
|
||||
SET @@global.expire_logs_days = 10;
|
||||
SELECT @@global.expire_logs_days;
|
||||
@@global.expire_logs_days
|
||||
10
|
||||
SET @@global.expire_logs_days = 21;
|
||||
SELECT @@global.expire_logs_days;
|
||||
@@global.expire_logs_days
|
||||
21
|
||||
'#--------------------FN_DYNVARS_029_04-------------------------#'
|
||||
SET @@global.expire_logs_days = -1;
|
||||
SELECT @@global.expire_logs_days;
|
||||
@@global.expire_logs_days
|
||||
0
|
||||
SET @@global.expire_logs_days = 100;
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect expire_logs_days value: '100'
|
||||
SELECT @@global.expire_logs_days;
|
||||
@@global.expire_logs_days
|
||||
99
|
||||
SET @@global.expire_logs_days = 1024;
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect expire_logs_days value: '1024'
|
||||
SELECT @@global.expire_logs_days;
|
||||
@@global.expire_logs_days
|
||||
99
|
||||
SET @@global.expire_logs_days = 10000.01;
|
||||
ERROR 42000: Incorrect argument type to variable 'expire_logs_days'
|
||||
SELECT @@global.expire_logs_days;
|
||||
@@global.expire_logs_days
|
||||
99
|
||||
SET @@global.expire_logs_days = -1024;
|
||||
SELECT @@global.expire_logs_days;
|
||||
@@global.expire_logs_days
|
||||
0
|
||||
SET @@global.expire_logs_days = 42949672950;
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect expire_logs_days value: '42949672950'
|
||||
SELECT @@global.expire_logs_days;
|
||||
@@global.expire_logs_days
|
||||
99
|
||||
'Bug # 34837: Errors are not coming on assigning invalid values to variable'
|
||||
SET @@global.expire_logs_days = ON;
|
||||
ERROR 42000: Incorrect argument type to variable 'expire_logs_days'
|
||||
SELECT @@global.expire_logs_days;
|
||||
@@global.expire_logs_days
|
||||
99
|
||||
SET @@global.expire_logs_days = 'test';
|
||||
ERROR 42000: Incorrect argument type to variable 'expire_logs_days'
|
||||
SELECT @@global.expire_logs_days;
|
||||
@@global.expire_logs_days
|
||||
99
|
||||
'#-------------------FN_DYNVARS_029_05----------------------------#'
|
||||
SET @@session.expire_logs_days = 0;
|
||||
ERROR HY000: Variable 'expire_logs_days' is a GLOBAL variable and should be set with SET GLOBAL
|
||||
SELECT @@expire_logs_days;
|
||||
@@expire_logs_days
|
||||
99
|
||||
'#----------------------FN_DYNVARS_029_06------------------------#'
|
||||
SELECT @@global.expire_logs_days = VARIABLE_VALUE
|
||||
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
|
||||
WHERE VARIABLE_NAME='expire_logs_days';
|
||||
@@global.expire_logs_days = VARIABLE_VALUE
|
||||
1
|
||||
SELECT @@expire_logs_days = VARIABLE_VALUE
|
||||
FROM INFORMATION_SCHEMA.SESSION_VARIABLES
|
||||
WHERE VARIABLE_NAME='expire_logs_days';
|
||||
@@expire_logs_days = VARIABLE_VALUE
|
||||
1
|
||||
'#---------------------FN_DYNVARS_029_07----------------------#'
|
||||
SET @@global.expire_logs_days = TRUE;
|
||||
SELECT @@global.expire_logs_days;
|
||||
@@global.expire_logs_days
|
||||
1
|
||||
SET @@global.expire_logs_days = FALSE;
|
||||
SELECT @@global.expire_logs_days;
|
||||
@@global.expire_logs_days
|
||||
0
|
||||
'#---------------------FN_DYNVARS_029_08----------------------#'
|
||||
SET @@global.expire_logs_days = 1;
|
||||
SELECT @@expire_logs_days = @@global.expire_logs_days;
|
||||
@@expire_logs_days = @@global.expire_logs_days
|
||||
1
|
||||
'#---------------------FN_DYNVARS_029_09----------------------#'
|
||||
SET expire_logs_days = 1;
|
||||
ERROR HY000: Variable 'expire_logs_days' is a GLOBAL variable and should be set with SET GLOBAL
|
||||
SELECT @@expire_logs_days;
|
||||
@@expire_logs_days
|
||||
1
|
||||
SET local.expire_logs_days = 1;
|
||||
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 'expire_logs_days = 1' at line 1
|
||||
SELECT local.expire_logs_days;
|
||||
ERROR 42S02: Unknown table 'local' in field list
|
||||
SET global.expire_logs_days = 1;
|
||||
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 'expire_logs_days = 1' at line 1
|
||||
SELECT global.expire_logs_days;
|
||||
ERROR 42S02: Unknown table 'global' in field list
|
||||
SELECT expire_logs_days = @@session.expire_logs_days;
|
||||
ERROR 42S22: Unknown column 'expire_logs_days' in 'field list'
|
||||
SET @@global.expire_logs_days = @start_value;
|
||||
SELECT @@global.expire_logs_days;
|
||||
@@global.expire_logs_days
|
||||
0
|
||||
Reference in New Issue
Block a user