From e4f973930c6fd8d76c7ad4f2e0769336e555ef67 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Sat, 29 Nov 2014 00:52:48 +0100 Subject: [PATCH] MDEV-6999 Remove or deprecate unused variables --- mysql-test/r/mysqld--help.result | 6 +- mysql-test/r/variables.result | 8 - .../sys_vars/r/max_tmp_tables_basic.result | 54 ++++++ .../sys_vars/r/rpl_recovery_rank_basic.result | 132 ------------- .../sys_vars/r/sysvars_server_embedded.result | 16 +- .../r/sysvars_server_notembedded.result | 16 +- .../sys_vars/t/rpl_recovery_rank_basic.test | 180 ------------------ mysql-test/t/variables.test | 4 - sql/sys_vars.cc | 23 +-- 9 files changed, 67 insertions(+), 372 deletions(-) delete mode 100644 mysql-test/suite/sys_vars/r/rpl_recovery_rank_basic.result delete mode 100644 mysql-test/suite/sys_vars/t/rpl_recovery_rank_basic.test diff --git a/mysql-test/r/mysqld--help.result b/mysql-test/r/mysqld--help.result index 929813d303b45..f263dfebad936 100644 --- a/mysql-test/r/mysqld--help.result +++ b/mysql-test/r/mysqld--help.result @@ -432,8 +432,7 @@ The following options may be given as the first argument: max_statement_time seconds will be aborted. The argument will be treated as a decimal value with microsecond precision. A value of 0 (default) means no timeout - --max-tmp-tables=# Maximum number of temporary tables a client can keep open - at a time + --max-tmp-tables=# Unused, will be removed. --max-user-connections=# The maximum number of active connections for a single user (0 = no limit) @@ -858,8 +857,6 @@ The following options may be given as the first argument: --rowid-merge-buff-size=# The size of the buffers used [NOT] IN evaluation via partial matching - --rpl-recovery-rank=# - Unused, will be removed --safe-mode Skip some optimize stages (for testing). Deprecated. --safe-user-create Don't allow new user creation by the user who has no write privileges to the mysql.user table. @@ -1322,7 +1319,6 @@ report-password (No default value) report-port 0 report-user (No default value) rowid-merge-buff-size 8388608 -rpl-recovery-rank 0 safe-user-create FALSE secure-auth FALSE secure-file-priv (No default value) diff --git a/mysql-test/r/variables.result b/mysql-test/r/variables.result index a42c0c5abcb98..28b6be90ece42 100644 --- a/mysql-test/r/variables.result +++ b/mysql-test/r/variables.result @@ -20,7 +20,6 @@ set @my_myisam_max_sort_file_size =@@global.myisam_max_sort_file_size; set @my_net_buffer_length =@@global.net_buffer_length; set @my_net_write_timeout =@@global.net_write_timeout; set @my_net_read_timeout =@@global.net_read_timeout; -set @my_rpl_recovery_rank =@@global.rpl_recovery_rank; set @my_server_id =@@global.server_id; set @my_slow_launch_time =@@global.slow_launch_time; set @my_storage_engine =@@global.default_storage_engine; @@ -522,7 +521,6 @@ Warnings: Warning 1292 Truncated incorrect max_heap_table_size value: '100' set max_join_size=100; set max_sort_length=100; -set max_tmp_tables=100; set global max_user_connections=100; select @@max_user_connections; @@max_user_connections @@ -540,9 +538,6 @@ set read_buffer_size=100; Warnings: Warning 1292 Truncated incorrect read_buffer_size value: '100' set read_rnd_buffer_size=100; -set global rpl_recovery_rank=100; -Warnings: -Warning 1287 '@@rpl_recovery_rank' is deprecated and will be removed in a future release. set global server_id=100; set global slow_launch_time=100; set sort_buffer_size=100; @@ -1061,9 +1056,6 @@ Warnings: Warning 1708 The value of 'max_allowed_packet' should be no less than the value of 'net_buffer_length' set global net_write_timeout =@my_net_write_timeout; set global net_read_timeout =@my_net_read_timeout; -set global rpl_recovery_rank =@my_rpl_recovery_rank; -Warnings: -Warning 1287 '@@rpl_recovery_rank' is deprecated and will be removed in a future release. set global server_id =@my_server_id; set global slow_launch_time =@my_slow_launch_time; set global default_storage_engine =@my_storage_engine; diff --git a/mysql-test/suite/sys_vars/r/max_tmp_tables_basic.result b/mysql-test/suite/sys_vars/r/max_tmp_tables_basic.result index 5daf78fcae1ba..bc6a074088054 100644 --- a/mysql-test/suite/sys_vars/r/max_tmp_tables_basic.result +++ b/mysql-test/suite/sys_vars/r/max_tmp_tables_basic.result @@ -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 diff --git a/mysql-test/suite/sys_vars/r/rpl_recovery_rank_basic.result b/mysql-test/suite/sys_vars/r/rpl_recovery_rank_basic.result deleted file mode 100644 index 251f428b449ed..0000000000000 --- a/mysql-test/suite/sys_vars/r/rpl_recovery_rank_basic.result +++ /dev/null @@ -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 diff --git a/mysql-test/suite/sys_vars/r/sysvars_server_embedded.result b/mysql-test/suite/sys_vars/r/sysvars_server_embedded.result index 5e37b51ba3f64..7b44c74c757b3 100644 --- a/mysql-test/suite/sys_vars/r/sysvars_server_embedded.result +++ b/mysql-test/suite/sys_vars/r/sysvars_server_embedded.result @@ -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 diff --git a/mysql-test/suite/sys_vars/r/sysvars_server_notembedded.result b/mysql-test/suite/sys_vars/r/sysvars_server_notembedded.result index db5a6d27533e8..c6c14b3383bb1 100644 --- a/mysql-test/suite/sys_vars/r/sysvars_server_notembedded.result +++ b/mysql-test/suite/sys_vars/r/sysvars_server_notembedded.result @@ -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 diff --git a/mysql-test/suite/sys_vars/t/rpl_recovery_rank_basic.test b/mysql-test/suite/sys_vars/t/rpl_recovery_rank_basic.test deleted file mode 100644 index b89cee9bdd477..0000000000000 --- a/mysql-test/suite/sys_vars/t/rpl_recovery_rank_basic.test +++ /dev/null @@ -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 # -######################################################## - diff --git a/mysql-test/t/variables.test b/mysql-test/t/variables.test index 79cd5e1b24d55..4c7c74f8032bb 100644 --- a/mysql-test/t/variables.test +++ b/mysql-test/t/variables.test @@ -29,7 +29,6 @@ set @my_myisam_max_sort_file_size =@@global.myisam_max_sort_file_size; set @my_net_buffer_length =@@global.net_buffer_length; set @my_net_write_timeout =@@global.net_write_timeout; set @my_net_read_timeout =@@global.net_read_timeout; -set @my_rpl_recovery_rank =@@global.rpl_recovery_rank; set @my_server_id =@@global.server_id; set @my_slow_launch_time =@@global.slow_launch_time; set @my_storage_engine =@@global.default_storage_engine; @@ -314,7 +313,6 @@ set global max_delayed_threads=100; set max_heap_table_size=100; set max_join_size=100; set max_sort_length=100; -set max_tmp_tables=100; set global max_user_connections=100; select @@max_user_connections; set global max_write_lock_count=100; @@ -324,7 +322,6 @@ set net_read_timeout=100; set net_write_timeout=100; set read_buffer_size=100; set read_rnd_buffer_size=100; -set global rpl_recovery_rank=100; set global server_id=100; set global slow_launch_time=100; set sort_buffer_size=100; @@ -816,7 +813,6 @@ set global myisam_max_sort_file_size =@my_myisam_max_sort_file_size; set global net_buffer_length =@my_net_buffer_length; set global net_write_timeout =@my_net_write_timeout; set global net_read_timeout =@my_net_read_timeout; -set global rpl_recovery_rank =@my_rpl_recovery_rank; set global server_id =@my_server_id; set global slow_launch_time =@my_slow_launch_time; set global default_storage_engine =@my_storage_engine; diff --git a/sql/sys_vars.cc b/sql/sys_vars.cc index 43a8c7269f2ea..6c1118e43ffe7 100644 --- a/sql/sys_vars.cc +++ b/sql/sys_vars.cc @@ -2022,10 +2022,11 @@ static Sys_var_max_user_conn Sys_max_user_connections( NOT_IN_BINLOG, ON_CHECK(if_checking_enabled)); static Sys_var_ulong Sys_max_tmp_tables( - "max_tmp_tables", - "Maximum number of temporary tables a client can keep open at a time", + "max_tmp_tables", "Unused, will be removed.", SESSION_VAR(max_tmp_tables), CMD_LINE(REQUIRED_ARG), - VALID_RANGE(1, UINT_MAX), DEFAULT(32), BLOCK_SIZE(1)); + VALID_RANGE(1, UINT_MAX), DEFAULT(32), BLOCK_SIZE(1), + NO_MUTEX_GUARD, NOT_IN_BINLOG, ON_CHECK(0), ON_UPDATE(0), + DEPRECATED("")); static Sys_var_ulong Sys_max_write_lock_count( "max_write_lock_count", @@ -2407,13 +2408,6 @@ static Sys_var_ulong Sys_div_precincrement( SESSION_VAR(div_precincrement), CMD_LINE(REQUIRED_ARG), VALID_RANGE(0, DECIMAL_MAX_SCALE), DEFAULT(4), BLOCK_SIZE(1)); -static Sys_var_ulong Sys_rpl_recovery_rank( - "rpl_recovery_rank", "Unused, will be removed", - GLOBAL_VAR(rpl_recovery_rank), CMD_LINE(REQUIRED_ARG), - VALID_RANGE(0, ULONG_MAX), DEFAULT(0), BLOCK_SIZE(1), - NO_MUTEX_GUARD, NOT_IN_BINLOG, ON_CHECK(0), ON_UPDATE(0), - DEPRECATED("")); - static Sys_var_ulong Sys_range_alloc_block_size( "range_alloc_block_size", "Allocation block size for storing ranges during optimization", @@ -3340,19 +3334,22 @@ static Sys_var_charptr Sys_date_format( "date_format", "The DATE format (ignored)", READ_ONLY GLOBAL_VAR(global_date_format.format.str), CMD_LINE(REQUIRED_ARG), IN_SYSTEM_CHARSET, - DEFAULT(known_date_time_formats[ISO_FORMAT].date_format)); + DEFAULT(known_date_time_formats[ISO_FORMAT].date_format), + NO_MUTEX_GUARD, NOT_IN_BINLOG, ON_CHECK(0), ON_UPDATE(0), DEPRECATED("")); static Sys_var_charptr Sys_datetime_format( "datetime_format", "The DATETIME format (ignored)", READ_ONLY GLOBAL_VAR(global_datetime_format.format.str), CMD_LINE(REQUIRED_ARG), IN_SYSTEM_CHARSET, - DEFAULT(known_date_time_formats[ISO_FORMAT].datetime_format)); + DEFAULT(known_date_time_formats[ISO_FORMAT].datetime_format), + NO_MUTEX_GUARD, NOT_IN_BINLOG, ON_CHECK(0), ON_UPDATE(0), DEPRECATED("")); static Sys_var_charptr Sys_time_format( "time_format", "The TIME format (ignored)", READ_ONLY GLOBAL_VAR(global_time_format.format.str), CMD_LINE(REQUIRED_ARG), IN_SYSTEM_CHARSET, - DEFAULT(known_date_time_formats[ISO_FORMAT].time_format)); + DEFAULT(known_date_time_formats[ISO_FORMAT].time_format), + NO_MUTEX_GUARD, NOT_IN_BINLOG, ON_CHECK(0), ON_UPDATE(0), DEPRECATED("")); static bool fix_autocommit(sys_var *self, THD *thd, enum_var_type type) {