Debian Codegraph @

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

raw
1
2
3 ################## mysql-test\t\innodb_file_io_threads_basic.test #############
4 # #
5 # Variable Name: innodb_file_io_threads #
6 # Scope: Global #
7 # Access Type: Static #
8 # Data Type: numeric #
9 # #
10 # #
11 # Creation Date: 2008-02-07 #
12 # Author : Sharique Abdullah #
13 # #
14 # #
15 # Description:Test Cases of Dynamic System Variable innodb_file_io_threads #
16 # that checks the behavior of this variable in the following ways #
17 # * Value Check #
18 # * Scope Check #
19 # #
20 # Reference: http://dev.mysql.com/doc/refman/5.1/en/ #
21 # server-system-variables.html #
22 # #
23 ###############################################################################
24
25
26 --echo '#---------------------BS_STVARS_027_01----------------------#'
27 ####################################################################
28 # Displaying default value #
29 ####################################################################
30 SELECT COUNT(@@GLOBAL.innodb_read_io_threads);
31 --echo 1 Expected
32 SELECT COUNT(@@GLOBAL.innodb_write_io_threads);
33 --echo 1 Expected
34
35
36 --echo '#---------------------BS_STVARS_027_02----------------------#'
37 ####################################################################
38 # Check if Value can set #
39 ####################################################################
40
41 --error ER_INCORRECT_GLOBAL_LOCAL_VAR
42 SET @@GLOBAL.innodb_read_io_threads=1;
43 --echo Expected error 'Read only variable'
44
45 SELECT COUNT(@@GLOBAL.innodb_read_io_threads);
46 --echo 1 Expected
47
48 --error ER_INCORRECT_GLOBAL_LOCAL_VAR
49 SET @@GLOBAL.innodb_write_io_threads=1;
50 --echo Expected error 'Read only variable'
51
52 SELECT COUNT(@@GLOBAL.innodb_write_io_threads);
53 --echo 1 Expected
54
55
56
57
58 --echo '#---------------------BS_STVARS_027_03----------------------#'
59 #################################################################
60 # Check if the value in GLOBAL Table matches value in variable #
61 #################################################################
62
63 --disable_warnings
64 SELECT @@GLOBAL.innodb_read_io_threads = VARIABLE_VALUE
65 FROM performance_schema.global_variables
66 WHERE VARIABLE_NAME='innodb_read_io_threads';
67 --enable_warnings
68 --echo 1 Expected
69
70 SELECT COUNT(@@GLOBAL.innodb_read_io_threads);
71 --echo 1 Expected
72
73 --disable_warnings
74 SELECT COUNT(VARIABLE_VALUE)
75 FROM performance_schema.global_variables
76 WHERE VARIABLE_NAME='innodb_read_io_threads';
77 --enable_warnings
78 --echo 1 Expected
79
80 --disable_warnings
81 SELECT @@GLOBAL.innodb_write_io_threads = VARIABLE_VALUE
82 FROM performance_schema.global_variables
83 WHERE VARIABLE_NAME='innodb_write_io_threads';
84 --enable_warnings
85 --echo 1 Expected
86
87 SELECT COUNT(@@GLOBAL.innodb_write_io_threads);
88 --echo 1 Expected
89
90 --disable_warnings
91 SELECT COUNT(VARIABLE_VALUE)
92 FROM performance_schema.global_variables
93 WHERE VARIABLE_NAME='innodb_write_io_threads';
94 --enable_warnings
95 --echo 1 Expected
96
97
98 --echo '#---------------------BS_STVARS_027_04----------------------#'
99 ################################################################################
100 # Check if accessing variable with and without GLOBAL point to same variable #
101 ################################################################################
102 SELECT @@innodb_read_io_threads = @@GLOBAL.innodb_read_io_threads;
103 --echo 1 Expected
104
105 SELECT @@innodb_write_io_threads = @@GLOBAL.innodb_write_io_threads;
106 --echo 1 Expected
107
108
109 --echo '#---------------------BS_STVARS_027_05----------------------#'
110 ################################################################################
111 # Check if innodb_read_io_threads can be accessed with and without @@ sign #
112 # Check if innodb_write_io_threads can be accessed with and without @@ sign #
113 ################################################################################
114
115 SELECT COUNT(@@innodb_read_io_threads);
116 --echo 1 Expected
117
118 --Error ER_INCORRECT_GLOBAL_LOCAL_VAR
119 SELECT COUNT(@@local.innodb_read_io_threads);
120 --echo Expected error 'Variable is a GLOBAL variable'
121
122 --Error ER_INCORRECT_GLOBAL_LOCAL_VAR
123 SELECT COUNT(@@SESSION.innodb_read_io_threads);
124 --echo Expected error 'Variable is a GLOBAL variable'
125
126 SELECT COUNT(@@GLOBAL.innodb_read_io_threads);
127 --echo 1 Expected
128
129 --Error ER_BAD_FIELD_ERROR
130 SELECT innodb_read_io_threads;
131 --echo Expected error 'Unknown column'
132
133 SELECT COUNT(@@innodb_write_io_threads);
134 --echo 1 Expected
135
136 --Error ER_INCORRECT_GLOBAL_LOCAL_VAR
137 SELECT COUNT(@@local.innodb_write_io_threads);
138 --echo Expected error 'Variable is a GLOBAL variable'
139
140 --Error ER_INCORRECT_GLOBAL_LOCAL_VAR
141 SELECT COUNT(@@SESSION.innodb_write_io_threads);
142 --echo Expected error 'Variable is a GLOBAL variable'
143
144 SELECT COUNT(@@GLOBAL.innodb_write_io_threads);
145 --echo 1 Expected
146
147 --Error ER_BAD_FIELD_ERROR
148 SELECT innodb_write_io_threads;
149 --echo Expected error 'Unknown column'
150
151