Loading .bzrignore +4 −0 Original line number Diff line number Diff line Loading @@ -3024,3 +3024,7 @@ win/vs8cache.txt ylwrap zlib/*.ds? zlib/*.vcproj mysql-test/bug36522-64.tar mysql-test/bug36522.tar mysql-test/t.log mysql-test/tps.log mysql-test/include/binlog_cache_size_basic.inc 0 → 100644 +154 −0 Original line number Diff line number Diff line ################# mysql-test\t\binlog_cache_size_basic.test #################### # # # Variable Name: binlog_cache_size # # Scope: GLOBAL # # Access Type: Dynamic # # Data Type: Numeric # # Default Value: 32768 # # Range: 4096 - 4294967295 # # # # # # Creation Date: 2008-04-28 # # Author: Salman Rawala/Horst Hunger # # # # Description: Test Cases of Dynamic System Variable "binlog_cache_size" # # that checks 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#option_mysqld_binlog_cache_size # # # ################################################################################ ################################################################# # START OF binlog_cache_size TESTS # ################################################################# ######################################################################### # Saving initial value of binlog_cache_size in a temporary variable # ######################################################################### SET @start_value = @@global.binlog_cache_size; SELECT @start_value; --echo '#--------------------FN_DYNVARS_006_01------------------------#' ######################################################################### # Display the DEFAULT value of binlog_cache_size # ######################################################################### SET @@global.binlog_cache_size = 100; SET @@global.binlog_cache_size = DEFAULT; SELECT @@global.binlog_cache_size; --echo '#---------------------FN_DYNVARS_006_02-------------------------#' ############################################### # Verify default value of variable # ############################################### SET @@global.binlog_cache_size = @start_value; SELECT @@global.binlog_cache_size = 32768; --echo '#--------------------FN_DYNVARS_006_03------------------------#' ######################################################################### # Change the value of binlog_cache_size to a valid value # ######################################################################### SET @@global.binlog_cache_size = 4096; SELECT @@global.binlog_cache_size; SET @@global.binlog_cache_size = 4294967295; SELECT @@global.binlog_cache_size; SET @@global.binlog_cache_size = 10000; SELECT @@global.binlog_cache_size; SET @@global.binlog_cache_size = 21221204; SELECT @@global.binlog_cache_size; echo 'Bug: Invalid values are coming in variable on assigning valid values'; --echo '#--------------------FN_DYNVARS_006_04-------------------------#' ############################################################################ # Change the value of binlog_cache_size to invalid value # ############################################################################ SET @@global.binlog_cache_size = 1024; SELECT @@global.binlog_cache_size; --Error ER_WRONG_TYPE_FOR_VAR SET @@global.binlog_cache_size = 10000.01; SET @@global.binlog_cache_size = -1024; SELECT @@global.binlog_cache_size; SET @@global.binlog_cache_size = 42949672950; SELECT @@global.binlog_cache_size; echo 'Bug: Errors are not coming on assigning invalid values to variable'; --Error ER_WRONG_TYPE_FOR_VAR SET @@global.binlog_cache_size = ON; --Error ER_WRONG_TYPE_FOR_VAR SET @@global.binlog_cache_size = 'test'; --echo '#-------------------FN_DYNVARS_006_05----------------------------#' ############################################################################ # Test if accessing session binlog_cache_size gives error # ############################################################################ --Error ER_GLOBAL_VARIABLE SET @@session.binlog_cache_size = 0; --echo '#----------------------FN_DYNVARS_006_06------------------------#' ############################################################################## # Check if the value in GLOBAL Tables matches values in variable # ############################################################################## SELECT @@global.binlog_cache_size = VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE VARIABLE_NAME='binlog_cache_size'; --echo '#---------------------FN_DYNVARS_006_07----------------------#' ################################################################### # Check if TRUE and FALSE values can be used on variable # ################################################################### SET @@global.binlog_cache_size = TRUE; SELECT @@global.binlog_cache_size; SET @@global.binlog_cache_size = FALSE; SELECT @@global.binlog_cache_size; echo 'Bug: Errors are not coming on assigning TRUE/FALSE to variable'; --echo '#---------------------FN_DYNVARS_006_08----------------------#' ############################################################################### # Check if accessing variable without SCOPE points to same global variable # ############################################################################### SET @@global.binlog_cache_size = 1; SELECT @@binlog_cache_size = @@global.binlog_cache_size; --echo '#---------------------FN_DYNVARS_006_09----------------------#' ########################################################################### # Check if binlog_cache_size can be accessed with and without @@ sign # ########################################################################### --Error ER_GLOBAL_VARIABLE SET binlog_cache_size = 1; --Error ER_PARSE_ERROR SET global.binlog_cache_size = 1; --Error ER_UNKNOWN_TABLE SELECT global.binlog_cache_size; --Error ER_BAD_FIELD_ERROR SELECT binlog_cache_size = @@session.binlog_cache_size; ############################## # Restore initial value # ############################## SET @@global.binlog_cache_size = @start_value; SELECT @@global.binlog_cache_size; ########################################################### # END OF binlog_cache_size TESTS # ########################################################### mysql-test/include/bulk_insert_buffer_size_basic.inc 0 → 100644 +203 −0 Original line number Diff line number Diff line ############## mysql-test\t\bulk_insert_buffer_size_basic.test ################# # # # Variable Name: bulk_insert_buffer_size # # Scope: GLOBAL & SESSION # # Access Type: Dynamic # # Data Type: Numeric # # Default Value: 8388608 # # Range: 0 - 4294967295 # # # # # # Creation Date: 2008-02-07 # # Author: Salman Rawala # # # # Description: Test Cases of Dynamic System Variable "bulk_insert_buffer_size" # # that checks 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#option_mysqld_bulk_insert_buffer_size # # # ################################################################################ --source include/load_sysvars.inc ####################################################################### # START OF bulk_insert_buffer_size TESTS # ####################################################################### ############################################################# # Save initial value # ############################################################# SET @start_global_value = @@global.bulk_insert_buffer_size; SELECT @start_global_value; SET @start_session_value = @@session.bulk_insert_buffer_size; SELECT @start_session_value; --echo '#--------------------FN_DYNVARS_007_01-------------------------#' ####################################################################### # Display the DEFAULT value of bulk_insert_buffer_size # ####################################################################### SET @@global.bulk_insert_buffer_size = 100; SET @@global.bulk_insert_buffer_size = DEFAULT; SELECT @@global.bulk_insert_buffer_size; SET @@session.bulk_insert_buffer_size = 200; SET @@session.bulk_insert_buffer_size = DEFAULT; SELECT @@session.bulk_insert_buffer_size; --echo '#--------------------FN_DYNVARS_007_02-------------------------#' ####################################################################### # Check the DEFAULT value of bulk_insert_buffer_size # ####################################################################### SET @@global.bulk_insert_buffer_size = @start_global_value; SELECT @@global.bulk_insert_buffer_size = 8388608; SET @@session.bulk_insert_buffer_size = @start_session_value; SELECT @@session.bulk_insert_buffer_size = 8388608; --echo '#--------------------FN_DYNVARS_007_03-------------------------#' ############################################################################### #Change the value of bulk_insert_buffer_size to valid values for GLOBAL Scope # ############################################################################### SET @@global.bulk_insert_buffer_size = 0; SELECT @@global.bulk_insert_buffer_size; SET @@global.bulk_insert_buffer_size = 1; SELECT @@global.bulk_insert_buffer_size; SET @@global.bulk_insert_buffer_size = 4294967295; SELECT @@global.bulk_insert_buffer_size; SET @@global.bulk_insert_buffer_size = 429496; SELECT @@global.bulk_insert_buffer_size; --echo '#--------------------FN_DYNVARS_007_04-------------------------#' ############################################################################### #Change the value of bulk_insert_buffer_size to valid values for SESSION Scope# ############################################################################### SET @@session.bulk_insert_buffer_size = 0; SELECT @@session.bulk_insert_buffer_size; SET @@session.bulk_insert_buffer_size = 1; SELECT @@session.bulk_insert_buffer_size; SET @@session.bulk_insert_buffer_size = 4294967295; SELECT @@session.bulk_insert_buffer_size; SET @@session.bulk_insert_buffer_size = 429496; SELECT @@session.bulk_insert_buffer_size; --echo '#------------------FN_DYNVARS_007_05-----------------------#' ################################################################### # Change the value of bulk_insert_buffer_size to an invalid value # ################################################################### SET @@global.bulk_insert_buffer_size = 42949672950; SELECT @@global.bulk_insert_buffer_size; SET @@global.bulk_insert_buffer_size = -1024; SELECT @@global.bulk_insert_buffer_size; --Error ER_WRONG_TYPE_FOR_VAR SET @@global.bulk_insert_buffer_size = test; --Error ER_WRONG_TYPE_FOR_VAR SET @@global.bulk_insert_buffer_size = ON; --Error ER_WRONG_TYPE_FOR_VAR SET @@global.bulk_insert_buffer_size = 429496.10; SET @@session.bulk_insert_buffer_size = 42949672950; SELECT @@session.bulk_insert_buffer_size; SET @@session.bulk_insert_buffer_size = -2; SELECT @@session.bulk_insert_buffer_size; echo 'Bug # 34837: Errors are not coming on assigning invalid values to variable'; --Error ER_WRONG_TYPE_FOR_VAR SET @@session.bulk_insert_buffer_size = test; --Error ER_WRONG_TYPE_FOR_VAR SET @@session.bulk_insert_buffer_size = 429496.10; --echo '#------------------FN_DYNVARS_007_06-----------------------#' #################################################################### # Check if the value in GLOBAL Table matches value in variable # #################################################################### SELECT @@global.bulk_insert_buffer_size = VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE VARIABLE_NAME='bulk_insert_buffer_size'; --echo '#------------------FN_DYNVARS_007_07-----------------------#' #################################################################### # Check if the value in SESSION Table matches value in variable # #################################################################### SELECT @@session.bulk_insert_buffer_size = VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_VARIABLES WHERE VARIABLE_NAME='bulk_insert_buffer_size'; --echo '#------------------FN_DYNVARS_007_08-----------------------#' #################################################################### # Check if TRUE and FALSE values can be used on variable # #################################################################### SET @@global.bulk_insert_buffer_size = TRUE; SELECT @@global.bulk_insert_buffer_size; SET @@global.bulk_insert_buffer_size = FALSE; SELECT @@global.bulk_insert_buffer_size; SET @@session.bulk_insert_buffer_size = TRUE; SELECT @@session.bulk_insert_buffer_size; SET @@session.bulk_insert_buffer_size = FALSE; SELECT @@session.bulk_insert_buffer_size; --echo '#---------------------FN_DYNVARS_007_09----------------------#' ############################################################################## # Check if accessing variable with SESSION,LOCAL and without SCOPE points # # to same session variable # ############################################################################## SET @@bulk_insert_buffer_size = 100; SELECT @@bulk_insert_buffer_size = @@local.bulk_insert_buffer_size; SELECT @@local.bulk_insert_buffer_size = @@session.bulk_insert_buffer_size; --echo '#---------------------FN_DYNVARS_007_10----------------------#' ############################################################################### # Check if bulk_insert_buffer_size can be accessed with and without @@ sign # ############################################################################### SET bulk_insert_buffer_size = 1; SELECT @@bulk_insert_buffer_size; --Error ER_PARSE_ERROR SET local.bulk_insert_buffer_size = 1; --Error ER_UNKNOWN_TABLE SELECT local.bulk_insert_buffer_size; --Error ER_PARSE_ERROR SET session.bulk_insert_buffer_size = 1; --Error ER_UNKNOWN_TABLE SELECT session.bulk_insert_buffer_size; --Error ER_BAD_FIELD_ERROR SELECT bulk_insert_buffer_size = @@session.bulk_insert_buffer_size; #################################### # Restore initial value # #################################### SET @@global.bulk_insert_buffer_size = @start_global_value; SELECT @@global.bulk_insert_buffer_size; SET @@session.bulk_insert_buffer_size = @start_session_value; SELECT @@session.bulk_insert_buffer_size; #################################################### # END OF bulk_insert_buffer_size TESTS # #################################################### mysql-test/include/delayed_insert_limit_basic.inc 0 → 100644 +167 −0 Original line number Diff line number Diff line ############### mysql-test\t\delayed_insert_limit_basic.test ################### # # # Variable Name: delayed_insert_limit # # Scope: GLOBAL # # Access Type: Dynamic # # Data Type: Numeric # # Default Value: 100 # # Range: 1 - 4294967295 # # # # # # Creation Date: 2008-02-07 # # Author: Salman Rawala # # # # Description: Test Cases of Dynamic System Variable "delayed_insert_limit" # # that checks 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#option_mysqld_delayed_insert_limit # # # ################################################################################ --source include/load_sysvars.inc ################################################################# # START OF delayed_insert_limit TESTS # ################################################################# ######################################################################### # Saving initial value of delayed_insert_limit in a temporary variable # ######################################################################### SET @start_value = @@global.delayed_insert_limit; SELECT @start_value; --echo '#--------------------FN_DYNVARS_024_01------------------------#' ######################################################################### # Display the DEFAULT value of delayed_insert_limit # ######################################################################### SET @@global.delayed_insert_limit = 100; SET @@global.delayed_insert_limit = DEFAULT; SELECT @@global.delayed_insert_limit; --echo '#---------------------FN_DYNVARS_024_02-------------------------#' ############################################### # Verify default value of variable # ############################################### SET @@global.delayed_insert_limit = @start_value; SELECT @@global.delayed_insert_limit = 100; --echo '#--------------------FN_DYNVARS_024_03------------------------#' ######################################################################### # Change the value of delayed_insert_limit to a valid value # ######################################################################### SET @@global.delayed_insert_limit = 10000; SELECT @@global.delayed_insert_limit; SET @@global.delayed_insert_limit = 4294967295; SELECT @@global.delayed_insert_limit; SET @@global.delayed_insert_limit = 1; SELECT @@global.delayed_insert_limit; --echo '#--------------------FN_DYNVARS_024_04-------------------------#' ############################################################################ # Change the value of delayed_insert_limit to invalid value # ############################################################################ SET @@global.delayed_insert_limit = 0; SELECT @@global.delayed_insert_limit; SET @@global.delayed_insert_limit = -1024; SELECT @@global.delayed_insert_limit; SET @@global.delayed_insert_limit = 42949672950; SELECT @@global.delayed_insert_limit; echo 'Bug # 34837: Errors are not coming on assigning invalid values to variable'; --Error ER_WRONG_TYPE_FOR_VAR SET @@global.delayed_insert_limit = 429496729.5; SELECT @@global.delayed_insert_limit; --Error ER_WRONG_TYPE_FOR_VAR SET @@global.delayed_insert_limit = ON; SELECT @@global.delayed_insert_limit; --echo '#-------------------FN_DYNVARS_024_05----------------------------#' ############################################################################ # Test if accessing session delayed_insert_limit gives error # ############################################################################ --Error ER_GLOBAL_VARIABLE SET @@session.delayed_insert_limit = 0; --Error ER_INCORRECT_GLOBAL_LOCAL_VAR SELECT @@Session.delayed_insert_limit; --echo '#----------------------FN_DYNVARS_024_06------------------------#' ############################################################################## # Check if the value in GLOBAL & SESSION Tables matches values in variable # ############################################################################## SELECT @@global.delayed_insert_limit = VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE VARIABLE_NAME='delayed_insert_limit'; SELECT @@delayed_insert_limit = VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_VARIABLES WHERE VARIABLE_NAME='delayed_insert_limit'; --echo '#---------------------FN_DYNVARS_024_07----------------------#' ################################################################### # Check if TRUE and FALSE values can be used on variable # ################################################################### SET @@global.delayed_insert_limit = TRUE; SELECT @@global.delayed_insert_limit; SET @@global.delayed_insert_limit = FALSE; SELECT @@global.delayed_insert_limit; --echo '#---------------------FN_DYNVARS_024_08----------------------#' ######################################################################################################## # Check if accessing variable with SESSION,LOCAL and without SCOPE points to same session variable # ######################################################################################################## SET @@global.delayed_insert_limit = 1; SELECT @@delayed_insert_limit = @@global.delayed_insert_limit; --echo '#---------------------FN_DYNVARS_024_09----------------------#' ############################################################################## # Check if delayed_insert_limit can be accessed with and without @@ sign # ############################################################################## --Error ER_GLOBAL_VARIABLE SET delayed_insert_limit = 1; SELECT @@delayed_insert_limit; --Error ER_PARSE_ERROR SET local.delayed_insert_limit = 1; --Error ER_UNKNOWN_TABLE SELECT local.delayed_insert_limit; --Error ER_PARSE_ERROR SET global.delayed_insert_limit = 1; --Error ER_UNKNOWN_TABLE SELECT global.delayed_insert_limit; --Error ER_BAD_FIELD_ERROR SELECT delayed_insert_limit = @@session.delayed_insert_limit; ############################## # Restore initial value # ############################## SET @@global.delayed_insert_limit = @start_value; SELECT @@global.delayed_insert_limit; ########################################################### # END OF delayed_insert_limit TESTS # ########################################################### mysql-test/include/delayed_queue_size_basic.inc 0 → 100644 +163 −0 File added.Preview size limit exceeded, changes collapsed. Show changes Loading
.bzrignore +4 −0 Original line number Diff line number Diff line Loading @@ -3024,3 +3024,7 @@ win/vs8cache.txt ylwrap zlib/*.ds? zlib/*.vcproj mysql-test/bug36522-64.tar mysql-test/bug36522.tar mysql-test/t.log mysql-test/tps.log
mysql-test/include/binlog_cache_size_basic.inc 0 → 100644 +154 −0 Original line number Diff line number Diff line ################# mysql-test\t\binlog_cache_size_basic.test #################### # # # Variable Name: binlog_cache_size # # Scope: GLOBAL # # Access Type: Dynamic # # Data Type: Numeric # # Default Value: 32768 # # Range: 4096 - 4294967295 # # # # # # Creation Date: 2008-04-28 # # Author: Salman Rawala/Horst Hunger # # # # Description: Test Cases of Dynamic System Variable "binlog_cache_size" # # that checks 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#option_mysqld_binlog_cache_size # # # ################################################################################ ################################################################# # START OF binlog_cache_size TESTS # ################################################################# ######################################################################### # Saving initial value of binlog_cache_size in a temporary variable # ######################################################################### SET @start_value = @@global.binlog_cache_size; SELECT @start_value; --echo '#--------------------FN_DYNVARS_006_01------------------------#' ######################################################################### # Display the DEFAULT value of binlog_cache_size # ######################################################################### SET @@global.binlog_cache_size = 100; SET @@global.binlog_cache_size = DEFAULT; SELECT @@global.binlog_cache_size; --echo '#---------------------FN_DYNVARS_006_02-------------------------#' ############################################### # Verify default value of variable # ############################################### SET @@global.binlog_cache_size = @start_value; SELECT @@global.binlog_cache_size = 32768; --echo '#--------------------FN_DYNVARS_006_03------------------------#' ######################################################################### # Change the value of binlog_cache_size to a valid value # ######################################################################### SET @@global.binlog_cache_size = 4096; SELECT @@global.binlog_cache_size; SET @@global.binlog_cache_size = 4294967295; SELECT @@global.binlog_cache_size; SET @@global.binlog_cache_size = 10000; SELECT @@global.binlog_cache_size; SET @@global.binlog_cache_size = 21221204; SELECT @@global.binlog_cache_size; echo 'Bug: Invalid values are coming in variable on assigning valid values'; --echo '#--------------------FN_DYNVARS_006_04-------------------------#' ############################################################################ # Change the value of binlog_cache_size to invalid value # ############################################################################ SET @@global.binlog_cache_size = 1024; SELECT @@global.binlog_cache_size; --Error ER_WRONG_TYPE_FOR_VAR SET @@global.binlog_cache_size = 10000.01; SET @@global.binlog_cache_size = -1024; SELECT @@global.binlog_cache_size; SET @@global.binlog_cache_size = 42949672950; SELECT @@global.binlog_cache_size; echo 'Bug: Errors are not coming on assigning invalid values to variable'; --Error ER_WRONG_TYPE_FOR_VAR SET @@global.binlog_cache_size = ON; --Error ER_WRONG_TYPE_FOR_VAR SET @@global.binlog_cache_size = 'test'; --echo '#-------------------FN_DYNVARS_006_05----------------------------#' ############################################################################ # Test if accessing session binlog_cache_size gives error # ############################################################################ --Error ER_GLOBAL_VARIABLE SET @@session.binlog_cache_size = 0; --echo '#----------------------FN_DYNVARS_006_06------------------------#' ############################################################################## # Check if the value in GLOBAL Tables matches values in variable # ############################################################################## SELECT @@global.binlog_cache_size = VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE VARIABLE_NAME='binlog_cache_size'; --echo '#---------------------FN_DYNVARS_006_07----------------------#' ################################################################### # Check if TRUE and FALSE values can be used on variable # ################################################################### SET @@global.binlog_cache_size = TRUE; SELECT @@global.binlog_cache_size; SET @@global.binlog_cache_size = FALSE; SELECT @@global.binlog_cache_size; echo 'Bug: Errors are not coming on assigning TRUE/FALSE to variable'; --echo '#---------------------FN_DYNVARS_006_08----------------------#' ############################################################################### # Check if accessing variable without SCOPE points to same global variable # ############################################################################### SET @@global.binlog_cache_size = 1; SELECT @@binlog_cache_size = @@global.binlog_cache_size; --echo '#---------------------FN_DYNVARS_006_09----------------------#' ########################################################################### # Check if binlog_cache_size can be accessed with and without @@ sign # ########################################################################### --Error ER_GLOBAL_VARIABLE SET binlog_cache_size = 1; --Error ER_PARSE_ERROR SET global.binlog_cache_size = 1; --Error ER_UNKNOWN_TABLE SELECT global.binlog_cache_size; --Error ER_BAD_FIELD_ERROR SELECT binlog_cache_size = @@session.binlog_cache_size; ############################## # Restore initial value # ############################## SET @@global.binlog_cache_size = @start_value; SELECT @@global.binlog_cache_size; ########################################################### # END OF binlog_cache_size TESTS # ###########################################################
mysql-test/include/bulk_insert_buffer_size_basic.inc 0 → 100644 +203 −0 Original line number Diff line number Diff line ############## mysql-test\t\bulk_insert_buffer_size_basic.test ################# # # # Variable Name: bulk_insert_buffer_size # # Scope: GLOBAL & SESSION # # Access Type: Dynamic # # Data Type: Numeric # # Default Value: 8388608 # # Range: 0 - 4294967295 # # # # # # Creation Date: 2008-02-07 # # Author: Salman Rawala # # # # Description: Test Cases of Dynamic System Variable "bulk_insert_buffer_size" # # that checks 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#option_mysqld_bulk_insert_buffer_size # # # ################################################################################ --source include/load_sysvars.inc ####################################################################### # START OF bulk_insert_buffer_size TESTS # ####################################################################### ############################################################# # Save initial value # ############################################################# SET @start_global_value = @@global.bulk_insert_buffer_size; SELECT @start_global_value; SET @start_session_value = @@session.bulk_insert_buffer_size; SELECT @start_session_value; --echo '#--------------------FN_DYNVARS_007_01-------------------------#' ####################################################################### # Display the DEFAULT value of bulk_insert_buffer_size # ####################################################################### SET @@global.bulk_insert_buffer_size = 100; SET @@global.bulk_insert_buffer_size = DEFAULT; SELECT @@global.bulk_insert_buffer_size; SET @@session.bulk_insert_buffer_size = 200; SET @@session.bulk_insert_buffer_size = DEFAULT; SELECT @@session.bulk_insert_buffer_size; --echo '#--------------------FN_DYNVARS_007_02-------------------------#' ####################################################################### # Check the DEFAULT value of bulk_insert_buffer_size # ####################################################################### SET @@global.bulk_insert_buffer_size = @start_global_value; SELECT @@global.bulk_insert_buffer_size = 8388608; SET @@session.bulk_insert_buffer_size = @start_session_value; SELECT @@session.bulk_insert_buffer_size = 8388608; --echo '#--------------------FN_DYNVARS_007_03-------------------------#' ############################################################################### #Change the value of bulk_insert_buffer_size to valid values for GLOBAL Scope # ############################################################################### SET @@global.bulk_insert_buffer_size = 0; SELECT @@global.bulk_insert_buffer_size; SET @@global.bulk_insert_buffer_size = 1; SELECT @@global.bulk_insert_buffer_size; SET @@global.bulk_insert_buffer_size = 4294967295; SELECT @@global.bulk_insert_buffer_size; SET @@global.bulk_insert_buffer_size = 429496; SELECT @@global.bulk_insert_buffer_size; --echo '#--------------------FN_DYNVARS_007_04-------------------------#' ############################################################################### #Change the value of bulk_insert_buffer_size to valid values for SESSION Scope# ############################################################################### SET @@session.bulk_insert_buffer_size = 0; SELECT @@session.bulk_insert_buffer_size; SET @@session.bulk_insert_buffer_size = 1; SELECT @@session.bulk_insert_buffer_size; SET @@session.bulk_insert_buffer_size = 4294967295; SELECT @@session.bulk_insert_buffer_size; SET @@session.bulk_insert_buffer_size = 429496; SELECT @@session.bulk_insert_buffer_size; --echo '#------------------FN_DYNVARS_007_05-----------------------#' ################################################################### # Change the value of bulk_insert_buffer_size to an invalid value # ################################################################### SET @@global.bulk_insert_buffer_size = 42949672950; SELECT @@global.bulk_insert_buffer_size; SET @@global.bulk_insert_buffer_size = -1024; SELECT @@global.bulk_insert_buffer_size; --Error ER_WRONG_TYPE_FOR_VAR SET @@global.bulk_insert_buffer_size = test; --Error ER_WRONG_TYPE_FOR_VAR SET @@global.bulk_insert_buffer_size = ON; --Error ER_WRONG_TYPE_FOR_VAR SET @@global.bulk_insert_buffer_size = 429496.10; SET @@session.bulk_insert_buffer_size = 42949672950; SELECT @@session.bulk_insert_buffer_size; SET @@session.bulk_insert_buffer_size = -2; SELECT @@session.bulk_insert_buffer_size; echo 'Bug # 34837: Errors are not coming on assigning invalid values to variable'; --Error ER_WRONG_TYPE_FOR_VAR SET @@session.bulk_insert_buffer_size = test; --Error ER_WRONG_TYPE_FOR_VAR SET @@session.bulk_insert_buffer_size = 429496.10; --echo '#------------------FN_DYNVARS_007_06-----------------------#' #################################################################### # Check if the value in GLOBAL Table matches value in variable # #################################################################### SELECT @@global.bulk_insert_buffer_size = VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE VARIABLE_NAME='bulk_insert_buffer_size'; --echo '#------------------FN_DYNVARS_007_07-----------------------#' #################################################################### # Check if the value in SESSION Table matches value in variable # #################################################################### SELECT @@session.bulk_insert_buffer_size = VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_VARIABLES WHERE VARIABLE_NAME='bulk_insert_buffer_size'; --echo '#------------------FN_DYNVARS_007_08-----------------------#' #################################################################### # Check if TRUE and FALSE values can be used on variable # #################################################################### SET @@global.bulk_insert_buffer_size = TRUE; SELECT @@global.bulk_insert_buffer_size; SET @@global.bulk_insert_buffer_size = FALSE; SELECT @@global.bulk_insert_buffer_size; SET @@session.bulk_insert_buffer_size = TRUE; SELECT @@session.bulk_insert_buffer_size; SET @@session.bulk_insert_buffer_size = FALSE; SELECT @@session.bulk_insert_buffer_size; --echo '#---------------------FN_DYNVARS_007_09----------------------#' ############################################################################## # Check if accessing variable with SESSION,LOCAL and without SCOPE points # # to same session variable # ############################################################################## SET @@bulk_insert_buffer_size = 100; SELECT @@bulk_insert_buffer_size = @@local.bulk_insert_buffer_size; SELECT @@local.bulk_insert_buffer_size = @@session.bulk_insert_buffer_size; --echo '#---------------------FN_DYNVARS_007_10----------------------#' ############################################################################### # Check if bulk_insert_buffer_size can be accessed with and without @@ sign # ############################################################################### SET bulk_insert_buffer_size = 1; SELECT @@bulk_insert_buffer_size; --Error ER_PARSE_ERROR SET local.bulk_insert_buffer_size = 1; --Error ER_UNKNOWN_TABLE SELECT local.bulk_insert_buffer_size; --Error ER_PARSE_ERROR SET session.bulk_insert_buffer_size = 1; --Error ER_UNKNOWN_TABLE SELECT session.bulk_insert_buffer_size; --Error ER_BAD_FIELD_ERROR SELECT bulk_insert_buffer_size = @@session.bulk_insert_buffer_size; #################################### # Restore initial value # #################################### SET @@global.bulk_insert_buffer_size = @start_global_value; SELECT @@global.bulk_insert_buffer_size; SET @@session.bulk_insert_buffer_size = @start_session_value; SELECT @@session.bulk_insert_buffer_size; #################################################### # END OF bulk_insert_buffer_size TESTS # ####################################################
mysql-test/include/delayed_insert_limit_basic.inc 0 → 100644 +167 −0 Original line number Diff line number Diff line ############### mysql-test\t\delayed_insert_limit_basic.test ################### # # # Variable Name: delayed_insert_limit # # Scope: GLOBAL # # Access Type: Dynamic # # Data Type: Numeric # # Default Value: 100 # # Range: 1 - 4294967295 # # # # # # Creation Date: 2008-02-07 # # Author: Salman Rawala # # # # Description: Test Cases of Dynamic System Variable "delayed_insert_limit" # # that checks 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#option_mysqld_delayed_insert_limit # # # ################################################################################ --source include/load_sysvars.inc ################################################################# # START OF delayed_insert_limit TESTS # ################################################################# ######################################################################### # Saving initial value of delayed_insert_limit in a temporary variable # ######################################################################### SET @start_value = @@global.delayed_insert_limit; SELECT @start_value; --echo '#--------------------FN_DYNVARS_024_01------------------------#' ######################################################################### # Display the DEFAULT value of delayed_insert_limit # ######################################################################### SET @@global.delayed_insert_limit = 100; SET @@global.delayed_insert_limit = DEFAULT; SELECT @@global.delayed_insert_limit; --echo '#---------------------FN_DYNVARS_024_02-------------------------#' ############################################### # Verify default value of variable # ############################################### SET @@global.delayed_insert_limit = @start_value; SELECT @@global.delayed_insert_limit = 100; --echo '#--------------------FN_DYNVARS_024_03------------------------#' ######################################################################### # Change the value of delayed_insert_limit to a valid value # ######################################################################### SET @@global.delayed_insert_limit = 10000; SELECT @@global.delayed_insert_limit; SET @@global.delayed_insert_limit = 4294967295; SELECT @@global.delayed_insert_limit; SET @@global.delayed_insert_limit = 1; SELECT @@global.delayed_insert_limit; --echo '#--------------------FN_DYNVARS_024_04-------------------------#' ############################################################################ # Change the value of delayed_insert_limit to invalid value # ############################################################################ SET @@global.delayed_insert_limit = 0; SELECT @@global.delayed_insert_limit; SET @@global.delayed_insert_limit = -1024; SELECT @@global.delayed_insert_limit; SET @@global.delayed_insert_limit = 42949672950; SELECT @@global.delayed_insert_limit; echo 'Bug # 34837: Errors are not coming on assigning invalid values to variable'; --Error ER_WRONG_TYPE_FOR_VAR SET @@global.delayed_insert_limit = 429496729.5; SELECT @@global.delayed_insert_limit; --Error ER_WRONG_TYPE_FOR_VAR SET @@global.delayed_insert_limit = ON; SELECT @@global.delayed_insert_limit; --echo '#-------------------FN_DYNVARS_024_05----------------------------#' ############################################################################ # Test if accessing session delayed_insert_limit gives error # ############################################################################ --Error ER_GLOBAL_VARIABLE SET @@session.delayed_insert_limit = 0; --Error ER_INCORRECT_GLOBAL_LOCAL_VAR SELECT @@Session.delayed_insert_limit; --echo '#----------------------FN_DYNVARS_024_06------------------------#' ############################################################################## # Check if the value in GLOBAL & SESSION Tables matches values in variable # ############################################################################## SELECT @@global.delayed_insert_limit = VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE VARIABLE_NAME='delayed_insert_limit'; SELECT @@delayed_insert_limit = VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_VARIABLES WHERE VARIABLE_NAME='delayed_insert_limit'; --echo '#---------------------FN_DYNVARS_024_07----------------------#' ################################################################### # Check if TRUE and FALSE values can be used on variable # ################################################################### SET @@global.delayed_insert_limit = TRUE; SELECT @@global.delayed_insert_limit; SET @@global.delayed_insert_limit = FALSE; SELECT @@global.delayed_insert_limit; --echo '#---------------------FN_DYNVARS_024_08----------------------#' ######################################################################################################## # Check if accessing variable with SESSION,LOCAL and without SCOPE points to same session variable # ######################################################################################################## SET @@global.delayed_insert_limit = 1; SELECT @@delayed_insert_limit = @@global.delayed_insert_limit; --echo '#---------------------FN_DYNVARS_024_09----------------------#' ############################################################################## # Check if delayed_insert_limit can be accessed with and without @@ sign # ############################################################################## --Error ER_GLOBAL_VARIABLE SET delayed_insert_limit = 1; SELECT @@delayed_insert_limit; --Error ER_PARSE_ERROR SET local.delayed_insert_limit = 1; --Error ER_UNKNOWN_TABLE SELECT local.delayed_insert_limit; --Error ER_PARSE_ERROR SET global.delayed_insert_limit = 1; --Error ER_UNKNOWN_TABLE SELECT global.delayed_insert_limit; --Error ER_BAD_FIELD_ERROR SELECT delayed_insert_limit = @@session.delayed_insert_limit; ############################## # Restore initial value # ############################## SET @@global.delayed_insert_limit = @start_value; SELECT @@global.delayed_insert_limit; ########################################################### # END OF delayed_insert_limit TESTS # ###########################################################
mysql-test/include/delayed_queue_size_basic.inc 0 → 100644 +163 −0 File added.Preview size limit exceeded, changes collapsed. Show changes