Debian Codegraph @

mysql-test/suite/x/r/session_connect_attributes.result

raw
1 CREATE USER xtest_client1@localhost;
2 CREATE USER xtest_client2@localhost;
3 GRANT ALL ON *.* TO xtest_client1@localhost;
4 GRANT ALL ON *.* TO xtest_client2@localhost;
5
6
7 ## I. Check valid uses of the session_connect_attrs capability only.
8 #
9 # 1. Set the session_connect_attrs capability once and verify it in the PFS.
10 # 2. Set the session_connect_attrs capability with some duplicated conneection attribute keys and verify that the duplicated keys are present in the PFS.
11 # 3. Set the session_connect_attrs capability twice and verify that only the last set is present in the PFS.
12 # 4. Set the session_connect_attrs capability with two distinct attributes and verify if they are in the PFS.
13
14 ## II. Check session_connect_attrs capability with invalid contents.
15 #
16 # 1. Assert that session_connect_attrs which contains value with length exceeding 1024 character limit triggers an error.
17 # a. Send just the invalid capability.
18 # b. Send the invalid capability followed by a valid one.
19 # 2. Assert that session_connect_attrs which contains key with length exceeding 32 character limit triggers an error.
20 # a. Send just the invalid capability.
21 # b. Send the invalid capability followed by a valid one.
22 # 3. Assert that session_connect_attrs which contains an empty key triggers an error.
23 # a. Send just the invalid capability.
24 # b. Send the invalid capability followed by a valid one.
25 # 4. Assert that session_connect_attrs which contains both key and value with lengths exceeding their limits triggers an error.
26 # a. Send just the invalid capability.
27 # b. Send the invalid capability followed by a valid one.
28 # 5. Assert that session_connect_attrs which contains a message that after decoding exceeds 64k size limit triggers an error.
29 # a. Send just the invalid capability.
30 # b. Send the invalid capability followed by a valid one.
31
32 ## III. Check session_connect_attrs capability when used with other capabilities.
33 #
34 # 1. Set the session_connect_attrs capability and other valid capability.
35 # 2. Set the session_connect_attrs capability and other capability, one of which is invalid. Verify that none of the capabilities are not set in the PFS.
36 # a. The session_connect_attrs capability is invalid.
37 # b. The additional capability is invalid.
38
39 ## IV. Check session connect attributes after client disconnects.
40 #
41 # 1. Verify that new client cannot see the session connection attibutes of a previously disconnected client.
42 # 2. Verify that new client can see the session connection attibutes of another connected client.
43
44 ## V. Check that it is not possible to send session connection attributes after the authentication.
45
46 ## VI. Check that malformed session connection attributes capability triggers an error.
47
48 #
49 # I.1
50 connecting...
51 active session is now 'test_session.I.1'
52 RUN recvok
53 Login OK
54 [Verify that session_connect_attrs contains the following pair ("custom_test_key","someOS")]
55 closing session test_session.I.1
56 Mysqlx.Ok {
57 msg: "bye!"
58 }
59 switched to session default
60
61 #
62 # I.2
63 connecting...
64 active session is now 'test_session.I.2'
65 RUN recvok
66 Login OK
67 [Verify that session_connect_attrs contains the following pair ("custom_test_key","someOS")]
68 [Verify that session_connect_attrs contains the following pair ("custom_test_key","otherOS")]
69 closing session test_session.I.2
70 Mysqlx.Ok {
71 msg: "bye!"
72 }
73 switched to session default
74
75 #
76 # I.3
77 connecting...
78 active session is now 'test_session.I.3'
79 RUN recvok
80 RUN recvok
81 Login OK
82 [Verify that session_connect_attrs contains the following pair ("custom_test_key","shownOS")]
83 closing session test_session.I.3
84 Mysqlx.Ok {
85 msg: "bye!"
86 }
87 switched to session default
88
89 #
90 # I.4
91 connecting...
92 active session is now 'test_session.I.4'
93 RUN recvok
94 Login OK
95 [Verify that session_connect_attrs contains the following pair ("test_key1","value1")]
96 [Verify that session_connect_attrs contains the following pair ("test_key2","value2")]
97 closing session test_session.I.4
98 Mysqlx.Ok {
99 msg: "bye!"
100 }
101 switched to session default
102
103 #
104 # II.1.a
105 connecting...
106 active session is now 'test_session.II.1.a'
107 Got expected error:
108 Mysqlx.Error {
109 severity: ERROR
110 code: 5004
111 msg: "Value is too long for \'custom_test_key\' attribute, currently limited to 1024"
112 sql_state: "HY000"
113 }
114
115 Login OK
116 [Assert that no session connect attributes were inserted]
117 closing session test_session.II.1.a
118 Mysqlx.Ok {
119 msg: "bye!"
120 }
121 switched to session default
122
123 #
124 # II.1.b
125 connecting...
126 active session is now 'test_session.II.1.b'
127 Got expected error:
128 Mysqlx.Error {
129 severity: ERROR
130 code: 5004
131 msg: "Value is too long for \'custom_test_key\' attribute, currently limited to 1024"
132 sql_state: "HY000"
133 }
134
135 RUN recvok
136 Login OK
137 [Verify that session_connect_attrs contains the following pair ("custom_test_key","valid_value")]
138 closing session test_session.II.1.b
139 Mysqlx.Ok {
140 msg: "bye!"
141 }
142 switched to session default
143
144 #
145 # II.2.a
146 connecting...
147 active session is now 'test_session.II.2.a'
148 Got expected error:
149 Mysqlx.Error {
150 severity: ERROR
151 code: 5005
152 msg: "Key name beginning with \'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\'... is too long, currently limited to 32"
153 sql_state: "HY000"
154 }
155
156 Login OK
157 [Assert that no session connect attributes were inserted]
158 closing session test_session.II.2.a
159 Mysqlx.Ok {
160 msg: "bye!"
161 }
162 switched to session default
163
164 #
165 # II.2.b
166 connecting...
167 active session is now 'test_session.II.2.b'
168 Got expected error:
169 Mysqlx.Error {
170 severity: ERROR
171 code: 5005
172 msg: "Key name beginning with \'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\'... is too long, currently limited to 32"
173 sql_state: "HY000"
174 }
175
176 RUN recvok
177 Login OK
178 [Verify that session_connect_attrs contains the following pair ("custom_test_key","valid_value")]
179 closing session test_session.II.2.b
180 Mysqlx.Ok {
181 msg: "bye!"
182 }
183 switched to session default
184
185 #
186 # II.3.a
187 connecting...
188 active session is now 'test_session.II.3.a'
189 Got expected error:
190 Mysqlx.Error {
191 severity: ERROR
192 code: 5006
193 msg: "Empty key name given"
194 sql_state: "HY000"
195 }
196
197 Login OK
198 [Assert that no session connect attributes were inserted]
199 closing session test_session.II.3.a
200 Mysqlx.Ok {
201 msg: "bye!"
202 }
203 switched to session default
204
205 #
206 # II.3.b
207 connecting...
208 active session is now 'test_session.II.3.b'
209 Got expected error:
210 Mysqlx.Error {
211 severity: ERROR
212 code: 5006
213 msg: "Empty key name given"
214 sql_state: "HY000"
215 }
216
217 RUN recvok
218 Login OK
219 [Verify that session_connect_attrs contains the following pair ("custom_test_key","valid_value")]
220 closing session test_session.II.3.b
221 Mysqlx.Ok {
222 msg: "bye!"
223 }
224 switched to session default
225
226 #
227 # II.4.a
228 connecting...
229 active session is now 'test_session.II.4.a'
230 Got expected error:
231 Mysqlx.Error {
232 severity: ERROR
233 code: 5005
234 msg: "Key name beginning with \'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\'... is too long, currently limited to 32"
235 sql_state: "HY000"
236 }
237
238 Login OK
239 [Assert that no session connect attributes were inserted]
240 closing session test_session.II.4.a
241 Mysqlx.Ok {
242 msg: "bye!"
243 }
244 switched to session default
245
246 #
247 # II.4.b
248 connecting...
249 active session is now 'test_session.II.4.b'
250 Got expected error:
251 Mysqlx.Error {
252 severity: ERROR
253 code: 5005
254 msg: "Key name beginning with \'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\'... is too long, currently limited to 32"
255 sql_state: "HY000"
256 }
257
258 RUN recvok
259 Login OK
260 [Verify that session_connect_attrs contains the following pair ("custom_test_key","valid_value")]
261 closing session test_session.II.4.b
262 Mysqlx.Ok {
263 msg: "bye!"
264 }
265 switched to session default
266
267 #
268 # II.5.a
269 connecting...
270 active session is now 'test_session.II.5.a'
271 Got expected error:
272 Mysqlx.Error {
273 severity: ERROR
274 code: 5007
275 msg: "There are too many bytes in connection session attributes the capability is limited to 65536"
276 sql_state: "HY000"
277 }
278
279 Login OK
280 [Assert that no session connect attributes were inserted]
281 closing session test_session.II.5.a
282 Mysqlx.Ok {
283 msg: "bye!"
284 }
285 switched to session default
286
287 #
288 # II.5.b
289 connecting...
290 active session is now 'test_session.II.5.b'
291 Got expected error:
292 Mysqlx.Error {
293 severity: ERROR
294 code: 5007
295 msg: "There are too many bytes in connection session attributes the capability is limited to 65536"
296 sql_state: "HY000"
297 }
298
299 RUN recvok
300 Login OK
301 [Verify that session_connect_attrs contains the following pair ("custom_test_key","valid_value")]
302 closing session test_session.II.5.b
303 Mysqlx.Ok {
304 msg: "bye!"
305 }
306 switched to session default
307
308 #
309 # III.1
310 connecting...
311 active session is now 'test_session.III.1'
312 RUN recvok
313 Login OK
314 [Verify that session_connect_attrs contains the following pair ("custom_test_key","valid_value")]
315 closing session test_session.III.1
316 Mysqlx.Ok {
317 msg: "bye!"
318 }
319 switched to session default
320
321 #
322 # III.2.a
323 connecting...
324 active session is now 'test_session.III.2.a'
325 Got expected error:
326 Mysqlx.Error {
327 severity: ERROR
328 code: 5004
329 msg: "Value is too long for \'custom_test_key\' attribute, currently limited to 1024"
330 sql_state: "HY000"
331 }
332
333 Login OK
334 [Assert that no session connect attributes were inserted]
335 closing session test_session.III.2.a
336 Mysqlx.Ok {
337 msg: "bye!"
338 }
339 switched to session default
340
341 #
342 # III.2.b
343 connecting...
344 active session is now 'test_session.III.2.b'
345 Got expected error:
346 Mysqlx.Error {
347 severity: ERROR
348 code: 5001
349 msg: "Capability prepare failed for \'client.interactive\'"
350 sql_state: "HY000"
351 }
352
353 Login OK
354 [Assert that no session connect attributes were inserted]
355 closing session test_session.III.2.b
356 Mysqlx.Ok {
357 msg: "bye!"
358 }
359 switched to session default
360
361 #
362 # IV.1
363 connecting...
364 active session is now 'test_session.IV.1_xtest_client_1'
365 RUN recvok
366 Login OK
367 [Verify that session_connect_attrs contains the following pair ("custom_test_key","client1OS")]
368 closing session test_session.IV.1_xtest_client_1
369 Mysqlx.Ok {
370 msg: "bye!"
371 }
372 switched to session default
373 connecting...
374 active session is now 'test_session.IV.1_xtest_client_2'
375 Login OK
376 Verify [Global status variable "Mysqlx_sessions" needs to have a value of 2]
377 [Assert that no session connect attributes were inserted]
378 closing session test_session.IV.1_xtest_client_2
379 Mysqlx.Ok {
380 msg: "bye!"
381 }
382 switched to session default
383
384 #
385 # IV.2
386 connecting...
387 active session is now 'test_session.IV.2_xtest_client_1'
388 RUN recvok
389 Login OK
390 [Verify that session_connect_attrs contains the following pair ("custom_test_key","client_1_OS")]
391 connecting...
392 active session is now 'test_session.IV.2_xtest_client_2'
393 RUN recvok
394 Login OK
395 [Verify that session_connect_attrs contains the following pair ("custom_test_key","client_1_OS")]
396 [Verify that session_connect_attrs contains the following pair ("custom_test_key","client_2_OS")]
397 closing session test_session.IV.2_xtest_client_2
398 Mysqlx.Ok {
399 msg: "bye!"
400 }
401 switched to session default
402
403 #
404 # V
405 connecting...
406 active session is now 'test_session.V_xtest_client_1'
407 Login OK
408 Got expected error:
409 Mysqlx.Error {
410 severity: ERROR
411 code: 1047
412 msg: "Unexpected message received"
413 sql_state: "HY000"
414 }
415
416 closing session test_session.V_xtest_client_1
417 Mysqlx.Ok {
418 msg: "bye!"
419 }
420 switched to session default
421
422 #
423 # VI
424 connecting...
425 active session is now 'test_session.VI_xtest_client_1'
426 Got expected error:
427 Mysqlx.Error {
428 severity: ERROR
429 code: 5008
430 msg: "Key and values support only string values"
431 sql_state: "HY000"
432 }
433
434 RUN recvok
435 Login OK
436 [Verify that session_connect_attrs contains the following pair ("custom_test_key","valid_value")]
437 closing session test_session.VI_xtest_client_1
438 Mysqlx.Ok {
439 msg: "bye!"
440 }
441 switched to session default
442 Mysqlx.Ok {
443 msg: "bye!"
444 }
445 ok
446 DROP USER xtest_client1@localhost;
447 DROP USER xtest_client2@localhost;