Commit 53e742f5 authored by Chad MILLER's avatar Chad MILLER

Merge from 5.1 team tree.

parents 7b92f9cf bdf15475
--replicate-same-server-id --relay-log=slave-relay-bin --replicate-same-server-id --relay-log=slave-relay-bin --secure-file-priv=$MYSQLTEST_VARDIR
...@@ -28,59 +28,68 @@ ...@@ -28,59 +28,68 @@
--source include/load_sysvars.inc --source include/load_sysvars.inc
######################################################################## let $minimum_range= BETWEEN 8 AND 36;
########################################################################
# START OF key_buffer_size TESTS # # START OF key_buffer_size TESTS #
######################################################################## ########################################################################
--disable_warnings --disable_warnings
######################################################################## ########################################################################
# Saving initial value of key_buffer_size in a temporary variable # # Saving initial value of key_buffer_size in a temporary variable #
######################################################################## ########################################################################
SET @start_value = @@global.key_buffer_size; SET @start_value = @@global.key_buffer_size;
--echo '#--------------------FN_DYNVARS_055_01------------------------#' --echo '#--------------------FN_DYNVARS_055_01------------------------#'
######################################################################## ########################################################################
# Display the DEFAULT value of key_buffer_size # # Display the DEFAULT value of key_buffer_size #
######################################################################## ########################################################################
SET @@global.key_buffer_size = 99; SET @@global.key_buffer_size = 99;
--Error ER_NO_DEFAULT --Error ER_NO_DEFAULT
SET @@global.key_buffer_size = DEFAULT; SET @@global.key_buffer_size = DEFAULT;
SELECT @@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36; eval SELECT @@global.key_buffer_size $minimum_range;
--echo '#---------------------FN_DYNVARS_055_02-------------------------#' --echo '#---------------------FN_DYNVARS_055_02-------------------------#'
############################################### ###############################################
# Verify default value of variable # # Verify default value of variable #
############################################### ###############################################
SET @@global.key_buffer_size = @start_value; SET @@global.key_buffer_size = @start_value;
SELECT @@global.key_buffer_size = @start_value; SELECT @@global.key_buffer_size = @start_value;
--echo '#--------------------FN_DYNVARS_055_03------------------------#' --echo '#--------------------FN_DYNVARS_055_03------------------------#'
######################################################################## ########################################################################
# Change the value of key_buffer_size to a valid value # # Change the value of key_buffer_size to a valid value #
######################################################################## ########################################################################
SET @@global.key_buffer_size = 8 ; SET @@global.key_buffer_size = 8 ;
SELECT @@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36; eval SELECT @@global.key_buffer_size $minimum_range;
--disable_warnings --disable_warnings
#Due to increasing the runtime significantly and allocating the buffer instantly. # The next subtest is set to comment because it will
# be tried to allocate the buffer instantly which
# might lead to a message about missing resources,
# excessive runtime etc. especially if the main memory is less than 4GB.
#SET @@global.key_buffer_size = 4294967295; #SET @@global.key_buffer_size = 4294967295;
--enable_warnings --enable_warnings
#SELECT @@global.key_buffer_size; #SELECT @@global.key_buffer_size;
SET @@global.key_buffer_size = 1800; SET @@global.key_buffer_size = 1800;
SELECT @@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36; eval SELECT @@global.key_buffer_size $minimum_range;
SET @@global.key_buffer_size = 65535; SET @@global.key_buffer_size = 65535;
SELECT @@global.key_buffer_size; SELECT @@global.key_buffer_size;
--echo '#--------------------FN_DYNVARS_055_04-------------------------#' --echo '#--------------------FN_DYNVARS_055_04-------------------------#'
########################################################################### ###########################################################################
# Change the value of key_buffer_size to invalid value # # Change the value of key_buffer_size to invalid value #
########################################################################### ###########################################################################
# Due to increasing the runtime significantly and allocating the buffer instantly # The next subtests are set to comment because they will
# with a size of 18446744073709551615 bytes with 32bit exec. # be tried to allocate the buffer instantly which
# might lead to a message about missing resources,
# excessive runtime etc. especially if the main memory is less than 4GB.
# The negative values lead to very big numbers, e.g. -1 to
# a size of 18446744073709551615 bytes with a 32bit binary.
# See Bug #42103.
#SET @@global.key_buffer_size = -1; #SET @@global.key_buffer_size = -1;
#SELECT @@global.key_buffer_size; #SELECT @@global.key_buffer_size;
#SET @@global.key_buffer_size = 100000000000; #SET @@global.key_buffer_size = 100000000000;
...@@ -91,46 +100,49 @@ SELECT @@global.key_buffer_size; ...@@ -91,46 +100,49 @@ SELECT @@global.key_buffer_size;
#SET @@global.key_buffer_size = -1024; #SET @@global.key_buffer_size = -1024;
#SELECT @@global.key_buffer_size; #SELECT @@global.key_buffer_size;
SET @@global.key_buffer_size = 4; SET @@global.key_buffer_size = 4;
SELECT @@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36; eval SELECT @@global.key_buffer_size $minimum_range;
--Error ER_WRONG_TYPE_FOR_VAR --Error ER_WRONG_TYPE_FOR_VAR
SET @@global.key_buffer_size = ON; SET @@global.key_buffer_size = ON;
SELECT @@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36; eval SELECT @@global.key_buffer_size $minimum_range;
--Error ER_WRONG_TYPE_FOR_VAR --Error ER_WRONG_TYPE_FOR_VAR
SET @@global.key_buffer_size = 'test'; SET @@global.key_buffer_size = 'test';
SELECT @@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36; eval SELECT @@global.key_buffer_size $minimum_range;
--echo '#-------------------FN_DYNVARS_055_05----------------------------#' --echo '#-------------------FN_DYNVARS_055_05----------------------------#'
########################################################################### ###########################################################################
# Test if accessing session key_buffer_size gives error # # Test if accessing session key_buffer_size gives error #
########################################################################### ###########################################################################
--Error ER_GLOBAL_VARIABLE --Error ER_GLOBAL_VARIABLE
SET @@session.key_buffer_size = 0; SET @@session.key_buffer_size = 0;
SELECT @@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36; eval SELECT @@global.key_buffer_size $minimum_range;
--echo '#----------------------FN_DYNVARS_055_06------------------------#' --echo '#----------------------FN_DYNVARS_055_06------------------------#'
############################################################################## ##############################################################################
# Check if the value in GLOBAL & SESSION Tables matches values in variable # # Check if the value in GLOBAL & SESSION Tables matches values in variable #
############################################################################## ##############################################################################
SELECT @@global.key_buffer_size = VARIABLE_VALUE SELECT @@global.key_buffer_size = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='key_buffer_size'; WHERE VARIABLE_NAME='key_buffer_size';
SELECT @@key_buffer_size = VARIABLE_VALUE SELECT @@key_buffer_size = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.SESSION_VARIABLES FROM INFORMATION_SCHEMA.SESSION_VARIABLES
WHERE VARIABLE_NAME='key_buffer_size'; WHERE VARIABLE_NAME='key_buffer_size';
--echo '#---------------------FN_DYNVARS_055_07----------------------#' --echo '#---------------------FN_DYNVARS_055_07----------------------#'
################################################################### ###################################################################
# Check if TRUE and FALSE values can be used on variable # # Check if TRUE and FALSE values can be used on variable #
################################################################### ###################################################################
# The following assignment are accepted, but should be rejected
# like the value ON (see above).
# See Bug #42104
SET @@global.key_buffer_size = TRUE; SET @@global.key_buffer_size = TRUE;
SELECT @@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36; eval SELECT @@global.key_buffer_size $minimum_range;
SET @@global.key_buffer_size = FALSE; SET @@global.key_buffer_size = FALSE;
SELECT @@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36; eval SELECT @@global.key_buffer_size $minimum_range;
--echo '#---------------------FN_DYNVARS_055_08----------------------#' --echo '#---------------------FN_DYNVARS_055_08----------------------#'
##################################################################### #####################################################################
...@@ -145,13 +157,13 @@ SELECT @@key_buffer_size = @@global.key_buffer_size; ...@@ -145,13 +157,13 @@ SELECT @@key_buffer_size = @@global.key_buffer_size;
--enable_warnings --enable_warnings
--echo '#---------------------FN_DYNVARS_055_09----------------------#' --echo '#---------------------FN_DYNVARS_055_09----------------------#'
########################################################################## ##########################################################################
# Check if key_buffer_size can be accessed with and without @@ sign # # Check if key_buffer_size can be accessed with and without @@ sign #
########################################################################## ##########################################################################
--Error ER_GLOBAL_VARIABLE --Error ER_GLOBAL_VARIABLE
SET key_buffer_size = 8 ; SET key_buffer_size = 8 ;
SELECT @@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36; eval SELECT @@global.key_buffer_size $minimum_range;
--Error ER_PARSE_ERROR --Error ER_PARSE_ERROR
SET local.key_buffer_size = 10; SET local.key_buffer_size = 10;
--Error ER_UNKNOWN_TABLE --Error ER_UNKNOWN_TABLE
...@@ -163,8 +175,7 @@ SELECT global.key_buffer_size; ...@@ -163,8 +175,7 @@ SELECT global.key_buffer_size;
--Error ER_BAD_FIELD_ERROR --Error ER_BAD_FIELD_ERROR
SELECT key_buffer_size = @@session.key_buffer_size; SELECT key_buffer_size = @@session.key_buffer_size;
##############################
##############################
# Restore initial value # # Restore initial value #
############################## ##############################
......
...@@ -3,8 +3,8 @@ SET @start_value = @@global.key_buffer_size; ...@@ -3,8 +3,8 @@ SET @start_value = @@global.key_buffer_size;
SET @@global.key_buffer_size = 99; SET @@global.key_buffer_size = 99;
SET @@global.key_buffer_size = DEFAULT; SET @@global.key_buffer_size = DEFAULT;
ERROR 42000: Variable 'key_buffer_size' doesn't have a default value ERROR 42000: Variable 'key_buffer_size' doesn't have a default value
SELECT @@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36; SELECT @@global.key_buffer_size BETWEEN 8 AND 36;
@@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36 @@global.key_buffer_size BETWEEN 8 AND 36
1 1
'#---------------------FN_DYNVARS_055_02-------------------------#' '#---------------------FN_DYNVARS_055_02-------------------------#'
SET @@global.key_buffer_size = @start_value; SET @@global.key_buffer_size = @start_value;
...@@ -13,14 +13,14 @@ SELECT @@global.key_buffer_size = @start_value; ...@@ -13,14 +13,14 @@ SELECT @@global.key_buffer_size = @start_value;
1 1
'#--------------------FN_DYNVARS_055_03------------------------#' '#--------------------FN_DYNVARS_055_03------------------------#'
SET @@global.key_buffer_size = 8 ; SET @@global.key_buffer_size = 8 ;
SELECT @@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36; SELECT @@global.key_buffer_size BETWEEN 8 AND 36;
@@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36 @@global.key_buffer_size BETWEEN 8 AND 36
1 1
SET @@global.key_buffer_size = 1800; SET @@global.key_buffer_size = 1800;
Warnings: Warnings:
Warning 1292 Truncated incorrect key_buffer_size value: '1800' Warning 1292 Truncated incorrect key_buffer_size value: '1800'
SELECT @@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36; SELECT @@global.key_buffer_size BETWEEN 8 AND 36;
@@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36 @@global.key_buffer_size BETWEEN 8 AND 36
1 1
SET @@global.key_buffer_size = 65535; SET @@global.key_buffer_size = 65535;
SELECT @@global.key_buffer_size; SELECT @@global.key_buffer_size;
...@@ -35,24 +35,24 @@ SELECT @@global.key_buffer_size; ...@@ -35,24 +35,24 @@ SELECT @@global.key_buffer_size;
SET @@global.key_buffer_size = 4; SET @@global.key_buffer_size = 4;
Warnings: Warnings:
Warning 1292 Truncated incorrect key_buffer_size value: '4' Warning 1292 Truncated incorrect key_buffer_size value: '4'
SELECT @@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36; SELECT @@global.key_buffer_size BETWEEN 8 AND 36;
@@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36 @@global.key_buffer_size BETWEEN 8 AND 36
1 1
SET @@global.key_buffer_size = ON; SET @@global.key_buffer_size = ON;
ERROR 42000: Incorrect argument type to variable 'key_buffer_size' ERROR 42000: Incorrect argument type to variable 'key_buffer_size'
SELECT @@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36; SELECT @@global.key_buffer_size BETWEEN 8 AND 36;
@@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36 @@global.key_buffer_size BETWEEN 8 AND 36
1 1
SET @@global.key_buffer_size = 'test'; SET @@global.key_buffer_size = 'test';
ERROR 42000: Incorrect argument type to variable 'key_buffer_size' ERROR 42000: Incorrect argument type to variable 'key_buffer_size'
SELECT @@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36; SELECT @@global.key_buffer_size BETWEEN 8 AND 36;
@@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36 @@global.key_buffer_size BETWEEN 8 AND 36
1 1
'#-------------------FN_DYNVARS_055_05----------------------------#' '#-------------------FN_DYNVARS_055_05----------------------------#'
SET @@session.key_buffer_size = 0; SET @@session.key_buffer_size = 0;
ERROR HY000: Variable 'key_buffer_size' is a GLOBAL variable and should be set with SET GLOBAL ERROR HY000: Variable 'key_buffer_size' is a GLOBAL variable and should be set with SET GLOBAL
SELECT @@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36; SELECT @@global.key_buffer_size BETWEEN 8 AND 36;
@@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36 @@global.key_buffer_size BETWEEN 8 AND 36
1 1
'#----------------------FN_DYNVARS_055_06------------------------#' '#----------------------FN_DYNVARS_055_06------------------------#'
SELECT @@global.key_buffer_size = VARIABLE_VALUE SELECT @@global.key_buffer_size = VARIABLE_VALUE
...@@ -69,14 +69,14 @@ WHERE VARIABLE_NAME='key_buffer_size'; ...@@ -69,14 +69,14 @@ WHERE VARIABLE_NAME='key_buffer_size';
SET @@global.key_buffer_size = TRUE; SET @@global.key_buffer_size = TRUE;
Warnings: Warnings:
Warning 1292 Truncated incorrect key_buffer_size value: '1' Warning 1292 Truncated incorrect key_buffer_size value: '1'
SELECT @@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36; SELECT @@global.key_buffer_size BETWEEN 8 AND 36;
@@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36 @@global.key_buffer_size BETWEEN 8 AND 36
1 1
SET @@global.key_buffer_size = FALSE; SET @@global.key_buffer_size = FALSE;
Warnings: Warnings:
Warning 1438 Cannot drop default keycache Warning 1438 Cannot drop default keycache
SELECT @@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36; SELECT @@global.key_buffer_size BETWEEN 8 AND 36;
@@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36 @@global.key_buffer_size BETWEEN 8 AND 36
1 1
'#---------------------FN_DYNVARS_055_08----------------------#' '#---------------------FN_DYNVARS_055_08----------------------#'
SET @@global.key_buffer_size = 8 ; SET @@global.key_buffer_size = 8 ;
...@@ -86,8 +86,8 @@ SELECT @@key_buffer_size = @@global.key_buffer_size; ...@@ -86,8 +86,8 @@ SELECT @@key_buffer_size = @@global.key_buffer_size;
'#---------------------FN_DYNVARS_055_09----------------------#' '#---------------------FN_DYNVARS_055_09----------------------#'
SET key_buffer_size = 8 ; SET key_buffer_size = 8 ;
ERROR HY000: Variable 'key_buffer_size' is a GLOBAL variable and should be set with SET GLOBAL ERROR HY000: Variable 'key_buffer_size' is a GLOBAL variable and should be set with SET GLOBAL
SELECT @@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36; SELECT @@global.key_buffer_size BETWEEN 8 AND 36;
@@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36 @@global.key_buffer_size BETWEEN 8 AND 36
1 1
SET local.key_buffer_size = 10; SET local.key_buffer_size = 10;
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 'key_buffer_size = 10' at line 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 'key_buffer_size = 10' at line 1
......
...@@ -3,8 +3,8 @@ SET @start_value = @@global.key_buffer_size; ...@@ -3,8 +3,8 @@ SET @start_value = @@global.key_buffer_size;
SET @@global.key_buffer_size = 99; SET @@global.key_buffer_size = 99;
SET @@global.key_buffer_size = DEFAULT; SET @@global.key_buffer_size = DEFAULT;
ERROR 42000: Variable 'key_buffer_size' doesn't have a default value ERROR 42000: Variable 'key_buffer_size' doesn't have a default value
SELECT @@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36; SELECT @@global.key_buffer_size BETWEEN 8 AND 36;
@@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36 @@global.key_buffer_size BETWEEN 8 AND 36
1 1
'#---------------------FN_DYNVARS_055_02-------------------------#' '#---------------------FN_DYNVARS_055_02-------------------------#'
SET @@global.key_buffer_size = @start_value; SET @@global.key_buffer_size = @start_value;
...@@ -13,14 +13,14 @@ SELECT @@global.key_buffer_size = @start_value; ...@@ -13,14 +13,14 @@ SELECT @@global.key_buffer_size = @start_value;
1 1
'#--------------------FN_DYNVARS_055_03------------------------#' '#--------------------FN_DYNVARS_055_03------------------------#'
SET @@global.key_buffer_size = 8 ; SET @@global.key_buffer_size = 8 ;
SELECT @@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36; SELECT @@global.key_buffer_size BETWEEN 8 AND 36;
@@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36 @@global.key_buffer_size BETWEEN 8 AND 36
1 1
SET @@global.key_buffer_size = 1800; SET @@global.key_buffer_size = 1800;
Warnings: Warnings:
Warning 1292 Truncated incorrect key_buffer_size value: '1800' Warning 1292 Truncated incorrect key_buffer_size value: '1800'
SELECT @@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36; SELECT @@global.key_buffer_size BETWEEN 8 AND 36;
@@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36 @@global.key_buffer_size BETWEEN 8 AND 36
1 1
SET @@global.key_buffer_size = 65535; SET @@global.key_buffer_size = 65535;
SELECT @@global.key_buffer_size; SELECT @@global.key_buffer_size;
...@@ -35,33 +35,33 @@ SELECT @@global.key_buffer_size; ...@@ -35,33 +35,33 @@ SELECT @@global.key_buffer_size;
SET @@global.key_buffer_size = 4; SET @@global.key_buffer_size = 4;
Warnings: Warnings:
Warning 1292 Truncated incorrect key_buffer_size value: '4' Warning 1292 Truncated incorrect key_buffer_size value: '4'
SELECT @@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36; SELECT @@global.key_buffer_size BETWEEN 8 AND 36;
@@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36 @@global.key_buffer_size BETWEEN 8 AND 36
1 1
SET @@global.key_buffer_size = ON; SET @@global.key_buffer_size = ON;
ERROR 42000: Incorrect argument type to variable 'key_buffer_size' ERROR 42000: Incorrect argument type to variable 'key_buffer_size'
SELECT @@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36; SELECT @@global.key_buffer_size BETWEEN 8 AND 36;
@@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36 @@global.key_buffer_size BETWEEN 8 AND 36
1 1
SET @@global.key_buffer_size = 'test'; SET @@global.key_buffer_size = 'test';
ERROR 42000: Incorrect argument type to variable 'key_buffer_size' ERROR 42000: Incorrect argument type to variable 'key_buffer_size'
SELECT @@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36; SELECT @@global.key_buffer_size BETWEEN 8 AND 36;
@@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36 @@global.key_buffer_size BETWEEN 8 AND 36
1 1
'#-------------------FN_DYNVARS_055_05----------------------------#' '#-------------------FN_DYNVARS_055_05----------------------------#'
SET @@session.key_buffer_size = 0; SET @@session.key_buffer_size = 0;
ERROR HY000: Variable 'key_buffer_size' is a GLOBAL variable and should be set with SET GLOBAL ERROR HY000: Variable 'key_buffer_size' is a GLOBAL variable and should be set with SET GLOBAL
SELECT @@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36; SELECT @@global.key_buffer_size BETWEEN 8 AND 36;
@@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36 @@global.key_buffer_size BETWEEN 8 AND 36
1 1
'#----------------------FN_DYNVARS_055_06------------------------#' '#----------------------FN_DYNVARS_055_06------------------------#'
SELECT @@global.key_buffer_size = VARIABLE_VALUE SELECT @@global.key_buffer_size = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='key_buffer_size'; WHERE VARIABLE_NAME='key_buffer_size';
@@global.key_buffer_size = VARIABLE_VALUE @@global.key_buffer_size = VARIABLE_VALUE
1 1
SELECT @@key_buffer_size = VARIABLE_VALUE SELECT @@key_buffer_size = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.SESSION_VARIABLES FROM INFORMATION_SCHEMA.SESSION_VARIABLES
WHERE VARIABLE_NAME='key_buffer_size'; WHERE VARIABLE_NAME='key_buffer_size';
@@key_buffer_size = VARIABLE_VALUE @@key_buffer_size = VARIABLE_VALUE
1 1
...@@ -69,14 +69,14 @@ WHERE VARIABLE_NAME='key_buffer_size'; ...@@ -69,14 +69,14 @@ WHERE VARIABLE_NAME='key_buffer_size';
SET @@global.key_buffer_size = TRUE; SET @@global.key_buffer_size = TRUE;
Warnings: Warnings:
Warning 1292 Truncated incorrect key_buffer_size value: '1' Warning 1292 Truncated incorrect key_buffer_size value: '1'
SELECT @@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36; SELECT @@global.key_buffer_size BETWEEN 8 AND 36;
@@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36 @@global.key_buffer_size BETWEEN 8 AND 36
1 1
SET @@global.key_buffer_size = FALSE; SET @@global.key_buffer_size = FALSE;
Warnings: Warnings:
Warning 1438 Cannot drop default keycache Warning 1438 Cannot drop default keycache
SELECT @@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36; SELECT @@global.key_buffer_size BETWEEN 8 AND 36;
@@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36 @@global.key_buffer_size BETWEEN 8 AND 36
1 1
'#---------------------FN_DYNVARS_055_08----------------------#' '#---------------------FN_DYNVARS_055_08----------------------#'
SET @@global.key_buffer_size = 8 ; SET @@global.key_buffer_size = 8 ;
...@@ -86,8 +86,8 @@ SELECT @@key_buffer_size = @@global.key_buffer_size; ...@@ -86,8 +86,8 @@ SELECT @@key_buffer_size = @@global.key_buffer_size;
'#---------------------FN_DYNVARS_055_09----------------------#' '#---------------------FN_DYNVARS_055_09----------------------#'
SET key_buffer_size = 8 ; SET key_buffer_size = 8 ;
ERROR HY000: Variable 'key_buffer_size' is a GLOBAL variable and should be set with SET GLOBAL ERROR HY000: Variable 'key_buffer_size' is a GLOBAL variable and should be set with SET GLOBAL
SELECT @@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36; SELECT @@global.key_buffer_size BETWEEN 8 AND 36;
@@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36 @@global.key_buffer_size BETWEEN 8 AND 36
1 1
SET local.key_buffer_size = 10; SET local.key_buffer_size = 10;
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 'key_buffer_size = 10' at line 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 'key_buffer_size = 10' at line 1
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment