mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
MDEV-6999 Remove or deprecate unused variables
This commit is contained in:
@ -8,87 +8,123 @@ SELECT @start_session_value;
|
||||
32
|
||||
'#--------------------FN_DYNVARS_086_01-------------------------#'
|
||||
SET @@global.max_tmp_tables = 1000;
|
||||
Warnings:
|
||||
Warning 1287 '@@max_tmp_tables' is deprecated and will be removed in a future release.
|
||||
SET @@global.max_tmp_tables = DEFAULT;
|
||||
Warnings:
|
||||
Warning 1287 '@@max_tmp_tables' is deprecated and will be removed in a future release.
|
||||
SELECT @@global.max_tmp_tables;
|
||||
@@global.max_tmp_tables
|
||||
32
|
||||
SET @@session.max_tmp_tables = 1000;
|
||||
Warnings:
|
||||
Warning 1287 '@@max_tmp_tables' is deprecated and will be removed in a future release.
|
||||
SET @@session.max_tmp_tables = DEFAULT;
|
||||
Warnings:
|
||||
Warning 1287 '@@max_tmp_tables' is deprecated and will be removed in a future release.
|
||||
SELECT @@session.max_tmp_tables;
|
||||
@@session.max_tmp_tables
|
||||
32
|
||||
'#--------------------FN_DYNVARS_086_02-------------------------#'
|
||||
SET @@global.max_tmp_tables = DEFAULT;
|
||||
Warnings:
|
||||
Warning 1287 '@@max_tmp_tables' is deprecated and will be removed in a future release.
|
||||
SELECT @@global.max_tmp_tables = 32;
|
||||
@@global.max_tmp_tables = 32
|
||||
1
|
||||
SET @@session.max_tmp_tables = DEFAULT;
|
||||
Warnings:
|
||||
Warning 1287 '@@max_tmp_tables' is deprecated and will be removed in a future release.
|
||||
SELECT @@session.max_tmp_tables = 32;
|
||||
@@session.max_tmp_tables = 32
|
||||
1
|
||||
'#--------------------FN_DYNVARS_086_03-------------------------#'
|
||||
SET @@global.max_tmp_tables = 1;
|
||||
Warnings:
|
||||
Warning 1287 '@@max_tmp_tables' is deprecated and will be removed in a future release.
|
||||
SELECT @@global.max_tmp_tables;
|
||||
@@global.max_tmp_tables
|
||||
1
|
||||
SET @@global.max_tmp_tables = 2;
|
||||
Warnings:
|
||||
Warning 1287 '@@max_tmp_tables' is deprecated and will be removed in a future release.
|
||||
SELECT @@global.max_tmp_tables;
|
||||
@@global.max_tmp_tables
|
||||
2
|
||||
SET @@global.max_tmp_tables = 65536;
|
||||
Warnings:
|
||||
Warning 1287 '@@max_tmp_tables' is deprecated and will be removed in a future release.
|
||||
SELECT @@global.max_tmp_tables;
|
||||
@@global.max_tmp_tables
|
||||
65536
|
||||
SET @@global.max_tmp_tables = 4294967295;
|
||||
Warnings:
|
||||
Warning 1287 '@@max_tmp_tables' is deprecated and will be removed in a future release.
|
||||
SELECT @@global.max_tmp_tables;
|
||||
@@global.max_tmp_tables
|
||||
4294967295
|
||||
SET @@global.max_tmp_tables = 4294967294;
|
||||
Warnings:
|
||||
Warning 1287 '@@max_tmp_tables' is deprecated and will be removed in a future release.
|
||||
SELECT @@global.max_tmp_tables;
|
||||
@@global.max_tmp_tables
|
||||
4294967294
|
||||
'#--------------------FN_DYNVARS_086_04-------------------------#'
|
||||
SET @@session.max_tmp_tables = 1;
|
||||
Warnings:
|
||||
Warning 1287 '@@max_tmp_tables' is deprecated and will be removed in a future release.
|
||||
SELECT @@session.max_tmp_tables;
|
||||
@@session.max_tmp_tables
|
||||
1
|
||||
SET @@session.max_tmp_tables = 2;
|
||||
Warnings:
|
||||
Warning 1287 '@@max_tmp_tables' is deprecated and will be removed in a future release.
|
||||
SELECT @@session.max_tmp_tables;
|
||||
@@session.max_tmp_tables
|
||||
2
|
||||
SET @@session.max_tmp_tables = 65536;
|
||||
Warnings:
|
||||
Warning 1287 '@@max_tmp_tables' is deprecated and will be removed in a future release.
|
||||
SELECT @@session.max_tmp_tables;
|
||||
@@session.max_tmp_tables
|
||||
65536
|
||||
SET @@session.max_tmp_tables = 4294967295;
|
||||
Warnings:
|
||||
Warning 1287 '@@max_tmp_tables' is deprecated and will be removed in a future release.
|
||||
SELECT @@session.max_tmp_tables;
|
||||
@@session.max_tmp_tables
|
||||
4294967295
|
||||
SET @@session.max_tmp_tables = 4294967294;
|
||||
Warnings:
|
||||
Warning 1287 '@@max_tmp_tables' is deprecated and will be removed in a future release.
|
||||
SELECT @@session.max_tmp_tables;
|
||||
@@session.max_tmp_tables
|
||||
4294967294
|
||||
'#------------------FN_DYNVARS_086_05-----------------------#'
|
||||
SET @@global.max_tmp_tables = -1024;
|
||||
Warnings:
|
||||
Warning 1287 '@@max_tmp_tables' is deprecated and will be removed in a future release.
|
||||
Warning 1292 Truncated incorrect max_tmp_tables value: '-1024'
|
||||
SELECT @@global.max_tmp_tables;
|
||||
@@global.max_tmp_tables
|
||||
1
|
||||
SET @@global.max_tmp_tables = 4294967296;
|
||||
Warnings:
|
||||
Warning 1287 '@@max_tmp_tables' is deprecated and will be removed in a future release.
|
||||
Warning 1292 Truncated incorrect max_tmp_tables value: '4294967296'
|
||||
SELECT @@global.max_tmp_tables;
|
||||
@@global.max_tmp_tables
|
||||
4294967295
|
||||
SET @@global.max_tmp_tables = -1;
|
||||
Warnings:
|
||||
Warning 1287 '@@max_tmp_tables' is deprecated and will be removed in a future release.
|
||||
Warning 1292 Truncated incorrect max_tmp_tables value: '-1'
|
||||
SELECT @@global.max_tmp_tables;
|
||||
@@global.max_tmp_tables
|
||||
1
|
||||
SET @@global.max_tmp_tables = 429496729500;
|
||||
Warnings:
|
||||
Warning 1287 '@@max_tmp_tables' is deprecated and will be removed in a future release.
|
||||
Warning 1292 Truncated incorrect max_tmp_tables value: '429496729500'
|
||||
SELECT @@global.max_tmp_tables;
|
||||
@@global.max_tmp_tables
|
||||
@ -105,24 +141,28 @@ SELECT @@global.max_tmp_tables;
|
||||
4294967295
|
||||
SET @@session.max_tmp_tables = 4294967296;
|
||||
Warnings:
|
||||
Warning 1287 '@@max_tmp_tables' is deprecated and will be removed in a future release.
|
||||
Warning 1292 Truncated incorrect max_tmp_tables value: '4294967296'
|
||||
SELECT @@session.max_tmp_tables;
|
||||
@@session.max_tmp_tables
|
||||
4294967295
|
||||
SET @@session.max_tmp_tables = -1;
|
||||
Warnings:
|
||||
Warning 1287 '@@max_tmp_tables' is deprecated and will be removed in a future release.
|
||||
Warning 1292 Truncated incorrect max_tmp_tables value: '-1'
|
||||
SELECT @@session.max_tmp_tables;
|
||||
@@session.max_tmp_tables
|
||||
1
|
||||
SET @@session.max_tmp_tables = 429496729500;
|
||||
Warnings:
|
||||
Warning 1287 '@@max_tmp_tables' is deprecated and will be removed in a future release.
|
||||
Warning 1292 Truncated incorrect max_tmp_tables value: '429496729500'
|
||||
SELECT @@session.max_tmp_tables;
|
||||
@@session.max_tmp_tables
|
||||
4294967295
|
||||
SET @@session.max_tmp_tables = -001;
|
||||
Warnings:
|
||||
Warning 1287 '@@max_tmp_tables' is deprecated and will be removed in a future release.
|
||||
Warning 1292 Truncated incorrect max_tmp_tables value: '-1'
|
||||
SELECT @@session.max_tmp_tables;
|
||||
@@session.max_tmp_tables
|
||||
@ -131,6 +171,7 @@ SET @@session.max_tmp_tables = 65530.34;
|
||||
ERROR 42000: Incorrect argument type to variable 'max_tmp_tables'
|
||||
SET @@session.max_tmp_tables = 10737418241;
|
||||
Warnings:
|
||||
Warning 1287 '@@max_tmp_tables' is deprecated and will be removed in a future release.
|
||||
Warning 1292 Truncated incorrect max_tmp_tables value: '10737418241'
|
||||
SELECT @@session.max_tmp_tables;
|
||||
@@session.max_tmp_tables
|
||||
@ -154,22 +195,29 @@ WHERE VARIABLE_NAME='max_tmp_tables';
|
||||
1
|
||||
'#------------------FN_DYNVARS_086_08-----------------------#'
|
||||
SET @@global.max_tmp_tables = TRUE;
|
||||
Warnings:
|
||||
Warning 1287 '@@max_tmp_tables' is deprecated and will be removed in a future release.
|
||||
SELECT @@global.max_tmp_tables;
|
||||
@@global.max_tmp_tables
|
||||
1
|
||||
SET @@global.max_tmp_tables = FALSE;
|
||||
Warnings:
|
||||
Warning 1287 '@@max_tmp_tables' is deprecated and will be removed in a future release.
|
||||
Warning 1292 Truncated incorrect max_tmp_tables value: '0'
|
||||
SELECT @@global.max_tmp_tables;
|
||||
@@global.max_tmp_tables
|
||||
1
|
||||
'#---------------------FN_DYNVARS_086_09----------------------#'
|
||||
SET @@global.max_tmp_tables = 20;
|
||||
Warnings:
|
||||
Warning 1287 '@@max_tmp_tables' is deprecated and will be removed in a future release.
|
||||
SELECT @@max_tmp_tables = @@global.max_tmp_tables;
|
||||
@@max_tmp_tables = @@global.max_tmp_tables
|
||||
0
|
||||
'#---------------------FN_DYNVARS_086_10----------------------#'
|
||||
SET @@max_tmp_tables = 255;
|
||||
Warnings:
|
||||
Warning 1287 '@@max_tmp_tables' is deprecated and will be removed in a future release.
|
||||
SELECT @@max_tmp_tables = @@local.max_tmp_tables;
|
||||
@@max_tmp_tables = @@local.max_tmp_tables
|
||||
1
|
||||
@ -178,6 +226,8 @@ SELECT @@local.max_tmp_tables = @@session.max_tmp_tables;
|
||||
1
|
||||
'#---------------------FN_DYNVARS_086_11----------------------#'
|
||||
SET max_tmp_tables = 102;
|
||||
Warnings:
|
||||
Warning 1287 '@@max_tmp_tables' is deprecated and will be removed in a future release.
|
||||
SELECT @@max_tmp_tables;
|
||||
@@max_tmp_tables
|
||||
102
|
||||
@ -188,10 +238,14 @@ ERROR 42S02: Unknown table 'session' in field list
|
||||
SELECT max_tmp_tables = @@session.max_tmp_tables;
|
||||
ERROR 42S22: Unknown column 'max_tmp_tables' in 'field list'
|
||||
SET @@global.max_tmp_tables = @start_global_value;
|
||||
Warnings:
|
||||
Warning 1287 '@@max_tmp_tables' is deprecated and will be removed in a future release.
|
||||
SELECT @@global.max_tmp_tables;
|
||||
@@global.max_tmp_tables
|
||||
32
|
||||
SET @@session.max_tmp_tables = @start_session_value;
|
||||
Warnings:
|
||||
Warning 1287 '@@max_tmp_tables' is deprecated and will be removed in a future release.
|
||||
SELECT @@session.max_tmp_tables;
|
||||
@@session.max_tmp_tables
|
||||
32
|
||||
|
@ -1,132 +0,0 @@
|
||||
SET @start_global_value = @@global.rpl_recovery_rank;
|
||||
SELECT @start_global_value;
|
||||
@start_global_value
|
||||
0
|
||||
'#--------------------FN_DYNVARS_142_01-------------------------#'
|
||||
SET @@global.rpl_recovery_rank = 500000;
|
||||
Warnings:
|
||||
Warning 1287 '@@rpl_recovery_rank' is deprecated and will be removed in a future release.
|
||||
SET @@global.rpl_recovery_rank = DEFAULT;
|
||||
Warnings:
|
||||
Warning 1287 '@@rpl_recovery_rank' is deprecated and will be removed in a future release.
|
||||
SELECT @@global.rpl_recovery_rank;
|
||||
@@global.rpl_recovery_rank
|
||||
0
|
||||
'#--------------------FN_DYNVARS_142_02-------------------------#'
|
||||
SET @@global.rpl_recovery_rank = 0;
|
||||
Warnings:
|
||||
Warning 1287 '@@rpl_recovery_rank' is deprecated and will be removed in a future release.
|
||||
SELECT @@global.rpl_recovery_rank;
|
||||
@@global.rpl_recovery_rank
|
||||
0
|
||||
SET @@global.rpl_recovery_rank = 1024;
|
||||
Warnings:
|
||||
Warning 1287 '@@rpl_recovery_rank' is deprecated and will be removed in a future release.
|
||||
SELECT @@global.rpl_recovery_rank;
|
||||
@@global.rpl_recovery_rank
|
||||
1024
|
||||
SET @@global.rpl_recovery_rank = 123456789;
|
||||
Warnings:
|
||||
Warning 1287 '@@rpl_recovery_rank' is deprecated and will be removed in a future release.
|
||||
SELECT @@global.rpl_recovery_rank;
|
||||
@@global.rpl_recovery_rank
|
||||
123456789
|
||||
SET @@global.rpl_recovery_rank = 2147483648*2;
|
||||
SELECT @@global.rpl_recovery_rank;
|
||||
@@global.rpl_recovery_rank
|
||||
4294967295
|
||||
SET @@global.rpl_recovery_rank = 2147483648*1024;
|
||||
SELECT @@global.rpl_recovery_rank;
|
||||
@@global.rpl_recovery_rank
|
||||
4294967295
|
||||
SET @@global.rpl_recovery_rank = 2147483648*2147483648;
|
||||
SELECT @@global.rpl_recovery_rank;
|
||||
@@global.rpl_recovery_rank
|
||||
4294967295
|
||||
'#--------------------FN_DYNVARS_142_03-------------------------#'
|
||||
SET @@rpl_recovery_rank = 2;
|
||||
ERROR HY000: Variable 'rpl_recovery_rank' is a GLOBAL variable and should be set with SET GLOBAL
|
||||
SET @@session.rpl_recovery_rank = 3;
|
||||
ERROR HY000: Variable 'rpl_recovery_rank' is a GLOBAL variable and should be set with SET GLOBAL
|
||||
SET @@local.rpl_recovery_rank = 4;
|
||||
ERROR HY000: Variable 'rpl_recovery_rank' is a GLOBAL variable and should be set with SET GLOBAL
|
||||
'#------------------FN_DYNVARS_142_04-----------------------#'
|
||||
SET @@global.rpl_recovery_rank = -1;
|
||||
Warnings:
|
||||
Warning 1287 '@@rpl_recovery_rank' is deprecated and will be removed in a future release.
|
||||
Warning 1292 Truncated incorrect rpl_recovery_rank value: '-1'
|
||||
SELECT @@global.rpl_recovery_rank;
|
||||
@@global.rpl_recovery_rank
|
||||
0
|
||||
SET @@global.rpl_recovery_rank = -2147483648;
|
||||
Warnings:
|
||||
Warning 1287 '@@rpl_recovery_rank' is deprecated and will be removed in a future release.
|
||||
Warning 1292 Truncated incorrect rpl_recovery_rank value: '-2147483648'
|
||||
SELECT @@global.rpl_recovery_rank;
|
||||
@@global.rpl_recovery_rank
|
||||
0
|
||||
SET @@global.rpl_recovery_rank = -2147483649;
|
||||
Warnings:
|
||||
Warning 1287 '@@rpl_recovery_rank' is deprecated and will be removed in a future release.
|
||||
Warning 1292 Truncated incorrect rpl_recovery_rank value: '-2147483649'
|
||||
SELECT @@global.rpl_recovery_rank;
|
||||
@@global.rpl_recovery_rank
|
||||
0
|
||||
SET @@global.rpl_recovery_rank = 65530.34;
|
||||
ERROR 42000: Incorrect argument type to variable 'rpl_recovery_rank'
|
||||
SET @@global.rpl_recovery_rank = 2147483649.56;
|
||||
ERROR 42000: Incorrect argument type to variable 'rpl_recovery_rank'
|
||||
SET @@global.rpl_recovery_rank = 1G;
|
||||
ERROR 42000: Incorrect argument type to variable 'rpl_recovery_rank'
|
||||
'#------------------FN_DYNVARS_142_05-----------------------#'
|
||||
SET @@global.rpl_recovery_rank = 3000;
|
||||
Warnings:
|
||||
Warning 1287 '@@rpl_recovery_rank' is deprecated and will be removed in a future release.
|
||||
SELECT @@global.rpl_recovery_rank = VARIABLE_VALUE
|
||||
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
|
||||
WHERE VARIABLE_NAME='rpl_recovery_rank';
|
||||
@@global.rpl_recovery_rank = VARIABLE_VALUE
|
||||
1
|
||||
'#------------------FN_DYNVARS_142_06-----------------------#'
|
||||
SELECT count(VARIABLE_VALUE)
|
||||
FROM INFORMATION_SCHEMA.SESSION_VARIABLES
|
||||
WHERE VARIABLE_NAME='rpl_recovery_rank';
|
||||
count(VARIABLE_VALUE)
|
||||
1
|
||||
'#------------------FN_DYNVARS_142_07-----------------------#'
|
||||
SET @@global.rpl_recovery_rank = TRUE;
|
||||
Warnings:
|
||||
Warning 1287 '@@rpl_recovery_rank' is deprecated and will be removed in a future release.
|
||||
SELECT @@global.rpl_recovery_rank;
|
||||
@@global.rpl_recovery_rank
|
||||
1
|
||||
SET @@global.rpl_recovery_rank = FALSE;
|
||||
Warnings:
|
||||
Warning 1287 '@@rpl_recovery_rank' is deprecated and will be removed in a future release.
|
||||
SELECT @@global.rpl_recovery_rank;
|
||||
@@global.rpl_recovery_rank
|
||||
0
|
||||
'#---------------------FN_DYNVARS_001_08----------------------#'
|
||||
SET @@global.rpl_recovery_rank = 512;
|
||||
Warnings:
|
||||
Warning 1287 '@@rpl_recovery_rank' is deprecated and will be removed in a future release.
|
||||
SELECT @@rpl_recovery_rank = @@global.rpl_recovery_rank;
|
||||
@@rpl_recovery_rank = @@global.rpl_recovery_rank
|
||||
1
|
||||
'#---------------------FN_DYNVARS_001_09----------------------#'
|
||||
SET rpl_recovery_rank = 2048;
|
||||
ERROR HY000: Variable 'rpl_recovery_rank' is a GLOBAL variable and should be set with SET GLOBAL
|
||||
SELECT rpl_recovery_rank;
|
||||
ERROR 42S22: Unknown column 'rpl_recovery_rank' in 'field list'
|
||||
SELECT @@rpl_recovery_rank;
|
||||
@@rpl_recovery_rank
|
||||
512
|
||||
SET global rpl_recovery_rank = 64;
|
||||
Warnings:
|
||||
Warning 1287 '@@rpl_recovery_rank' is deprecated and will be removed in a future release.
|
||||
SET @@global.rpl_recovery_rank = @start_global_value;
|
||||
Warnings:
|
||||
Warning 1287 '@@rpl_recovery_rank' is deprecated and will be removed in a future release.
|
||||
SELECT @@global.rpl_recovery_rank;
|
||||
@@global.rpl_recovery_rank
|
||||
0
|
@ -1918,7 +1918,7 @@ GLOBAL_VALUE_ORIGIN COMPILE-TIME
|
||||
DEFAULT_VALUE 32
|
||||
VARIABLE_SCOPE SESSION
|
||||
VARIABLE_TYPE BIGINT UNSIGNED
|
||||
VARIABLE_COMMENT Maximum number of temporary tables a client can keep open at a time
|
||||
VARIABLE_COMMENT Unused, will be removed.
|
||||
NUMERIC_MIN_VALUE 1
|
||||
NUMERIC_MAX_VALUE 4294967295
|
||||
NUMERIC_BLOCK_SIZE 1
|
||||
@ -3157,20 +3157,6 @@ NUMERIC_BLOCK_SIZE 1
|
||||
ENUM_VALUE_LIST NULL
|
||||
READ_ONLY NO
|
||||
COMMAND_LINE_ARGUMENT REQUIRED
|
||||
VARIABLE_NAME RPL_RECOVERY_RANK
|
||||
SESSION_VALUE NULL
|
||||
GLOBAL_VALUE 0
|
||||
GLOBAL_VALUE_ORIGIN COMPILE-TIME
|
||||
DEFAULT_VALUE 0
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
VARIABLE_TYPE BIGINT UNSIGNED
|
||||
VARIABLE_COMMENT Unused, will be removed
|
||||
NUMERIC_MIN_VALUE 0
|
||||
NUMERIC_MAX_VALUE 18446744073709551615
|
||||
NUMERIC_BLOCK_SIZE 1
|
||||
ENUM_VALUE_LIST NULL
|
||||
READ_ONLY NO
|
||||
COMMAND_LINE_ARGUMENT REQUIRED
|
||||
VARIABLE_NAME SECURE_AUTH
|
||||
SESSION_VALUE NULL
|
||||
GLOBAL_VALUE OFF
|
||||
|
@ -2086,7 +2086,7 @@ GLOBAL_VALUE_ORIGIN COMPILE-TIME
|
||||
DEFAULT_VALUE 32
|
||||
VARIABLE_SCOPE SESSION
|
||||
VARIABLE_TYPE BIGINT UNSIGNED
|
||||
VARIABLE_COMMENT Maximum number of temporary tables a client can keep open at a time
|
||||
VARIABLE_COMMENT Unused, will be removed.
|
||||
NUMERIC_MIN_VALUE 1
|
||||
NUMERIC_MAX_VALUE 4294967295
|
||||
NUMERIC_BLOCK_SIZE 1
|
||||
@ -3577,20 +3577,6 @@ NUMERIC_BLOCK_SIZE 1
|
||||
ENUM_VALUE_LIST NULL
|
||||
READ_ONLY NO
|
||||
COMMAND_LINE_ARGUMENT REQUIRED
|
||||
VARIABLE_NAME RPL_RECOVERY_RANK
|
||||
SESSION_VALUE NULL
|
||||
GLOBAL_VALUE 0
|
||||
GLOBAL_VALUE_ORIGIN COMPILE-TIME
|
||||
DEFAULT_VALUE 0
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
VARIABLE_TYPE BIGINT UNSIGNED
|
||||
VARIABLE_COMMENT Unused, will be removed
|
||||
NUMERIC_MIN_VALUE 0
|
||||
NUMERIC_MAX_VALUE 18446744073709551615
|
||||
NUMERIC_BLOCK_SIZE 1
|
||||
ENUM_VALUE_LIST NULL
|
||||
READ_ONLY NO
|
||||
COMMAND_LINE_ARGUMENT REQUIRED
|
||||
VARIABLE_NAME SECURE_AUTH
|
||||
SESSION_VALUE NULL
|
||||
GLOBAL_VALUE OFF
|
||||
|
@ -1,180 +0,0 @@
|
||||
############## mysql-test\t\rpl_recovery_rank_basic.test #######################
|
||||
# #
|
||||
# Variable Name: rpl_recovery_rank #
|
||||
# Scope: GLOBAL & SESSION #
|
||||
# Access Type: Dynamic #
|
||||
# Data Type: Numeric #
|
||||
# Default Value: 1 #
|
||||
# Range: 1 - 65536 #
|
||||
# #
|
||||
# #
|
||||
# Creation Date: 2008-02-07 #
|
||||
# Author: Rizwan Maredia #
|
||||
# #
|
||||
# Description: Test Cases of Dynamic System Variable rpl_recovery_rank #
|
||||
# that checks the behavior of this variable in the following ways #
|
||||
# * Default Value #
|
||||
# * Valid & Invalid values #
|
||||
# * Scope & Access method #
|
||||
# * Data Integrity #
|
||||
# #
|
||||
# Reference: http://dev.mysql.com/doc/refman/5.1/en/ #
|
||||
# server-system-variables.html #
|
||||
# #
|
||||
################################################################################
|
||||
|
||||
--source include/load_sysvars.inc
|
||||
|
||||
###################################################################
|
||||
# START OF rpl_recovery_rank TESTS #
|
||||
###################################################################
|
||||
|
||||
|
||||
#############################################################
|
||||
# Save initial value #
|
||||
#############################################################
|
||||
|
||||
SET @start_global_value = @@global.rpl_recovery_rank;
|
||||
SELECT @start_global_value;
|
||||
|
||||
--echo '#--------------------FN_DYNVARS_142_01-------------------------#'
|
||||
###################################################################
|
||||
# Check the DEFAULT value of rpl_recovery_rank #
|
||||
###################################################################
|
||||
|
||||
SET @@global.rpl_recovery_rank = 500000;
|
||||
SET @@global.rpl_recovery_rank = DEFAULT;
|
||||
SELECT @@global.rpl_recovery_rank;
|
||||
|
||||
--echo '#--------------------FN_DYNVARS_142_02-------------------------#'
|
||||
##################################################################################
|
||||
# Change the value of rpl_recovery_rank to a valid value for GLOBAL Scope #
|
||||
##################################################################################
|
||||
|
||||
SET @@global.rpl_recovery_rank = 0;
|
||||
SELECT @@global.rpl_recovery_rank;
|
||||
SET @@global.rpl_recovery_rank = 1024;
|
||||
SELECT @@global.rpl_recovery_rank;
|
||||
SET @@global.rpl_recovery_rank = 123456789;
|
||||
SELECT @@global.rpl_recovery_rank;
|
||||
|
||||
--disable_warnings
|
||||
SET @@global.rpl_recovery_rank = 2147483648*2;
|
||||
--enable_warnings
|
||||
--replace_result 4294967296 4294967295
|
||||
SELECT @@global.rpl_recovery_rank;
|
||||
--disable_warnings
|
||||
SET @@global.rpl_recovery_rank = 2147483648*1024;
|
||||
--enable_warnings
|
||||
--replace_result 2199023255552 4294967295
|
||||
SELECT @@global.rpl_recovery_rank;
|
||||
--disable_warnings
|
||||
SET @@global.rpl_recovery_rank = 2147483648*2147483648;
|
||||
--enable_warnings
|
||||
--replace_result 4611686018427387904 4294967295
|
||||
SELECT @@global.rpl_recovery_rank;
|
||||
|
||||
|
||||
--echo '#--------------------FN_DYNVARS_142_03-------------------------#'
|
||||
#################################################################################
|
||||
# Check if variable can be access with session scope #
|
||||
#################################################################################
|
||||
|
||||
--Error ER_GLOBAL_VARIABLE
|
||||
SET @@rpl_recovery_rank = 2;
|
||||
|
||||
--Error ER_GLOBAL_VARIABLE
|
||||
SET @@session.rpl_recovery_rank = 3;
|
||||
|
||||
--Error ER_GLOBAL_VARIABLE
|
||||
SET @@local.rpl_recovery_rank = 4;
|
||||
|
||||
|
||||
|
||||
--echo '#------------------FN_DYNVARS_142_04-----------------------#'
|
||||
####################################################################
|
||||
# Change the value of rpl_recovery_rank to an invalid value #
|
||||
####################################################################
|
||||
|
||||
SET @@global.rpl_recovery_rank = -1;
|
||||
SELECT @@global.rpl_recovery_rank;
|
||||
SET @@global.rpl_recovery_rank = -2147483648;
|
||||
SELECT @@global.rpl_recovery_rank;
|
||||
SET @@global.rpl_recovery_rank = -2147483649;
|
||||
SELECT @@global.rpl_recovery_rank;
|
||||
--Error ER_WRONG_TYPE_FOR_VAR
|
||||
SET @@global.rpl_recovery_rank = 65530.34;
|
||||
--Error ER_WRONG_TYPE_FOR_VAR
|
||||
SET @@global.rpl_recovery_rank = 2147483649.56;
|
||||
--Error ER_WRONG_TYPE_FOR_VAR
|
||||
SET @@global.rpl_recovery_rank = 1G;
|
||||
|
||||
|
||||
--echo '#------------------FN_DYNVARS_142_05-----------------------#'
|
||||
####################################################################
|
||||
# Check if the value in GLOBAL Table matches value in variable #
|
||||
####################################################################
|
||||
|
||||
SET @@global.rpl_recovery_rank = 3000;
|
||||
SELECT @@global.rpl_recovery_rank = VARIABLE_VALUE
|
||||
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
|
||||
WHERE VARIABLE_NAME='rpl_recovery_rank';
|
||||
|
||||
|
||||
--echo '#------------------FN_DYNVARS_142_06-----------------------#'
|
||||
###########################################################################
|
||||
# Check if the value is present in INFORMATION_SCHEMA.SESSION_VARIABLES #
|
||||
###########################################################################
|
||||
|
||||
SELECT count(VARIABLE_VALUE)
|
||||
FROM INFORMATION_SCHEMA.SESSION_VARIABLES
|
||||
WHERE VARIABLE_NAME='rpl_recovery_rank';
|
||||
|
||||
|
||||
--echo '#------------------FN_DYNVARS_142_07-----------------------#'
|
||||
####################################################################
|
||||
# Check if TRUE and FALSE values can be used on variable #
|
||||
####################################################################
|
||||
|
||||
SET @@global.rpl_recovery_rank = TRUE;
|
||||
SELECT @@global.rpl_recovery_rank;
|
||||
SET @@global.rpl_recovery_rank = FALSE;
|
||||
SELECT @@global.rpl_recovery_rank;
|
||||
|
||||
|
||||
--echo '#---------------------FN_DYNVARS_001_08----------------------#'
|
||||
#################################################################################
|
||||
# Check if accessing variable with and without GLOBAL point to same variable #
|
||||
#################################################################################
|
||||
|
||||
|
||||
SET @@global.rpl_recovery_rank = 512;
|
||||
SELECT @@rpl_recovery_rank = @@global.rpl_recovery_rank;
|
||||
|
||||
|
||||
--echo '#---------------------FN_DYNVARS_001_09----------------------#'
|
||||
##################################################################################
|
||||
# Check if rpl_recovery_rank can be accessed without @@ sign and scope #
|
||||
##################################################################################
|
||||
|
||||
--Error ER_GLOBAL_VARIABLE
|
||||
SET rpl_recovery_rank = 2048;
|
||||
--Error ER_BAD_FIELD_ERROR
|
||||
SELECT rpl_recovery_rank;
|
||||
|
||||
SELECT @@rpl_recovery_rank;
|
||||
|
||||
#verifying another another syntax for setting value
|
||||
SET global rpl_recovery_rank = 64;
|
||||
|
||||
####################################
|
||||
# Restore initial value #
|
||||
####################################
|
||||
|
||||
SET @@global.rpl_recovery_rank = @start_global_value;
|
||||
SELECT @@global.rpl_recovery_rank;
|
||||
|
||||
########################################################
|
||||
# END OF rpl_recovery_rank TESTS #
|
||||
########################################################
|
||||
|
Reference in New Issue
Block a user