Debian Codegraph @

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

raw
1 CREATE SCHEMA xtest;
2 SET GLOBAL mysqlx_connect_timeout = 300;
3 SET GLOBAL mysqlx_wait_timeout = 300;
4 SET GLOBAL mysqlx_max_allowed_packet = 1000;
5
6 ## A. Execute the test with deflate
7 #
8
9 ## 1. Send compressed message with invalid payload
10 # a. Send compressed-message with too long-uncompressed payload size
11 # b. Send compressed-message with invalid compressed-payload
12 ## 2. Send compressed message with invalid message
13 # a. Send compressed-message with StmtExecute and missing fields (not initialized error)
14 # b. Send compressed-message with not know message, and verify that its dispatched
15 # c. Send compressed-message with message that exceeds protobufs nested
16 # messages limit, and verify that its rejected with proper error
17 ;
18 # 1.a.
19 connecting...
20 active session is now 'SESS_SINGLE1'
21 RUN recvok
22 Login OK
23 send Mysqlx.Connection.Compression {
24 uncompressed_size: 268435456
25 payload: "BINARY"
26 }
27
28 closing session SESS_SINGLE1
29 switched to session default
30 ;
31 # 1.b.
32 connecting...
33 active session is now 'SESS_SINGLE2'
34 RUN recvok
35 Login OK
36 send Mysqlx.Connection.Compression {
37 payload: "BINARY"
38 }
39
40 Got expected error:
41 Mysqlx.Error {
42 severity: FATAL
43 code: 5171
44 msg: "Payload decompression failed"
45 sql_state: "HY000"
46 }
47
48 closing session SESS_SINGLE2
49 switched to session default
50 ;
51 # 2.a.
52 connecting...
53 active session is now 'SESS_SINGLE3'
54 RUN recvok
55 Login OK
56 send Mysqlx.Connection.Compression {
57 payload: "BINARY"
58 }
59
60 Got expected error:
61 Mysqlx.Error {
62 severity: FATAL
63 code: 5000
64 msg: "Parse error unserializing protobuf message"
65 sql_state: "HY000"
66 }
67
68 closing session SESS_SINGLE3
69 switched to session default
70 ;
71 # 2.b.
72 connecting...
73 active session is now 'SESS_SINGLE4'
74 RUN recvok
75 Login OK
76 send Mysqlx.Expect.Open {
77 cond {
78 condition_key: 1
79 }
80 }
81
82 RUN recvok
83 send Mysqlx.Connection.Compression {
84 payload: "BINARY"
85 }
86
87 Got expected error:
88 Mysqlx.Error {
89 severity: ERROR
90 code: 1047
91 msg: "Unexpected message received"
92 sql_state: "HY000"
93 }
94
95 Got expected error:
96 Mysqlx.Error {
97 severity: ERROR
98 code: 5159
99 msg: "Expectation failed: no_error"
100 sql_state: "HY000"
101 }
102
103 send Mysqlx.Expect.Close {
104 }
105
106 Got expected error:
107 Mysqlx.Error {
108 severity: ERROR
109 code: 5159
110 msg: "Expectation failed: no_error"
111 sql_state: "HY000"
112 }
113
114
115 command ok
116 ;
117 # 2.c.
118 connecting...
119 active session is now 'SESS_SINGLE5'
120 RUN recvok
121 Login OK
122
123 command ok
124 Try to send number of object more than the X Protocol limit 101 (2 * 51)
125 Received error message with code: ER_X_BAD_MESSAGE
126 closing session SESS_SINGLE5
127 switched to session default
128 Mysqlx.Ok {
129 msg: "bye!"
130 }
131 ok
132
133 ## B. Execute the test with lz4
134 #
135
136 ## 1. Send compressed message with invalid payload
137 # a. Send compressed-message with too long-uncompressed payload size
138 # b. Send compressed-message with invalid compressed-payload
139 ## 2. Send compressed message with invalid message
140 # a. Send compressed-message with StmtExecute and missing fields (not initialized error)
141 # b. Send compressed-message with not know message, and verify that its dispatched
142 # c. Send compressed-message with message that exceeds protobufs nested
143 # messages limit, and verify that its rejected with proper error
144 ;
145 # 1.a.
146 connecting...
147 active session is now 'SESS_SINGLE1'
148 RUN recvok
149 Login OK
150 send Mysqlx.Connection.Compression {
151 uncompressed_size: 268435456
152 payload: "BINARY"
153 }
154
155 closing session SESS_SINGLE1
156 switched to session default
157 ;
158 # 1.b.
159 connecting...
160 active session is now 'SESS_SINGLE2'
161 RUN recvok
162 Login OK
163 send Mysqlx.Connection.Compression {
164 payload: "BINARY"
165 }
166
167 Got expected error:
168 Mysqlx.Error {
169 severity: FATAL
170 code: 5171
171 msg: "Payload decompression failed"
172 sql_state: "HY000"
173 }
174
175 closing session SESS_SINGLE2
176 switched to session default
177 ;
178 # 2.a.
179 connecting...
180 active session is now 'SESS_SINGLE3'
181 RUN recvok
182 Login OK
183 send Mysqlx.Connection.Compression {
184 payload: "BINARY"
185 }
186
187 Got expected error:
188 Mysqlx.Error {
189 severity: FATAL
190 code: 5000
191 msg: "Parse error unserializing protobuf message"
192 sql_state: "HY000"
193 }
194
195 closing session SESS_SINGLE3
196 switched to session default
197 ;
198 # 2.b.
199 connecting...
200 active session is now 'SESS_SINGLE4'
201 RUN recvok
202 Login OK
203 send Mysqlx.Expect.Open {
204 cond {
205 condition_key: 1
206 }
207 }
208
209 RUN recvok
210 send Mysqlx.Connection.Compression {
211 payload: "BINARY"
212 }
213
214 Got expected error:
215 Mysqlx.Error {
216 severity: ERROR
217 code: 1047
218 msg: "Unexpected message received"
219 sql_state: "HY000"
220 }
221
222 Got expected error:
223 Mysqlx.Error {
224 severity: ERROR
225 code: 5159
226 msg: "Expectation failed: no_error"
227 sql_state: "HY000"
228 }
229
230 send Mysqlx.Expect.Close {
231 }
232
233 Got expected error:
234 Mysqlx.Error {
235 severity: ERROR
236 code: 5159
237 msg: "Expectation failed: no_error"
238 sql_state: "HY000"
239 }
240
241
242 command ok
243 ;
244 # 2.c.
245 connecting...
246 active session is now 'SESS_SINGLE5'
247 RUN recvok
248 Login OK
249
250 command ok
251 Try to send number of object more than the X Protocol limit 101 (2 * 51)
252 Received error message with code: ER_X_BAD_MESSAGE
253 closing session SESS_SINGLE5
254 switched to session default
255 Mysqlx.Ok {
256 msg: "bye!"
257 }
258 ok
259
260 ## C. Execute the test with zstd
261 #
262
263 ## 1. Send compressed message with invalid payload
264 # a. Send compressed-message with too long-uncompressed payload size
265 # b. Send compressed-message with invalid compressed-payload
266 ## 2. Send compressed message with invalid message
267 # a. Send compressed-message with StmtExecute and missing fields (not initialized error)
268 # b. Send compressed-message with not know message, and verify that its dispatched
269 # c. Send compressed-message with message that exceeds protobufs nested
270 # messages limit, and verify that its rejected with proper error
271 ;
272 # 1.a.
273 connecting...
274 active session is now 'SESS_SINGLE1'
275 RUN recvok
276 Login OK
277 send Mysqlx.Connection.Compression {
278 uncompressed_size: 268435456
279 payload: "BINARY"
280 }
281
282 closing session SESS_SINGLE1
283 switched to session default
284 ;
285 # 1.b.
286 connecting...
287 active session is now 'SESS_SINGLE2'
288 RUN recvok
289 Login OK
290 send Mysqlx.Connection.Compression {
291 payload: "BINARY"
292 }
293
294 Got expected error:
295 Mysqlx.Error {
296 severity: FATAL
297 code: 5171
298 msg: "Payload decompression failed"
299 sql_state: "HY000"
300 }
301
302 closing session SESS_SINGLE2
303 switched to session default
304 ;
305 # 2.a.
306 connecting...
307 active session is now 'SESS_SINGLE3'
308 RUN recvok
309 Login OK
310 send Mysqlx.Connection.Compression {
311 payload: "BINARY"
312 }
313
314 Got expected error:
315 Mysqlx.Error {
316 severity: FATAL
317 code: 5000
318 msg: "Parse error unserializing protobuf message"
319 sql_state: "HY000"
320 }
321
322 closing session SESS_SINGLE3
323 switched to session default
324 ;
325 # 2.b.
326 connecting...
327 active session is now 'SESS_SINGLE4'
328 RUN recvok
329 Login OK
330 send Mysqlx.Expect.Open {
331 cond {
332 condition_key: 1
333 }
334 }
335
336 RUN recvok
337 send Mysqlx.Connection.Compression {
338 payload: "BINARY"
339 }
340
341 Got expected error:
342 Mysqlx.Error {
343 severity: ERROR
344 code: 1047
345 msg: "Unexpected message received"
346 sql_state: "HY000"
347 }
348
349 Got expected error:
350 Mysqlx.Error {
351 severity: ERROR
352 code: 5159
353 msg: "Expectation failed: no_error"
354 sql_state: "HY000"
355 }
356
357 send Mysqlx.Expect.Close {
358 }
359
360 Got expected error:
361 Mysqlx.Error {
362 severity: ERROR
363 code: 5159
364 msg: "Expectation failed: no_error"
365 sql_state: "HY000"
366 }
367
368
369 command ok
370 ;
371 # 2.c.
372 connecting...
373 active session is now 'SESS_SINGLE5'
374 RUN recvok
375 Login OK
376
377 command ok
378 Try to send number of object more than the X Protocol limit 101 (2 * 51)
379 Received error message with code: ER_X_BAD_MESSAGE
380 closing session SESS_SINGLE5
381 switched to session default
382 Mysqlx.Ok {
383 msg: "bye!"
384 }
385 ok
386 SET GLOBAL mysqlx_connect_timeout= DEFAULT;
387 SET GLOBAL mysqlx_wait_timeout = DEFAULT;
388 SET GLOBAL mysqlx_max_allowed_packet = DEFAULT;