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 --source include/have_innodb.inc
26
27 --echo '#---------------------BS_STVARS_027_01----------------------#'
28 ####################################################################
29 # Displaying default value #
30 ####################################################################
31 SELECT COUNT(@@GLOBAL.innodb_read_io_threads);
32 --echo 1 Expected
33 SELECT COUNT(@@GLOBAL.innodb_write_io_threads);
34 --echo 1 Expected
35
36
37 --echo '#---------------------BS_STVARS_027_02----------------------#'
38 ####################################################################
39 # Check if Value can set #
40 ####################################################################
41
42
43 SELECT COUNT(@@GLOBAL.innodb_read_io_threads);
44 --echo 1 Expected
45
46 SELECT COUNT(@@GLOBAL.innodb_write_io_threads);
47 --echo 1 Expected
48
49
50
51
52 --echo '#---------------------BS_STVARS_027_03----------------------#'
53 #################################################################
54 # Check if the value in GLOBAL Table matches value in variable #
55 #################################################################
56
57 --disable_warnings
58 SELECT @@GLOBAL.innodb_read_io_threads = VARIABLE_VALUE
59 FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
60 WHERE VARIABLE_NAME='innodb_read_io_threads';
61 --enable_warnings
62 --echo 1 Expected
63
64 SELECT COUNT(@@GLOBAL.innodb_read_io_threads);
65 --echo 1 Expected
66
67 --disable_warnings
68 SELECT COUNT(VARIABLE_VALUE)
69 FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
70 WHERE VARIABLE_NAME='innodb_read_io_threads';
71 --enable_warnings
72 --echo 1 Expected
73
74 --disable_warnings
75 SELECT @@GLOBAL.innodb_write_io_threads = VARIABLE_VALUE
76 FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
77 WHERE VARIABLE_NAME='innodb_write_io_threads';
78 --enable_warnings
79 --echo 1 Expected
80
81 SELECT COUNT(@@GLOBAL.innodb_write_io_threads);
82 --echo 1 Expected
83
84 --disable_warnings
85 SELECT COUNT(VARIABLE_VALUE)
86 FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
87 WHERE VARIABLE_NAME='innodb_write_io_threads';
88 --enable_warnings
89 --echo 1 Expected
90
91
92 --echo '#---------------------BS_STVARS_027_04----------------------#'
93 ################################################################################
94 # Check if accessing variable with and without GLOBAL point to same variable #
95 ################################################################################
96 SELECT @@innodb_read_io_threads = @@GLOBAL.innodb_read_io_threads;
97 --echo 1 Expected
98
99 SELECT @@innodb_write_io_threads = @@GLOBAL.innodb_write_io_threads;
100 --echo 1 Expected
101
102
103 --echo '#---------------------BS_STVARS_027_05----------------------#'
104 ################################################################################
105 # Check if innodb_read_io_threads can be accessed with and without @@ sign #
106 # Check if innodb_write_io_threads can be accessed with and without @@ sign #
107 ################################################################################
108
109 SELECT COUNT(@@innodb_read_io_threads);
110 --echo 1 Expected
111
112 --Error ER_INCORRECT_GLOBAL_LOCAL_VAR
113 SELECT COUNT(@@local.innodb_read_io_threads);
114 --echo Expected error 'Variable is a GLOBAL variable'
115
116 --Error ER_INCORRECT_GLOBAL_LOCAL_VAR
117 SELECT COUNT(@@SESSION.innodb_read_io_threads);
118 --echo Expected error 'Variable is a GLOBAL variable'
119
120 SELECT COUNT(@@GLOBAL.innodb_read_io_threads);
121 --echo 1 Expected
122
123 --Error ER_BAD_FIELD_ERROR
124 SELECT innodb_read_io_threads = @@SESSION.innodb_read_io_threads;
125 --echo Expected error 'Readonly variable'
126
127 SELECT COUNT(@@innodb_write_io_threads);
128 --echo 1 Expected
129
130 --Error ER_INCORRECT_GLOBAL_LOCAL_VAR
131 SELECT COUNT(@@local.innodb_write_io_threads);
132 --echo Expected error 'Variable is a GLOBAL variable'
133
134 --Error ER_INCORRECT_GLOBAL_LOCAL_VAR
135 SELECT COUNT(@@SESSION.innodb_write_io_threads);
136 --echo Expected error 'Variable is a GLOBAL variable'
137
138 SELECT COUNT(@@GLOBAL.innodb_write_io_threads);
139 --echo 1 Expected
140
141 --Error ER_BAD_FIELD_ERROR
142 SELECT innodb_write_io_threads = @@SESSION.innodb_write_io_threads;
143 --echo Expected error 'Readonly variable'
144
145