Debian Codegraph @

mysql-test/suite/sys_vars/t/innodb_autoextend_increment_basic.test

raw
1 ################# mysql-test\t\innodb_autoextend_increment _basic.test ###########
2 # #
3 # Variable Name: innodb_autoextend_increment #
4 # Scope: GLOBAL #
5 # Access Type: Dynamic #
6 # Data Type: Numeric #
7 # Default Value: 64 #
8 # Range: 0,1 #
9 # #
10 # #
11 # Creation Date: 2008-02-07 #
12 # Author: Rizwan #
13 # #
14 # Description: #
15 # Test Cases of Dynamic System Variable innodb_autoextend_increment that #
16 # checks the behavior of this variable in the following ways #
17 # * Default Value #
18 # * Valid & Invalid values #
19 # * Scope & Access method #
20 # * Data Integrity #
21 # #
22 # Reference: http://dev.mysql.com/doc/refman/5.1/en/server-system-variables.html #
23 # #
24 ##################################################################################
25
26 --source include/have_innodb.inc
27 --source include/load_sysvars.inc
28
29 ########################################################################
30 # START OF innodb_autoextend_increment TESTS #
31 ########################################################################
32
33
34 ###############################################################################
35 # Saving initial value of innodb_autoextend_increment in a temporary variable #
36 ###############################################################################
37
38
39 SET @global_start_value = @@global.innodb_autoextend_increment ;
40
41 --echo '#--------------------FN_DYNVARS_046_01------------------------#'
42 ########################################################################
43 # Display the DEFAULT value of innodb_autoextend_increment #
44 ########################################################################
45
46 SET @@global.innodb_autoextend_increment = 0;
47 SET @@global.innodb_autoextend_increment = DEFAULT;
48 SELECT @@global.innodb_autoextend_increment ;
49
50 --echo '#---------------------FN_DYNVARS_046_02-------------------------#'
51 ####################################################################################
52 # Check if innodb_autoextend_increment can be accessed with and without @@ sign #
53 ####################################################################################
54
55 --Error ER_GLOBAL_VARIABLE
56 SET innodb_autoextend_increment = 1;
57 SELECT @@innodb_autoextend_increment ;
58
59 --Error ER_UNKNOWN_TABLE
60 SELECT local.innodb_autoextend_increment ;
61
62 SET global innodb_autoextend_increment = 0;
63 SELECT @@global.innodb_autoextend_increment ;
64
65
66 --echo '#--------------------FN_DYNVARS_046_03------------------------#'
67 ##########################################################################
68 # change the value of innodb_autoextend_increment to a valid value #
69 ##########################################################################
70
71 SET @@global.innodb_autoextend_increment = 1;
72 SELECT @@global.innodb_autoextend_increment ;
73 SET @@global.innodb_autoextend_increment = 1000;
74 SELECT @@global.innodb_autoextend_increment ;
75
76
77 --echo '#--------------------FN_DYNVARS_046_04-------------------------#'
78 ###########################################################################
79 # Change the value of innodb_autoextend_increment to invalid value #
80 ###########################################################################
81
82 SET @@global.innodb_autoextend_increment = -1;
83 SELECT @@global.innodb_autoextend_increment;
84
85 --Error ER_WRONG_TYPE_FOR_VAR
86 SET @@global.innodb_autoextend_increment = "T";
87 SELECT @@global.innodb_autoextend_increment;
88
89 --Error ER_WRONG_TYPE_FOR_VAR
90 SET @@global.innodb_autoextend_increment = "Y";
91 SELECT @@global.innodb_autoextend_increment;
92
93 SET @@global.innodb_autoextend_increment = 1001;
94 SELECT @@global.innodb_autoextend_increment;
95
96
97 SET @@global.innodb_autoextend_increment = 2000 ;
98 SELECT @@global.innodb_autoextend_increment;
99
100 --echo '#----------------------FN_DYNVARS_046_05------------------------#'
101 #########################################################################
102 # Check if the value in GLOBAL Table matches value in variable #
103 #########################################################################
104
105 --disable_warnings
106 SELECT @@global.innodb_autoextend_increment = VARIABLE_VALUE
107 FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
108 WHERE VARIABLE_NAME='innodb_autoextend_increment ';
109 --enable_warnings
110 SELECT @@global.innodb_autoextend_increment ;
111 --disable_warnings
112 SELECT VARIABLE_VALUE
113 FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
114 WHERE VARIABLE_NAME='innodb_autoextend_increment ';
115 --enable_warnings
116
117
118 --echo '#---------------------FN_DYNVARS_046_06-------------------------#'
119 ###################################################################
120 # Check if ON and OFF values can be used on variable #
121 ###################################################################
122
123 --ERROR ER_WRONG_TYPE_FOR_VAR
124 SET @@global.innodb_autoextend_increment = OFF;
125 SELECT @@global.innodb_autoextend_increment ;
126
127 --Error ER_WRONG_TYPE_FOR_VAR
128 SET @@global.innodb_autoextend_increment = ON;
129 SELECT @@global.innodb_autoextend_increment ;
130
131
132 --echo '#---------------------FN_DYNVARS_046_07----------------------#'
133 ###################################################################
134 # Check if TRUE and FALSE values can be used on variable #
135 ###################################################################
136
137 SET @@global.innodb_autoextend_increment = TRUE;
138 SELECT @@global.innodb_autoextend_increment ;
139 SET @@global.innodb_autoextend_increment = FALSE;
140 SELECT @@global.innodb_autoextend_increment ;
141
142
143 ##############################
144 # Restore initial value #
145 ##############################
146
147 SET @@global.innodb_autoextend_increment = @global_start_value;
148
149 ###############################################################
150 # END OF innodb_autoextend_increment TESTS #
151 ###############################################################
152