Debian Codegraph @

mysql-test/suite/sys_vars/r/max_execution_time_basic.result

raw
1 # Initial values
2 SELECT @@global.max_execution_time, @@session.max_execution_time;
3 @@global.max_execution_time @@session.max_execution_time
4 0 0
5 # Save initial value
6 SET @start_global_value= @@global.max_execution_time;
7 SELECT @start_global_value;
8 @start_global_value
9 0
10 SET @start_session_value = @@session.max_execution_time;
11 SELECT @start_session_value;
12 @start_session_value
13 0
14 # Display the DEFAULT value of max_execution_time
15 SET @@session.max_execution_time = 20000;
16 SET @@session.max_execution_time = DEFAULT;
17 SELECT @@session.max_execution_time;
18 @@session.max_execution_time
19 0
20 SET @@global.max_execution_time = 20000;
21 SET @@global.max_execution_time = DEFAULT;
22 SELECT @@global.max_execution_time;
23 @@global.max_execution_time
24 0
25 # Check the DEFAULT value of max_execution_time
26 SET @@global.max_execution_time = DEFAULT;
27 SELECT @@global.max_execution_time = 28800;
28 @@global.max_execution_time = 28800
29 0
30 SET @@session.max_execution_time = DEFAULT;
31 SELECT @@session.max_execution_time = 28800;
32 @@session.max_execution_time = 28800
33 0
34 # Check Max value for max_execution_time.
35 "Max value for @@global.max_execution_time is set properly."
36 "Max value for @@session.max_execution_time is set properly."
37 SET @@global.max_execution_time = 0;
38 SELECT @@global.max_execution_time;
39 @@global.max_execution_time
40 0
41 SET @@session.max_execution_time = 0;
42 SELECT @@global.max_execution_time;
43 @@global.max_execution_time
44 0
45 # Change the value of max_execution_time to a valid value for SESSION scope
46 SET @@session.max_execution_time = 10000;
47 SELECT @@global.max_execution_time, @@session.max_execution_time;
48 @@global.max_execution_time @@session.max_execution_time
49 0 10000
50 SET @@session.max_execution_time = 50050;
51 SELECT @@global.max_execution_time, @@session.max_execution_time;
52 @@global.max_execution_time @@session.max_execution_time
53 0 50050
54 SET @@session.max_execution_time = 65535;
55 SELECT @@global.max_execution_time, @@session.max_execution_time;
56 @@global.max_execution_time @@session.max_execution_time
57 0 65535
58 # Change the value of max_execution_time to an invalid value #
59 SET @@global.max_execution_time = -2;
60 Warnings:
61 Warning 1292 Truncated incorrect max_execution_time value: '-2'
62 SELECT @@global.max_execution_time;
63 @@global.max_execution_time
64 0
65 SET @@global.max_execution_time = 65530.34;
66 ERROR 42000: Incorrect argument type to variable 'max_execution_time'
67 SELECT @@global.max_execution_time;
68 @@global.max_execution_time
69 0
70 SET @@global.max_execution_time = test;
71 ERROR 42000: Incorrect argument type to variable 'max_execution_time'
72 SELECT @@global.max_execution_time;
73 @@global.max_execution_time
74 0
75 # Change the value of max_execution_time to a valid value for SESSION scope
76 SET @@session.max_execution_time = 10000;
77 SELECT @@global.max_execution_time, @@session.max_execution_time;
78 @@global.max_execution_time @@session.max_execution_time
79 0 10000
80 SET @@session.max_execution_time = 50050;
81 SELECT @@global.max_execution_time, @@session.max_execution_time;
82 @@global.max_execution_time @@session.max_execution_time
83 0 50050
84 SET @@session.max_execution_time = 65535;
85 SELECT @@global.max_execution_time, @@session.max_execution_time;
86 @@global.max_execution_time @@session.max_execution_time
87 0 65535
88 # Change the value of max_execution_time to an invalid value #
89 SET @@global.max_execution_time = -2;
90 Warnings:
91 Warning 1292 Truncated incorrect max_execution_time value: '-2'
92 SELECT @@global.max_execution_time;
93 @@global.max_execution_time
94 0
95 SET @@global.max_execution_time = 65530.34;
96 ERROR 42000: Incorrect argument type to variable 'max_execution_time'
97 SELECT @@global.max_execution_time;
98 @@global.max_execution_time
99 0
100 SET @@global.max_execution_time = test;
101 ERROR 42000: Incorrect argument type to variable 'max_execution_time'
102 SELECT @@global.max_execution_time;
103 @@global.max_execution_time
104 0
105 SET @@global.max_execution_time = "";
106 ERROR 42000: Incorrect argument type to variable 'max_execution_time'
107 SELECT @@global.max_execution_time;
108 @@global.max_execution_time
109 0
110 SET @@global.max_execution_time = "*";
111 ERROR 42000: Incorrect argument type to variable 'max_execution_time'
112 SELECT @@global.max_execution_time;
113 @@global.max_execution_time
114 0
115 SET @@global.max_execution_time = NULL;
116 ERROR 42000: Incorrect argument type to variable 'max_execution_time'
117 SELECT @@global.max_execution_time;
118 @@global.max_execution_time
119 0
120 SET @@global.max_execution_time = "0";
121 ERROR 42000: Incorrect argument type to variable 'max_execution_time'
122 SELECT @@global.max_execution_time;
123 @@global.max_execution_time
124 0
125 SET @@global.max_execution_time = "*#$**$(@(@ ##@";
126 ERROR 42000: Incorrect argument type to variable 'max_execution_time'
127 SELECT @@global.max_execution_time;
128 @@global.max_execution_time
129 0
130 SET @@session.max_execution_time = -2;
131 Warnings:
132 Warning 1292 Truncated incorrect max_execution_time value: '-2'
133 SELECT @@session.max_execution_time;
134 @@session.max_execution_time
135 0
136 SET @@session.max_execution_time = 65530.34;
137 ERROR 42000: Incorrect argument type to variable 'max_execution_time'
138 SELECT @@session.max_execution_time;
139 @@session.max_execution_time
140 0
141 SET @@session.max_execution_time = test;
142 ERROR 42000: Incorrect argument type to variable 'max_execution_time'
143 SELECT @@session.max_execution_time;
144 @@session.max_execution_time
145 0
146 SET @@session.max_execution_time = "";
147 ERROR 42000: Incorrect argument type to variable 'max_execution_time'
148 SELECT @@session.max_execution_time;
149 @@session.max_execution_time
150 0
151 SET @@session.max_execution_time = "*";
152 ERROR 42000: Incorrect argument type to variable 'max_execution_time'
153 SELECT @@session.max_execution_time;
154 @@session.max_execution_time
155 0
156 SET @@session.max_execution_time = NULL;
157 ERROR 42000: Incorrect argument type to variable 'max_execution_time'
158 SELECT @@session.max_execution_time;
159 @@session.max_execution_time
160 0
161 SET @@session.max_execution_time = "0";
162 ERROR 42000: Incorrect argument type to variable 'max_execution_time'
163 SELECT @@session.max_execution_time;
164 @@session.max_execution_time
165 0
166 SET @@session.max_execution_time = "*#$**$(@(@ ##@";
167 ERROR 42000: Incorrect argument type to variable 'max_execution_time'
168 SELECT @@session.max_execution_time;
169 @@session.max_execution_time
170 0
171 # Check if the value in GLOBAL Table matches value in variable
172 SELECT @@global.max_execution_time = VARIABLE_VALUE
173 FROM performance_schema.global_variables
174 WHERE VARIABLE_NAME='max_execution_time';
175 @@global.max_execution_time = VARIABLE_VALUE
176 1
177 # Check if the value in SESSION Table matches value in variable
178 SELECT @@session.max_execution_time = VARIABLE_VALUE
179 FROM performance_schema.session_variables
180 WHERE VARIABLE_NAME='max_execution_time';
181 @@session.max_execution_time = VARIABLE_VALUE
182 1
183 # Check if TRUE and FALSE values can be used on variable
184 SET @@global.max_execution_time = TRUE;
185 SELECT @@global.max_execution_time;
186 @@global.max_execution_time
187 1
188 SET @@global.max_execution_time = FALSE;
189 SELECT @@global.max_execution_time;
190 @@global.max_execution_time
191 0
192 SET @@session.max_execution_time = TRUE;
193 SELECT @@session.max_execution_time;
194 @@session.max_execution_time
195 1
196 SET @@session.max_execution_time = FALSE;
197 SELECT @@session.max_execution_time;
198 @@session.max_execution_time
199 0
200 # Check if accessing variable with SESSION,LOCAL and without SCOPE points to same session variable
201 SET @@max_execution_time = 10000;
202 SELECT @@max_execution_time = @@local.max_execution_time;
203 @@max_execution_time = @@local.max_execution_time
204 1
205 SELECT @@local.max_execution_time = @@session.max_execution_time;
206 @@local.max_execution_time = @@session.max_execution_time
207 1
208 # Check if max_execution_time can be accessed with and without @@ sign
209 SET max_execution_time = 10000;
210 SELECT @@max_execution_time;
211 @@max_execution_time
212 10000
213 SELECT local.max_execution_time;
214 ERROR 42S02: Unknown table 'local' in field list
215 SELECT session.max_execution_time;
216 ERROR 42S02: Unknown table 'session' in field list
217 # Restore initial value
218 SET @@global.max_execution_time = @start_global_value;
219 SELECT @@global.max_execution_time;
220 @@global.max_execution_time
221 0
222 SET @@session.max_execution_time = @start_session_value;
223 SELECT @@session.max_execution_time;
224 @@session.max_execution_time
225 0