1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190
|
--source include/not_embedded.inc
#
# only global
#
####### mysql-test\t\slave_transaction_retry_interval_basic.test ##############
# #
# Variable Name: slave_transaction_retry_interval #
# Scope: GLOBAL #
# Access Type: Dynamic #
# Data Type: numeric #
# Default Value: 10 #
# Range: #
# #
# #
# Creation Date: 2008-02-07 #
# Author: Rizwan #
# #
# Description: Test Cases of Dynamic System Variable #
# slave_transaction_retry_interval #
# 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/not_embedded.inc
--source include/load_sysvars.inc
###################################################################
# START OF slave_transaction_retry_interval TESTS #
###################################################################
#############################################################
# Save initial value #
#############################################################
SET @start_global_value = @@global.slave_transaction_retry_interval;
SELECT @start_global_value;
--echo '#--------------------FN_DYNVARS_149_01-------------------------#'
###################################################################
# Display the DEFAULT value of slave_transaction_retry_interval #
###################################################################
SET @@global.slave_transaction_retry_interval = 50;
SET @@global.slave_transaction_retry_interval = DEFAULT;
SELECT @@global.slave_transaction_retry_interval;
--echo '#--------------------FN_DYNVARS_149_02-------------------------#'
###################################################################
# Check the DEFAULT value of slave_transaction_retry_interval #
###################################################################
SET @@global.slave_transaction_retry_interval = DEFAULT;
SELECT @@global.slave_transaction_retry_interval = 10;
--echo '#--------------------FN_DYNVARS_149_03-------------------------#'
###############################################################################
# Change the value of slave_transaction_retry_interval to a valid value for
# GLOBAL Scope
###############################################################################
SET @@global.slave_transaction_retry_interval = 0;
SELECT @@global.slave_transaction_retry_interval;
SET @@global.slave_transaction_retry_interval = 1;
SELECT @@global.slave_transaction_retry_interval;
SET @@global.slave_transaction_retry_interval = 15;
SELECT @@global.slave_transaction_retry_interval;
SET @@global.slave_transaction_retry_interval = 1024;
SELECT @@global.slave_transaction_retry_interval;
SET @@global.slave_transaction_retry_interval = 2147483648;
SELECT @@global.slave_transaction_retry_interval;
SET @@global.slave_transaction_retry_interval = 2147483648*2-1;
SELECT @@global.slave_transaction_retry_interval;
SET @@global.slave_transaction_retry_interval = 2147483649*2;
SELECT @@global.slave_transaction_retry_interval;
SET @@global.slave_transaction_retry_interval = 4294967295;
SELECT @@global.slave_transaction_retry_interval;
--echo '#--------------------FN_DYNVARS_149_04-------------------------#'
##############################################################################
# Check if variable can be access with session scope #
##############################################################################
--Error ER_GLOBAL_VARIABLE
SET @@slave_transaction_retry_interval = 2;
--Error ER_GLOBAL_VARIABLE
SET @@session.slave_transaction_retry_interval = 3;
--Error ER_GLOBAL_VARIABLE
SET @@local.slave_transaction_retry_interval = 4;
--echo '#------------------FN_DYNVARS_149_05-----------------------#'
############################################################################
# Change the value of slave_transaction_retry_interval to an invalid value #
############################################################################
SET @@global.slave_transaction_retry_interval = -1;
SELECT @@global.slave_transaction_retry_interval;
SET @@global.slave_transaction_retry_interval = 2147483649*2147483649;
SELECT @@global.slave_transaction_retry_interval;
--Error ER_WRONG_TYPE_FOR_VAR
SET @@global.slave_transaction_retry_interval = 65530.34;
--Error ER_WRONG_TYPE_FOR_VAR
SET @@global.slave_transaction_retry_interval = '100';
--Error ER_WRONG_TYPE_FOR_VAR
SET @@global.slave_transaction_retry_interval = 7483649.56;
--Error ER_WRONG_TYPE_FOR_VAR
SET @@global.slave_transaction_retry_interval = ON;
--Error ER_WRONG_TYPE_FOR_VAR
SET @@global.slave_transaction_retry_interval = OFF;
--echo '#------------------FN_DYNVARS_149_06-----------------------#'
####################################################################
# Check if the value in GLOBAL Table matches value in variable #
####################################################################
SET @@global.slave_transaction_retry_interval = 3000;
SELECT @@global.slave_transaction_retry_interval = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='slave_transaction_retry_interval';
--echo '#------------------FN_DYNVARS_149_07-----------------------#'
###########################################################################
# Check if the value is present in INFORMATION_SCHEMA.SESSION_VARIABLES #
###########################################################################
SELECT count(VARIABLE_VALUE)
FROM INFORMATION_SCHEMA.SESSION_VARIABLES
WHERE VARIABLE_NAME='slave_transaction_retry_interval';
--echo '#------------------FN_DYNVARS_149_08-----------------------#'
####################################################################
# Check if TRUE and FALSE values can be used on variable #
####################################################################
SET @@global.slave_transaction_retry_interval = TRUE;
SELECT @@global.slave_transaction_retry_interval;
SET @@global.slave_transaction_retry_interval = FALSE;
SELECT @@global.slave_transaction_retry_interval;
--echo '#---------------------FN_DYNVARS_149_09----------------------#'
###############################################################################
# Check if accessing variable with and without GLOBAL point to same variable #
###############################################################################
SET @@global.slave_transaction_retry_interval = 60*60;
SELECT @@slave_transaction_retry_interval = @@global.slave_transaction_retry_interval;
--echo '#---------------------FN_DYNVARS_149_10----------------------#'
###############################################################################
# Check if slave_transaction_retry_interval can be accessed without @@ sign
# and scope
###############################################################################
--Error ER_GLOBAL_VARIABLE
SET slave_transaction_retry_interval = 2048;
--Error ER_BAD_FIELD_ERROR
SELECT slave_transaction_retry_interval;
SELECT @@slave_transaction_retry_interval;
#verifying another another syntax for setting value
SET global slave_transaction_retry_interval = 99;
####################################
# Restore initial value #
####################################
SET @@global.slave_transaction_retry_interval = @start_global_value;
SELECT @@global.slave_transaction_retry_interval;
########################################################
# END OF slave_transaction_retry_interval TESTS #
########################################################
|