1
################# mysql-test\t\innodb_autoextend_increment _basic.test ###################
3
# Variable Name: innodb_autoextend_increment #
5
# Access Type: Dynamic #
11
# Creation Date: 2008-02-07 #
14
#Description:Test Cases of Dynamic System Variable innodb_autoextend_increment#
15
# that checks the behavior of this variable in the following ways #
17
# * Valid & Invalid values #
18
# * Scope & Access method #
21
# Reference: http://dev.mysql.com/doc/refman/5.1/en/ #
22
# server-system-variables.html #
24
###############################################################################
26
--source include/have_innodb.inc
27
--source include/load_sysvars.inc
29
########################################################################
30
# START OF innodb_autoextend_increment TESTS #
31
########################################################################
34
################################################################################
35
# Saving initial value of innodb_autoextend_increment in a temporary variable#
36
################################################################################
39
SET @global_start_value = @@global.innodb_autoextend_increment ;
40
SELECT @global_start_value;
44
--echo '#--------------------FN_DYNVARS_046_01------------------------#'
45
########################################################################
46
# Display the DEFAULT value of innodb_autoextend_increment #
47
########################################################################
51
SET @@global.innodb_autoextend_increment = 0;
52
SET @@global.innodb_autoextend_increment = DEFAULT;
53
SELECT @@global.innodb_autoextend_increment ;
55
--echo '#---------------------FN_DYNVARS_046_02-------------------------#'
56
####################################################################################
57
# Check if innodb_autoextend_increment can be accessed with and without @@ sign #
58
####################################################################################
60
--Error ER_GLOBAL_VARIABLE
61
SET innodb_autoextend_increment = 1;
62
SELECT @@innodb_autoextend_increment ;
65
--Error ER_UNKNOWN_TABLE
66
SELECT local.innodb_autoextend_increment ;
69
SET global innodb_autoextend_increment = 0;
70
SELECT @@global.innodb_autoextend_increment ;
73
--echo '#--------------------FN_DYNVARS_046_03------------------------#'
74
##########################################################################
75
# change the value of innodb_autoextend_increment to a valid value #
76
##########################################################################
80
SET @@global.innodb_autoextend_increment = 1;
81
SELECT @@global.innodb_autoextend_increment ;
82
SET @@global.innodb_autoextend_increment = 1000;
83
SELECT @@global.innodb_autoextend_increment ;
85
--echo '#--------------------FN_DYNVARS_046_04-------------------------#'
86
###########################################################################
87
# Change the value of innodb_autoextend_increment to invalid value #
88
###########################################################################
93
SET @@global.innodb_autoextend_increment = -1;
94
SELECT @@global.innodb_autoextend_increment;
97
--Error ER_WRONG_TYPE_FOR_VAR
98
SET @@global.innodb_autoextend_increment = "T";
99
SELECT @@global.innodb_autoextend_increment;
101
--Error ER_WRONG_TYPE_FOR_VAR
102
SET @@global.innodb_autoextend_increment = "Y";
103
SELECT @@global.innodb_autoextend_increment;
106
SET @@global.innodb_autoextend_increment = 1001;
107
SELECT @@global.innodb_autoextend_increment;
112
--echo '#----------------------FN_DYNVARS_046_05------------------------#'
113
#########################################################################
114
# Check if the value in GLOBAL Table matches value in variable #
115
#########################################################################
117
SELECT @@global.innodb_autoextend_increment = VARIABLE_VALUE
118
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
119
WHERE VARIABLE_NAME='innodb_autoextend_increment ';
120
SELECT @@global.innodb_autoextend_increment ;
121
SELECT VARIABLE_VALUE
122
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
123
WHERE VARIABLE_NAME='innodb_autoextend_increment ';
126
--echo '#---------------------FN_DYNVARS_046_06-------------------------#'
127
###################################################################
128
# Check if ON and OFF values can be used on variable #
129
###################################################################
131
--ERROR ER_WRONG_TYPE_FOR_VAR
132
SET @@global.innodb_autoextend_increment = OFF;
133
SELECT @@global.innodb_autoextend_increment ;
135
--Error ER_WRONG_TYPE_FOR_VAR
136
SET @@global.innodb_autoextend_increment = ON;
137
SELECT @@global.innodb_autoextend_increment ;
139
--echo '#---------------------FN_DYNVARS_046_07----------------------#'
140
###################################################################
141
# Check if TRUE and FALSE values can be used on variable #
142
###################################################################
145
SET @@global.innodb_autoextend_increment = TRUE;
146
SELECT @@global.innodb_autoextend_increment ;
147
SET @@global.innodb_autoextend_increment = FALSE;
148
SELECT @@global.innodb_autoextend_increment ;
150
##############################
151
# Restore initial value #
152
##############################
155
#SET @@global.innodb_autoextend_increment = @global_start_value;
156
#SELECT @@global.innodb_autoextend_increment ;
158
###############################################################
159
# END OF innodb_autoextend_increment TESTS #
160
###############################################################