Debian Codegraph @

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

raw
1 CREATE SCHEMA IF NOT EXISTS xtest;
2 USE xtest;
3 CREATE PROCEDURE recreate_tables()
4 BEGIN
5 CREATE TABLE IF NOT EXISTS xtable (phrase VARCHAR(30), prio INTEGER);
6 TRUNCATE TABLE xtable;
7 INSERT INTO xtable (phrase, prio) VALUES ('Alice has a cat', 0);
8 INSERT INTO xtable (phrase, prio) VALUES ('Bob has a dog 1', 1);
9 INSERT INTO xtable (phrase, prio) VALUES ('Peppa has a teddy', 0);
10 INSERT INTO xtable (phrase, prio) VALUES ('Bob has a dog 2', 2);
11 INSERT INTO xtable (phrase, prio) VALUES ('Row to delete', 3);
12 CREATE TABLE IF NOT EXISTS xtable_with_pk (p_id INTEGER AUTO_INCREMENT PRIMARY KEY, description varchar(40));
13 TRUNCATE TABLE xtable_with_pk;
14 INSERT INTO xtable_with_pk (description) VALUES ('MyRow');
15 END //
16 CREATE PROCEDURE one_resultsets()
17 BEGIN
18 SELECT phrase FROM xtable limit 3;
19 END //
20 CREATE PROCEDURE two_resultsets()
21 BEGIN
22 SELECT phrase FROM xtable limit 3;
23 SELECT prio FROM xtable limit 2;
24 END //
25 CREATE PROCEDURE two_resultsets_with_errors()
26 BEGIN
27 SELECT 1/prio as col1 FROM xtable;
28 SELECT 1/prio as col1 FROM xtable;
29 END //
30 ## A. Execute the test using zlib/group
31 #
32 CALL recreate_tables();
33
34
35 ## I. Validate non dynamic SQL statement where Cursor.Fetch is not needed
36 #
37 # 1. Assert empty resultset, dont get any rows at Cursor.Open.
38 # 2. Assert resultset that has less rows than requested by Cursor.Open.
39
40 ## II. Validate non dynamic SQL statement where Cursor.Fetch is needed to get all data
41 #
42 # 1. Assert empty resultset, still try to get at last one row at open
43 # 2. Assert resultset that has same amount of rows as requested
44 # 3. Assert resultset that has rows grater by one than requested
45 # 4. Assert resultset that has two times the amount of rows as requested
46 # 5. Assert resultset by fetching the resultset one by one row
47 # 6. Assert resultset by fetching the resultset and warnings generated by it
48
49 ## III. Validate dynamic SQL statement
50 #
51 # 1. Assert that cursor open, fetches whole resultset
52 # a. fetch_rows in Cursor.Open is not set
53 # b. fetch_rows in Cursor.Open is set (value doesn't matter).
54 # 2. Assert that cursor open, fetches multiple resultsets
55 # 3. Assert that cursor open, fetches multiple resultsets with warnings
56
57 ## IV. Validate notices
58 #
59 # 1. Insert stmt
60 # a. Table with primary key (expect notice GENERATED_INSERT_ID)
61 # b. Table without primary key (must not be generate GENERATED_INSERT_ID)
62 # 2. Delete stmt
63 # 3. Update stmt
64
65
66 #
67 # I.1
68 [PREPARE - SELECT * FROM xtable LIMIT 0]
69 RUN recvok
70 [EXECUTE]
71 [ASSERT Mysqlx.Resultset.ColumnMetaData]
72 [ASSERT Mysqlx.Resultset.ColumnMetaData]
73 [ASSERT Mysqlx.Resultset.FetchDone]
74 [ASSERT notice session state change - ROWS_AFFECTED, v_unsigned_int:0]
75 [ASSERT Mysqlx.Sql.StmtExecuteOk]
76
77 #
78 # I.2
79 [PREPARE - SELECT * FROM xtable]
80 RUN recvok
81 [EXECUTE]
82 [ASSERT Mysqlx.Resultset.ColumnMetaData]
83 [ASSERT Mysqlx.Resultset.ColumnMetaData]
84 [ASSERT Mysqlx.Resultset.Row]
85 [ASSERT Mysqlx.Resultset.Row]
86 [ASSERT Mysqlx.Resultset.Row]
87 [ASSERT Mysqlx.Resultset.Row]
88 [ASSERT Mysqlx.Resultset.Row]
89 [ASSERT Mysqlx.Resultset.FetchDone]
90 [ASSERT notice session state change - ROWS_AFFECTED, v_unsigned_int:0]
91 [ASSERT Mysqlx.Sql.StmtExecuteOk]
92
93 #
94 # II.1
95 [PREPARE - SELECT * FROM xtable LIMIT 0]
96 RUN recvok
97 [EXECUTE]
98 [ASSERT Mysqlx.Resultset.ColumnMetaData]
99 [ASSERT Mysqlx.Resultset.ColumnMetaData]
100 [ASSERT Mysqlx.Resultset.FetchSuspended]
101 [ASSERT Mysqlx.Sql.StmtExecuteOk]
102 [FETCH]
103 [ASSERT Mysqlx.Resultset.FetchDone]
104 [ASSERT notice session state change - ROWS_AFFECTED, v_unsigned_int:0]
105 [ASSERT Mysqlx.Sql.StmtExecuteOk]
106
107 #
108 # II.2
109 [PREPARE - SELECT * FROM xtable LIMIT 5]
110 RUN recvok
111 [EXECUTE]
112 [ASSERT Mysqlx.Resultset.ColumnMetaData]
113 [ASSERT Mysqlx.Resultset.ColumnMetaData]
114 [ASSERT Mysqlx.Resultset.Row]
115 [ASSERT Mysqlx.Resultset.Row]
116 [ASSERT Mysqlx.Resultset.Row]
117 [ASSERT Mysqlx.Resultset.Row]
118 [ASSERT Mysqlx.Resultset.Row]
119 [ASSERT Mysqlx.Resultset.FetchSuspended]
120 [ASSERT Mysqlx.Sql.StmtExecuteOk]
121 [FETCH]
122 [ASSERT Mysqlx.Resultset.FetchDone]
123 [ASSERT notice session state change - ROWS_AFFECTED, v_unsigned_int:0]
124 [ASSERT Mysqlx.Sql.StmtExecuteOk]
125
126 #
127 # II.3
128 [PREPARE - SELECT * FROM xtable LIMIT 5]
129 RUN recvok
130 [EXECUTE]
131 [ASSERT Mysqlx.Resultset.ColumnMetaData]
132 [ASSERT Mysqlx.Resultset.ColumnMetaData]
133 [ASSERT Mysqlx.Resultset.Row]
134 [ASSERT Mysqlx.Resultset.Row]
135 [ASSERT Mysqlx.Resultset.Row]
136 [ASSERT Mysqlx.Resultset.Row]
137 [ASSERT Mysqlx.Resultset.FetchSuspended]
138 [ASSERT Mysqlx.Sql.StmtExecuteOk]
139 [FETCH]
140 [ASSERT Mysqlx.Resultset.Row]
141 [ASSERT Mysqlx.Resultset.FetchDone]
142 [ASSERT notice session state change - ROWS_AFFECTED, v_unsigned_int:0]
143 [ASSERT Mysqlx.Sql.StmtExecuteOk]
144
145 #
146 # II.4
147 [PREPARE - SELECT * FROM xtable LIMIT 4]
148 RUN recvok
149 [EXECUTE]
150 [ASSERT Mysqlx.Resultset.ColumnMetaData]
151 [ASSERT Mysqlx.Resultset.ColumnMetaData]
152 [ASSERT Mysqlx.Resultset.Row]
153 [ASSERT Mysqlx.Resultset.Row]
154 [ASSERT Mysqlx.Resultset.FetchSuspended]
155 [ASSERT Mysqlx.Sql.StmtExecuteOk]
156 [FETCH]
157 [ASSERT Mysqlx.Resultset.Row]
158 [ASSERT Mysqlx.Resultset.Row]
159 [ASSERT Mysqlx.Resultset.FetchDone]
160 [ASSERT notice session state change - ROWS_AFFECTED, v_unsigned_int:0]
161 [ASSERT Mysqlx.Sql.StmtExecuteOk]
162
163 #
164 # II.5
165 [PREPARE - SELECT * FROM xtable LIMIT 3]
166 RUN recvok
167 [EXECUTE]
168 [ASSERT Mysqlx.Resultset.ColumnMetaData]
169 [ASSERT Mysqlx.Resultset.ColumnMetaData]
170 [ASSERT Mysqlx.Resultset.Row]
171 [ASSERT Mysqlx.Resultset.FetchSuspended]
172 [ASSERT Mysqlx.Sql.StmtExecuteOk]
173 [FETCH]
174 [ASSERT Mysqlx.Resultset.Row]
175 [ASSERT Mysqlx.Resultset.FetchSuspended]
176 [ASSERT Mysqlx.Sql.StmtExecuteOk]
177 [FETCH]
178 [ASSERT Mysqlx.Resultset.Row]
179 [ASSERT Mysqlx.Resultset.FetchSuspended]
180 [ASSERT Mysqlx.Sql.StmtExecuteOk]
181 [FETCH]
182 [ASSERT Mysqlx.Resultset.FetchDone]
183 [ASSERT notice session state change - ROWS_AFFECTED, v_unsigned_int:0]
184 [ASSERT Mysqlx.Sql.StmtExecuteOk]
185
186 #
187 # II.6
188 [PREPARE - SELECT 1/prio as col1 FROM xtable]
189 RUN recvok
190 [EXECUTE]
191 [ASSERT Mysqlx.Resultset.ColumnMetaData]
192 [ASSERT Mysqlx.Resultset.FetchSuspended]
193 [ASSERT notice warning - WARNING, 1365]
194 [ASSERT notice warning - WARNING, 1365]
195 [ASSERT Mysqlx.Sql.StmtExecuteOk]
196 [FETCH]
197 [ASSERT Mysqlx.Resultset.Row]
198 [ASSERT Mysqlx.Resultset.Row]
199 [ASSERT Mysqlx.Resultset.FetchSuspended]
200 [ASSERT Mysqlx.Sql.StmtExecuteOk]
201 [FETCH]
202 [ASSERT Mysqlx.Resultset.Row]
203 [ASSERT Mysqlx.Resultset.Row]
204 [ASSERT Mysqlx.Resultset.Row]
205 [ASSERT Mysqlx.Resultset.FetchDone]
206 [ASSERT notice session state change - ROWS_AFFECTED, v_unsigned_int:0]
207 [ASSERT Mysqlx.Sql.StmtExecuteOk]
208
209 #
210 # III.1.a
211 [PREPARE - CALL one_resultsets()]
212 RUN recvok
213 [EXECUTE]
214 [ASSERT Mysqlx.Resultset.ColumnMetaData]
215 [ASSERT Mysqlx.Resultset.Row]
216 [ASSERT Mysqlx.Resultset.Row]
217 [ASSERT Mysqlx.Resultset.Row]
218 [ASSERT Mysqlx.Resultset.FetchDoneMoreResultsets]
219 [ASSERT Mysqlx.Resultset.FetchDone]
220 [ASSERT notice session state change - ROWS_AFFECTED, v_unsigned_int:0]
221 [ASSERT Mysqlx.Sql.StmtExecuteOk]
222
223 #
224 # III.1.b
225 [PREPARE - CALL one_resultsets()]
226 RUN recvok
227 [EXECUTE]
228 [ASSERT Mysqlx.Resultset.ColumnMetaData]
229 [ASSERT Mysqlx.Resultset.Row]
230 [ASSERT Mysqlx.Resultset.Row]
231 [ASSERT Mysqlx.Resultset.Row]
232 [ASSERT Mysqlx.Resultset.FetchDoneMoreResultsets]
233 [ASSERT Mysqlx.Resultset.FetchDone]
234 [ASSERT notice session state change - ROWS_AFFECTED, v_unsigned_int:0]
235 [ASSERT Mysqlx.Sql.StmtExecuteOk]
236
237 #
238 # III.2
239 [PREPARE - CALL two_resultsets()]
240 RUN recvok
241 [EXECUTE]
242 [ASSERT Mysqlx.Resultset.ColumnMetaData]
243 [ASSERT Mysqlx.Resultset.Row]
244 [ASSERT Mysqlx.Resultset.Row]
245 [ASSERT Mysqlx.Resultset.Row]
246 [ASSERT Mysqlx.Resultset.FetchDoneMoreResultsets]
247 [ASSERT Mysqlx.Resultset.ColumnMetaData]
248 [ASSERT Mysqlx.Resultset.Row]
249 [ASSERT Mysqlx.Resultset.Row]
250 [ASSERT Mysqlx.Resultset.FetchDoneMoreResultsets]
251 [ASSERT Mysqlx.Resultset.FetchDone]
252 [ASSERT notice session state change - ROWS_AFFECTED, v_unsigned_int:0]
253 [ASSERT Mysqlx.Sql.StmtExecuteOk]
254
255 #
256 # III.3
257 [PREPARE - CALL two_resultsets_with_errors]
258 RUN recvok
259 [EXECUTE]
260 [ASSERT Mysqlx.Resultset.ColumnMetaData]
261 [ASSERT Mysqlx.Resultset.Row]
262 [ASSERT Mysqlx.Resultset.Row]
263 [ASSERT Mysqlx.Resultset.Row]
264 [ASSERT Mysqlx.Resultset.Row]
265 [ASSERT Mysqlx.Resultset.Row]
266 [ASSERT Mysqlx.Resultset.FetchDoneMoreResultsets]
267 [ASSERT Mysqlx.Resultset.ColumnMetaData]
268 [ASSERT Mysqlx.Resultset.Row]
269 [ASSERT Mysqlx.Resultset.Row]
270 [ASSERT Mysqlx.Resultset.Row]
271 [ASSERT Mysqlx.Resultset.Row]
272 [ASSERT Mysqlx.Resultset.Row]
273 [ASSERT Mysqlx.Resultset.FetchDoneMoreResultsets]
274 [ASSERT Mysqlx.Resultset.FetchDone]
275 [ASSERT notice warning - WARNING, 1365]
276 [ASSERT notice warning - WARNING, 1365]
277 [ASSERT notice session state change - ROWS_AFFECTED, v_unsigned_int:0]
278 [ASSERT Mysqlx.Sql.StmtExecuteOk]
279
280 #
281 # IV.1.a
282 [PREPARE - INSERT INTO xtest.xtable_with_pk(description) VALUE('MyCustomRow')]
283 RUN recvok
284 [EXECUTE]
285 [ASSERT notice session state change - ROWS_AFFECTED, v_unsigned_int:1]
286 [ASSERT notice session state change - GENERATED_INSERT_ID, v_unsigned_int: 2]
287 [ASSERT Mysqlx.Sql.StmtExecuteOk]
288
289 #
290 # IV.1.b
291 [PREPARE - INSERT INTO xtest.xtable(phrase, prio) VALUE('MyCustomRow', 100)]
292 RUN recvok
293 [EXECUTE]
294 [ASSERT notice session state change - ROWS_AFFECTED, v_unsigned_int:1]
295 [ASSERT Mysqlx.Sql.StmtExecuteOk]
296
297 #
298 # IV.2
299 [PREPARE - DELETE FROM xtest.xtable WHERE prio=100]
300 RUN recvok
301 [EXECUTE]
302 [ASSERT notice session state change - ROWS_AFFECTED, v_unsigned_int:1]
303 [ASSERT Mysqlx.Sql.StmtExecuteOk]
304
305 #
306 # IV.3
307 [PREPARE - UPDATE xtest.xtable SET phrase='New']
308 RUN recvok
309 [EXECUTE]
310 [ASSERT notice session state change - PRODUCED_MESSAGE, type: V_STRING]
311 [ASSERT notice session state change - ROWS_AFFECTED, v_unsigned_int:5]
312 [ASSERT Mysqlx.Sql.StmtExecuteOk]
313 Mysqlx.Ok {
314 msg: "bye!"
315 }
316 ok
317 ## B. Execute the test using zlib/multiple
318 #
319 CALL recreate_tables();
320
321
322 ## I. Validate non dynamic SQL statement where Cursor.Fetch is not needed
323 #
324 # 1. Assert empty resultset, dont get any rows at Cursor.Open.
325 # 2. Assert resultset that has less rows than requested by Cursor.Open.
326
327 ## II. Validate non dynamic SQL statement where Cursor.Fetch is needed to get all data
328 #
329 # 1. Assert empty resultset, still try to get at last one row at open
330 # 2. Assert resultset that has same amount of rows as requested
331 # 3. Assert resultset that has rows grater by one than requested
332 # 4. Assert resultset that has two times the amount of rows as requested
333 # 5. Assert resultset by fetching the resultset one by one row
334 # 6. Assert resultset by fetching the resultset and warnings generated by it
335
336 ## III. Validate dynamic SQL statement
337 #
338 # 1. Assert that cursor open, fetches whole resultset
339 # a. fetch_rows in Cursor.Open is not set
340 # b. fetch_rows in Cursor.Open is set (value doesn't matter).
341 # 2. Assert that cursor open, fetches multiple resultsets
342 # 3. Assert that cursor open, fetches multiple resultsets with warnings
343
344 ## IV. Validate notices
345 #
346 # 1. Insert stmt
347 # a. Table with primary key (expect notice GENERATED_INSERT_ID)
348 # b. Table without primary key (must not be generate GENERATED_INSERT_ID)
349 # 2. Delete stmt
350 # 3. Update stmt
351
352
353 #
354 # I.1
355 [PREPARE - SELECT * FROM xtable LIMIT 0]
356 RUN recvok
357 [EXECUTE]
358 [ASSERT Mysqlx.Resultset.ColumnMetaData]
359 [ASSERT Mysqlx.Resultset.ColumnMetaData]
360 [ASSERT Mysqlx.Resultset.FetchDone]
361 [ASSERT notice session state change - ROWS_AFFECTED, v_unsigned_int:0]
362 [ASSERT Mysqlx.Sql.StmtExecuteOk]
363
364 #
365 # I.2
366 [PREPARE - SELECT * FROM xtable]
367 RUN recvok
368 [EXECUTE]
369 [ASSERT Mysqlx.Resultset.ColumnMetaData]
370 [ASSERT Mysqlx.Resultset.ColumnMetaData]
371 [ASSERT Mysqlx.Resultset.Row]
372 [ASSERT Mysqlx.Resultset.Row]
373 [ASSERT Mysqlx.Resultset.Row]
374 [ASSERT Mysqlx.Resultset.Row]
375 [ASSERT Mysqlx.Resultset.Row]
376 [ASSERT Mysqlx.Resultset.FetchDone]
377 [ASSERT notice session state change - ROWS_AFFECTED, v_unsigned_int:0]
378 [ASSERT Mysqlx.Sql.StmtExecuteOk]
379
380 #
381 # II.1
382 [PREPARE - SELECT * FROM xtable LIMIT 0]
383 RUN recvok
384 [EXECUTE]
385 [ASSERT Mysqlx.Resultset.ColumnMetaData]
386 [ASSERT Mysqlx.Resultset.ColumnMetaData]
387 [ASSERT Mysqlx.Resultset.FetchSuspended]
388 [ASSERT Mysqlx.Sql.StmtExecuteOk]
389 [FETCH]
390 [ASSERT Mysqlx.Resultset.FetchDone]
391 [ASSERT notice session state change - ROWS_AFFECTED, v_unsigned_int:0]
392 [ASSERT Mysqlx.Sql.StmtExecuteOk]
393
394 #
395 # II.2
396 [PREPARE - SELECT * FROM xtable LIMIT 5]
397 RUN recvok
398 [EXECUTE]
399 [ASSERT Mysqlx.Resultset.ColumnMetaData]
400 [ASSERT Mysqlx.Resultset.ColumnMetaData]
401 [ASSERT Mysqlx.Resultset.Row]
402 [ASSERT Mysqlx.Resultset.Row]
403 [ASSERT Mysqlx.Resultset.Row]
404 [ASSERT Mysqlx.Resultset.Row]
405 [ASSERT Mysqlx.Resultset.Row]
406 [ASSERT Mysqlx.Resultset.FetchSuspended]
407 [ASSERT Mysqlx.Sql.StmtExecuteOk]
408 [FETCH]
409 [ASSERT Mysqlx.Resultset.FetchDone]
410 [ASSERT notice session state change - ROWS_AFFECTED, v_unsigned_int:0]
411 [ASSERT Mysqlx.Sql.StmtExecuteOk]
412
413 #
414 # II.3
415 [PREPARE - SELECT * FROM xtable LIMIT 5]
416 RUN recvok
417 [EXECUTE]
418 [ASSERT Mysqlx.Resultset.ColumnMetaData]
419 [ASSERT Mysqlx.Resultset.ColumnMetaData]
420 [ASSERT Mysqlx.Resultset.Row]
421 [ASSERT Mysqlx.Resultset.Row]
422 [ASSERT Mysqlx.Resultset.Row]
423 [ASSERT Mysqlx.Resultset.Row]
424 [ASSERT Mysqlx.Resultset.FetchSuspended]
425 [ASSERT Mysqlx.Sql.StmtExecuteOk]
426 [FETCH]
427 [ASSERT Mysqlx.Resultset.Row]
428 [ASSERT Mysqlx.Resultset.FetchDone]
429 [ASSERT notice session state change - ROWS_AFFECTED, v_unsigned_int:0]
430 [ASSERT Mysqlx.Sql.StmtExecuteOk]
431
432 #
433 # II.4
434 [PREPARE - SELECT * FROM xtable LIMIT 4]
435 RUN recvok
436 [EXECUTE]
437 [ASSERT Mysqlx.Resultset.ColumnMetaData]
438 [ASSERT Mysqlx.Resultset.ColumnMetaData]
439 [ASSERT Mysqlx.Resultset.Row]
440 [ASSERT Mysqlx.Resultset.Row]
441 [ASSERT Mysqlx.Resultset.FetchSuspended]
442 [ASSERT Mysqlx.Sql.StmtExecuteOk]
443 [FETCH]
444 [ASSERT Mysqlx.Resultset.Row]
445 [ASSERT Mysqlx.Resultset.Row]
446 [ASSERT Mysqlx.Resultset.FetchDone]
447 [ASSERT notice session state change - ROWS_AFFECTED, v_unsigned_int:0]
448 [ASSERT Mysqlx.Sql.StmtExecuteOk]
449
450 #
451 # II.5
452 [PREPARE - SELECT * FROM xtable LIMIT 3]
453 RUN recvok
454 [EXECUTE]
455 [ASSERT Mysqlx.Resultset.ColumnMetaData]
456 [ASSERT Mysqlx.Resultset.ColumnMetaData]
457 [ASSERT Mysqlx.Resultset.Row]
458 [ASSERT Mysqlx.Resultset.FetchSuspended]
459 [ASSERT Mysqlx.Sql.StmtExecuteOk]
460 [FETCH]
461 [ASSERT Mysqlx.Resultset.Row]
462 [ASSERT Mysqlx.Resultset.FetchSuspended]
463 [ASSERT Mysqlx.Sql.StmtExecuteOk]
464 [FETCH]
465 [ASSERT Mysqlx.Resultset.Row]
466 [ASSERT Mysqlx.Resultset.FetchSuspended]
467 [ASSERT Mysqlx.Sql.StmtExecuteOk]
468 [FETCH]
469 [ASSERT Mysqlx.Resultset.FetchDone]
470 [ASSERT notice session state change - ROWS_AFFECTED, v_unsigned_int:0]
471 [ASSERT Mysqlx.Sql.StmtExecuteOk]
472
473 #
474 # II.6
475 [PREPARE - SELECT 1/prio as col1 FROM xtable]
476 RUN recvok
477 [EXECUTE]
478 [ASSERT Mysqlx.Resultset.ColumnMetaData]
479 [ASSERT Mysqlx.Resultset.FetchSuspended]
480 [ASSERT notice warning - WARNING, 1365]
481 [ASSERT notice warning - WARNING, 1365]
482 [ASSERT Mysqlx.Sql.StmtExecuteOk]
483 [FETCH]
484 [ASSERT Mysqlx.Resultset.Row]
485 [ASSERT Mysqlx.Resultset.Row]
486 [ASSERT Mysqlx.Resultset.FetchSuspended]
487 [ASSERT Mysqlx.Sql.StmtExecuteOk]
488 [FETCH]
489 [ASSERT Mysqlx.Resultset.Row]
490 [ASSERT Mysqlx.Resultset.Row]
491 [ASSERT Mysqlx.Resultset.Row]
492 [ASSERT Mysqlx.Resultset.FetchDone]
493 [ASSERT notice session state change - ROWS_AFFECTED, v_unsigned_int:0]
494 [ASSERT Mysqlx.Sql.StmtExecuteOk]
495
496 #
497 # III.1.a
498 [PREPARE - CALL one_resultsets()]
499 RUN recvok
500 [EXECUTE]
501 [ASSERT Mysqlx.Resultset.ColumnMetaData]
502 [ASSERT Mysqlx.Resultset.Row]
503 [ASSERT Mysqlx.Resultset.Row]
504 [ASSERT Mysqlx.Resultset.Row]
505 [ASSERT Mysqlx.Resultset.FetchDoneMoreResultsets]
506 [ASSERT Mysqlx.Resultset.FetchDone]
507 [ASSERT notice session state change - ROWS_AFFECTED, v_unsigned_int:0]
508 [ASSERT Mysqlx.Sql.StmtExecuteOk]
509
510 #
511 # III.1.b
512 [PREPARE - CALL one_resultsets()]
513 RUN recvok
514 [EXECUTE]
515 [ASSERT Mysqlx.Resultset.ColumnMetaData]
516 [ASSERT Mysqlx.Resultset.Row]
517 [ASSERT Mysqlx.Resultset.Row]
518 [ASSERT Mysqlx.Resultset.Row]
519 [ASSERT Mysqlx.Resultset.FetchDoneMoreResultsets]
520 [ASSERT Mysqlx.Resultset.FetchDone]
521 [ASSERT notice session state change - ROWS_AFFECTED, v_unsigned_int:0]
522 [ASSERT Mysqlx.Sql.StmtExecuteOk]
523
524 #
525 # III.2
526 [PREPARE - CALL two_resultsets()]
527 RUN recvok
528 [EXECUTE]
529 [ASSERT Mysqlx.Resultset.ColumnMetaData]
530 [ASSERT Mysqlx.Resultset.Row]
531 [ASSERT Mysqlx.Resultset.Row]
532 [ASSERT Mysqlx.Resultset.Row]
533 [ASSERT Mysqlx.Resultset.FetchDoneMoreResultsets]
534 [ASSERT Mysqlx.Resultset.ColumnMetaData]
535 [ASSERT Mysqlx.Resultset.Row]
536 [ASSERT Mysqlx.Resultset.Row]
537 [ASSERT Mysqlx.Resultset.FetchDoneMoreResultsets]
538 [ASSERT Mysqlx.Resultset.FetchDone]
539 [ASSERT notice session state change - ROWS_AFFECTED, v_unsigned_int:0]
540 [ASSERT Mysqlx.Sql.StmtExecuteOk]
541
542 #
543 # III.3
544 [PREPARE - CALL two_resultsets_with_errors]
545 RUN recvok
546 [EXECUTE]
547 [ASSERT Mysqlx.Resultset.ColumnMetaData]
548 [ASSERT Mysqlx.Resultset.Row]
549 [ASSERT Mysqlx.Resultset.Row]
550 [ASSERT Mysqlx.Resultset.Row]
551 [ASSERT Mysqlx.Resultset.Row]
552 [ASSERT Mysqlx.Resultset.Row]
553 [ASSERT Mysqlx.Resultset.FetchDoneMoreResultsets]
554 [ASSERT Mysqlx.Resultset.ColumnMetaData]
555 [ASSERT Mysqlx.Resultset.Row]
556 [ASSERT Mysqlx.Resultset.Row]
557 [ASSERT Mysqlx.Resultset.Row]
558 [ASSERT Mysqlx.Resultset.Row]
559 [ASSERT Mysqlx.Resultset.Row]
560 [ASSERT Mysqlx.Resultset.FetchDoneMoreResultsets]
561 [ASSERT Mysqlx.Resultset.FetchDone]
562 [ASSERT notice warning - WARNING, 1365]
563 [ASSERT notice warning - WARNING, 1365]
564 [ASSERT notice session state change - ROWS_AFFECTED, v_unsigned_int:0]
565 [ASSERT Mysqlx.Sql.StmtExecuteOk]
566
567 #
568 # IV.1.a
569 [PREPARE - INSERT INTO xtest.xtable_with_pk(description) VALUE('MyCustomRow')]
570 RUN recvok
571 [EXECUTE]
572 [ASSERT notice session state change - ROWS_AFFECTED, v_unsigned_int:1]
573 [ASSERT notice session state change - GENERATED_INSERT_ID, v_unsigned_int: 2]
574 [ASSERT Mysqlx.Sql.StmtExecuteOk]
575
576 #
577 # IV.1.b
578 [PREPARE - INSERT INTO xtest.xtable(phrase, prio) VALUE('MyCustomRow', 100)]
579 RUN recvok
580 [EXECUTE]
581 [ASSERT notice session state change - ROWS_AFFECTED, v_unsigned_int:1]
582 [ASSERT Mysqlx.Sql.StmtExecuteOk]
583
584 #
585 # IV.2
586 [PREPARE - DELETE FROM xtest.xtable WHERE prio=100]
587 RUN recvok
588 [EXECUTE]
589 [ASSERT notice session state change - ROWS_AFFECTED, v_unsigned_int:1]
590 [ASSERT Mysqlx.Sql.StmtExecuteOk]
591
592 #
593 # IV.3
594 [PREPARE - UPDATE xtest.xtable SET phrase='New']
595 RUN recvok
596 [EXECUTE]
597 [ASSERT notice session state change - PRODUCED_MESSAGE, type: V_STRING]
598 [ASSERT notice session state change - ROWS_AFFECTED, v_unsigned_int:5]
599 [ASSERT Mysqlx.Sql.StmtExecuteOk]
600 Mysqlx.Ok {
601 msg: "bye!"
602 }
603 ok
604 ## C. Execute the test using zlib/single
605 #
606 CALL recreate_tables();
607
608
609 ## I. Validate non dynamic SQL statement where Cursor.Fetch is not needed
610 #
611 # 1. Assert empty resultset, dont get any rows at Cursor.Open.
612 # 2. Assert resultset that has less rows than requested by Cursor.Open.
613
614 ## II. Validate non dynamic SQL statement where Cursor.Fetch is needed to get all data
615 #
616 # 1. Assert empty resultset, still try to get at last one row at open
617 # 2. Assert resultset that has same amount of rows as requested
618 # 3. Assert resultset that has rows grater by one than requested
619 # 4. Assert resultset that has two times the amount of rows as requested
620 # 5. Assert resultset by fetching the resultset one by one row
621 # 6. Assert resultset by fetching the resultset and warnings generated by it
622
623 ## III. Validate dynamic SQL statement
624 #
625 # 1. Assert that cursor open, fetches whole resultset
626 # a. fetch_rows in Cursor.Open is not set
627 # b. fetch_rows in Cursor.Open is set (value doesn't matter).
628 # 2. Assert that cursor open, fetches multiple resultsets
629 # 3. Assert that cursor open, fetches multiple resultsets with warnings
630
631 ## IV. Validate notices
632 #
633 # 1. Insert stmt
634 # a. Table with primary key (expect notice GENERATED_INSERT_ID)
635 # b. Table without primary key (must not be generate GENERATED_INSERT_ID)
636 # 2. Delete stmt
637 # 3. Update stmt
638
639
640 #
641 # I.1
642 [PREPARE - SELECT * FROM xtable LIMIT 0]
643 RUN recvok
644 [EXECUTE]
645 [ASSERT Mysqlx.Resultset.ColumnMetaData]
646 [ASSERT Mysqlx.Resultset.ColumnMetaData]
647 [ASSERT Mysqlx.Resultset.FetchDone]
648 [ASSERT notice session state change - ROWS_AFFECTED, v_unsigned_int:0]
649 [ASSERT Mysqlx.Sql.StmtExecuteOk]
650
651 #
652 # I.2
653 [PREPARE - SELECT * FROM xtable]
654 RUN recvok
655 [EXECUTE]
656 [ASSERT Mysqlx.Resultset.ColumnMetaData]
657 [ASSERT Mysqlx.Resultset.ColumnMetaData]
658 [ASSERT Mysqlx.Resultset.Row]
659 [ASSERT Mysqlx.Resultset.Row]
660 [ASSERT Mysqlx.Resultset.Row]
661 [ASSERT Mysqlx.Resultset.Row]
662 [ASSERT Mysqlx.Resultset.Row]
663 [ASSERT Mysqlx.Resultset.FetchDone]
664 [ASSERT notice session state change - ROWS_AFFECTED, v_unsigned_int:0]
665 [ASSERT Mysqlx.Sql.StmtExecuteOk]
666
667 #
668 # II.1
669 [PREPARE - SELECT * FROM xtable LIMIT 0]
670 RUN recvok
671 [EXECUTE]
672 [ASSERT Mysqlx.Resultset.ColumnMetaData]
673 [ASSERT Mysqlx.Resultset.ColumnMetaData]
674 [ASSERT Mysqlx.Resultset.FetchSuspended]
675 [ASSERT Mysqlx.Sql.StmtExecuteOk]
676 [FETCH]
677 [ASSERT Mysqlx.Resultset.FetchDone]
678 [ASSERT notice session state change - ROWS_AFFECTED, v_unsigned_int:0]
679 [ASSERT Mysqlx.Sql.StmtExecuteOk]
680
681 #
682 # II.2
683 [PREPARE - SELECT * FROM xtable LIMIT 5]
684 RUN recvok
685 [EXECUTE]
686 [ASSERT Mysqlx.Resultset.ColumnMetaData]
687 [ASSERT Mysqlx.Resultset.ColumnMetaData]
688 [ASSERT Mysqlx.Resultset.Row]
689 [ASSERT Mysqlx.Resultset.Row]
690 [ASSERT Mysqlx.Resultset.Row]
691 [ASSERT Mysqlx.Resultset.Row]
692 [ASSERT Mysqlx.Resultset.Row]
693 [ASSERT Mysqlx.Resultset.FetchSuspended]
694 [ASSERT Mysqlx.Sql.StmtExecuteOk]
695 [FETCH]
696 [ASSERT Mysqlx.Resultset.FetchDone]
697 [ASSERT notice session state change - ROWS_AFFECTED, v_unsigned_int:0]
698 [ASSERT Mysqlx.Sql.StmtExecuteOk]
699
700 #
701 # II.3
702 [PREPARE - SELECT * FROM xtable LIMIT 5]
703 RUN recvok
704 [EXECUTE]
705 [ASSERT Mysqlx.Resultset.ColumnMetaData]
706 [ASSERT Mysqlx.Resultset.ColumnMetaData]
707 [ASSERT Mysqlx.Resultset.Row]
708 [ASSERT Mysqlx.Resultset.Row]
709 [ASSERT Mysqlx.Resultset.Row]
710 [ASSERT Mysqlx.Resultset.Row]
711 [ASSERT Mysqlx.Resultset.FetchSuspended]
712 [ASSERT Mysqlx.Sql.StmtExecuteOk]
713 [FETCH]
714 [ASSERT Mysqlx.Resultset.Row]
715 [ASSERT Mysqlx.Resultset.FetchDone]
716 [ASSERT notice session state change - ROWS_AFFECTED, v_unsigned_int:0]
717 [ASSERT Mysqlx.Sql.StmtExecuteOk]
718
719 #
720 # II.4
721 [PREPARE - SELECT * FROM xtable LIMIT 4]
722 RUN recvok
723 [EXECUTE]
724 [ASSERT Mysqlx.Resultset.ColumnMetaData]
725 [ASSERT Mysqlx.Resultset.ColumnMetaData]
726 [ASSERT Mysqlx.Resultset.Row]
727 [ASSERT Mysqlx.Resultset.Row]
728 [ASSERT Mysqlx.Resultset.FetchSuspended]
729 [ASSERT Mysqlx.Sql.StmtExecuteOk]
730 [FETCH]
731 [ASSERT Mysqlx.Resultset.Row]
732 [ASSERT Mysqlx.Resultset.Row]
733 [ASSERT Mysqlx.Resultset.FetchDone]
734 [ASSERT notice session state change - ROWS_AFFECTED, v_unsigned_int:0]
735 [ASSERT Mysqlx.Sql.StmtExecuteOk]
736
737 #
738 # II.5
739 [PREPARE - SELECT * FROM xtable LIMIT 3]
740 RUN recvok
741 [EXECUTE]
742 [ASSERT Mysqlx.Resultset.ColumnMetaData]
743 [ASSERT Mysqlx.Resultset.ColumnMetaData]
744 [ASSERT Mysqlx.Resultset.Row]
745 [ASSERT Mysqlx.Resultset.FetchSuspended]
746 [ASSERT Mysqlx.Sql.StmtExecuteOk]
747 [FETCH]
748 [ASSERT Mysqlx.Resultset.Row]
749 [ASSERT Mysqlx.Resultset.FetchSuspended]
750 [ASSERT Mysqlx.Sql.StmtExecuteOk]
751 [FETCH]
752 [ASSERT Mysqlx.Resultset.Row]
753 [ASSERT Mysqlx.Resultset.FetchSuspended]
754 [ASSERT Mysqlx.Sql.StmtExecuteOk]
755 [FETCH]
756 [ASSERT Mysqlx.Resultset.FetchDone]
757 [ASSERT notice session state change - ROWS_AFFECTED, v_unsigned_int:0]
758 [ASSERT Mysqlx.Sql.StmtExecuteOk]
759
760 #
761 # II.6
762 [PREPARE - SELECT 1/prio as col1 FROM xtable]
763 RUN recvok
764 [EXECUTE]
765 [ASSERT Mysqlx.Resultset.ColumnMetaData]
766 [ASSERT Mysqlx.Resultset.FetchSuspended]
767 [ASSERT notice warning - WARNING, 1365]
768 [ASSERT notice warning - WARNING, 1365]
769 [ASSERT Mysqlx.Sql.StmtExecuteOk]
770 [FETCH]
771 [ASSERT Mysqlx.Resultset.Row]
772 [ASSERT Mysqlx.Resultset.Row]
773 [ASSERT Mysqlx.Resultset.FetchSuspended]
774 [ASSERT Mysqlx.Sql.StmtExecuteOk]
775 [FETCH]
776 [ASSERT Mysqlx.Resultset.Row]
777 [ASSERT Mysqlx.Resultset.Row]
778 [ASSERT Mysqlx.Resultset.Row]
779 [ASSERT Mysqlx.Resultset.FetchDone]
780 [ASSERT notice session state change - ROWS_AFFECTED, v_unsigned_int:0]
781 [ASSERT Mysqlx.Sql.StmtExecuteOk]
782
783 #
784 # III.1.a
785 [PREPARE - CALL one_resultsets()]
786 RUN recvok
787 [EXECUTE]
788 [ASSERT Mysqlx.Resultset.ColumnMetaData]
789 [ASSERT Mysqlx.Resultset.Row]
790 [ASSERT Mysqlx.Resultset.Row]
791 [ASSERT Mysqlx.Resultset.Row]
792 [ASSERT Mysqlx.Resultset.FetchDoneMoreResultsets]
793 [ASSERT Mysqlx.Resultset.FetchDone]
794 [ASSERT notice session state change - ROWS_AFFECTED, v_unsigned_int:0]
795 [ASSERT Mysqlx.Sql.StmtExecuteOk]
796
797 #
798 # III.1.b
799 [PREPARE - CALL one_resultsets()]
800 RUN recvok
801 [EXECUTE]
802 [ASSERT Mysqlx.Resultset.ColumnMetaData]
803 [ASSERT Mysqlx.Resultset.Row]
804 [ASSERT Mysqlx.Resultset.Row]
805 [ASSERT Mysqlx.Resultset.Row]
806 [ASSERT Mysqlx.Resultset.FetchDoneMoreResultsets]
807 [ASSERT Mysqlx.Resultset.FetchDone]
808 [ASSERT notice session state change - ROWS_AFFECTED, v_unsigned_int:0]
809 [ASSERT Mysqlx.Sql.StmtExecuteOk]
810
811 #
812 # III.2
813 [PREPARE - CALL two_resultsets()]
814 RUN recvok
815 [EXECUTE]
816 [ASSERT Mysqlx.Resultset.ColumnMetaData]
817 [ASSERT Mysqlx.Resultset.Row]
818 [ASSERT Mysqlx.Resultset.Row]
819 [ASSERT Mysqlx.Resultset.Row]
820 [ASSERT Mysqlx.Resultset.FetchDoneMoreResultsets]
821 [ASSERT Mysqlx.Resultset.ColumnMetaData]
822 [ASSERT Mysqlx.Resultset.Row]
823 [ASSERT Mysqlx.Resultset.Row]
824 [ASSERT Mysqlx.Resultset.FetchDoneMoreResultsets]
825 [ASSERT Mysqlx.Resultset.FetchDone]
826 [ASSERT notice session state change - ROWS_AFFECTED, v_unsigned_int:0]
827 [ASSERT Mysqlx.Sql.StmtExecuteOk]
828
829 #
830 # III.3
831 [PREPARE - CALL two_resultsets_with_errors]
832 RUN recvok
833 [EXECUTE]
834 [ASSERT Mysqlx.Resultset.ColumnMetaData]
835 [ASSERT Mysqlx.Resultset.Row]
836 [ASSERT Mysqlx.Resultset.Row]
837 [ASSERT Mysqlx.Resultset.Row]
838 [ASSERT Mysqlx.Resultset.Row]
839 [ASSERT Mysqlx.Resultset.Row]
840 [ASSERT Mysqlx.Resultset.FetchDoneMoreResultsets]
841 [ASSERT Mysqlx.Resultset.ColumnMetaData]
842 [ASSERT Mysqlx.Resultset.Row]
843 [ASSERT Mysqlx.Resultset.Row]
844 [ASSERT Mysqlx.Resultset.Row]
845 [ASSERT Mysqlx.Resultset.Row]
846 [ASSERT Mysqlx.Resultset.Row]
847 [ASSERT Mysqlx.Resultset.FetchDoneMoreResultsets]
848 [ASSERT Mysqlx.Resultset.FetchDone]
849 [ASSERT notice warning - WARNING, 1365]
850 [ASSERT notice warning - WARNING, 1365]
851 [ASSERT notice session state change - ROWS_AFFECTED, v_unsigned_int:0]
852 [ASSERT Mysqlx.Sql.StmtExecuteOk]
853
854 #
855 # IV.1.a
856 [PREPARE - INSERT INTO xtest.xtable_with_pk(description) VALUE('MyCustomRow')]
857 RUN recvok
858 [EXECUTE]
859 [ASSERT notice session state change - ROWS_AFFECTED, v_unsigned_int:1]
860 [ASSERT notice session state change - GENERATED_INSERT_ID, v_unsigned_int: 2]
861 [ASSERT Mysqlx.Sql.StmtExecuteOk]
862
863 #
864 # IV.1.b
865 [PREPARE - INSERT INTO xtest.xtable(phrase, prio) VALUE('MyCustomRow', 100)]
866 RUN recvok
867 [EXECUTE]
868 [ASSERT notice session state change - ROWS_AFFECTED, v_unsigned_int:1]
869 [ASSERT Mysqlx.Sql.StmtExecuteOk]
870
871 #
872 # IV.2
873 [PREPARE - DELETE FROM xtest.xtable WHERE prio=100]
874 RUN recvok
875 [EXECUTE]
876 [ASSERT notice session state change - ROWS_AFFECTED, v_unsigned_int:1]
877 [ASSERT Mysqlx.Sql.StmtExecuteOk]
878
879 #
880 # IV.3
881 [PREPARE - UPDATE xtest.xtable SET phrase='New']
882 RUN recvok
883 [EXECUTE]
884 [ASSERT notice session state change - PRODUCED_MESSAGE, type: V_STRING]
885 [ASSERT notice session state change - ROWS_AFFECTED, v_unsigned_int:5]
886 [ASSERT Mysqlx.Sql.StmtExecuteOk]
887 Mysqlx.Ok {
888 msg: "bye!"
889 }
890 ok
891 ## D. Execute the test using lz4/group
892 #
893 CALL recreate_tables();
894
895
896 ## I. Validate non dynamic SQL statement where Cursor.Fetch is not needed
897 #
898 # 1. Assert empty resultset, dont get any rows at Cursor.Open.
899 # 2. Assert resultset that has less rows than requested by Cursor.Open.
900
901 ## II. Validate non dynamic SQL statement where Cursor.Fetch is needed to get all data
902 #
903 # 1. Assert empty resultset, still try to get at last one row at open
904 # 2. Assert resultset that has same amount of rows as requested
905 # 3. Assert resultset that has rows grater by one than requested
906 # 4. Assert resultset that has two times the amount of rows as requested
907 # 5. Assert resultset by fetching the resultset one by one row
908 # 6. Assert resultset by fetching the resultset and warnings generated by it
909
910 ## III. Validate dynamic SQL statement
911 #
912 # 1. Assert that cursor open, fetches whole resultset
913 # a. fetch_rows in Cursor.Open is not set
914 # b. fetch_rows in Cursor.Open is set (value doesn't matter).
915 # 2. Assert that cursor open, fetches multiple resultsets
916 # 3. Assert that cursor open, fetches multiple resultsets with warnings
917
918 ## IV. Validate notices
919 #
920 # 1. Insert stmt
921 # a. Table with primary key (expect notice GENERATED_INSERT_ID)
922 # b. Table without primary key (must not be generate GENERATED_INSERT_ID)
923 # 2. Delete stmt
924 # 3. Update stmt
925
926
927 #
928 # I.1
929 [PREPARE - SELECT * FROM xtable LIMIT 0]
930 RUN recvok
931 [EXECUTE]
932 [ASSERT Mysqlx.Resultset.ColumnMetaData]
933 [ASSERT Mysqlx.Resultset.ColumnMetaData]
934 [ASSERT Mysqlx.Resultset.FetchDone]
935 [ASSERT notice session state change - ROWS_AFFECTED, v_unsigned_int:0]
936 [ASSERT Mysqlx.Sql.StmtExecuteOk]
937
938 #
939 # I.2
940 [PREPARE - SELECT * FROM xtable]
941 RUN recvok
942 [EXECUTE]
943 [ASSERT Mysqlx.Resultset.ColumnMetaData]
944 [ASSERT Mysqlx.Resultset.ColumnMetaData]
945 [ASSERT Mysqlx.Resultset.Row]
946 [ASSERT Mysqlx.Resultset.Row]
947 [ASSERT Mysqlx.Resultset.Row]
948 [ASSERT Mysqlx.Resultset.Row]
949 [ASSERT Mysqlx.Resultset.Row]
950 [ASSERT Mysqlx.Resultset.FetchDone]
951 [ASSERT notice session state change - ROWS_AFFECTED, v_unsigned_int:0]
952 [ASSERT Mysqlx.Sql.StmtExecuteOk]
953
954 #
955 # II.1
956 [PREPARE - SELECT * FROM xtable LIMIT 0]
957 RUN recvok
958 [EXECUTE]
959 [ASSERT Mysqlx.Resultset.ColumnMetaData]
960 [ASSERT Mysqlx.Resultset.ColumnMetaData]
961 [ASSERT Mysqlx.Resultset.FetchSuspended]
962 [ASSERT Mysqlx.Sql.StmtExecuteOk]
963 [FETCH]
964 [ASSERT Mysqlx.Resultset.FetchDone]
965 [ASSERT notice session state change - ROWS_AFFECTED, v_unsigned_int:0]
966 [ASSERT Mysqlx.Sql.StmtExecuteOk]
967
968 #
969 # II.2
970 [PREPARE - SELECT * FROM xtable LIMIT 5]
971 RUN recvok
972 [EXECUTE]
973 [ASSERT Mysqlx.Resultset.ColumnMetaData]
974 [ASSERT Mysqlx.Resultset.ColumnMetaData]
975 [ASSERT Mysqlx.Resultset.Row]
976 [ASSERT Mysqlx.Resultset.Row]
977 [ASSERT Mysqlx.Resultset.Row]
978 [ASSERT Mysqlx.Resultset.Row]
979 [ASSERT Mysqlx.Resultset.Row]
980 [ASSERT Mysqlx.Resultset.FetchSuspended]
981 [ASSERT Mysqlx.Sql.StmtExecuteOk]
982 [FETCH]
983 [ASSERT Mysqlx.Resultset.FetchDone]
984 [ASSERT notice session state change - ROWS_AFFECTED, v_unsigned_int:0]
985 [ASSERT Mysqlx.Sql.StmtExecuteOk]
986
987 #
988 # II.3
989 [PREPARE - SELECT * FROM xtable LIMIT 5]
990 RUN recvok
991 [EXECUTE]
992 [ASSERT Mysqlx.Resultset.ColumnMetaData]
993 [ASSERT Mysqlx.Resultset.ColumnMetaData]
994 [ASSERT Mysqlx.Resultset.Row]
995 [ASSERT Mysqlx.Resultset.Row]
996 [ASSERT Mysqlx.Resultset.Row]
997 [ASSERT Mysqlx.Resultset.Row]
998 [ASSERT Mysqlx.Resultset.FetchSuspended]
999 [ASSERT Mysqlx.Sql.StmtExecuteOk]
1000 [FETCH]
1001 [ASSERT Mysqlx.Resultset.Row]
1002 [ASSERT Mysqlx.Resultset.FetchDone]
1003 [ASSERT notice session state change - ROWS_AFFECTED, v_unsigned_int:0]
1004 [ASSERT Mysqlx.Sql.StmtExecuteOk]
1005
1006 #
1007 # II.4
1008 [PREPARE - SELECT * FROM xtable LIMIT 4]
1009 RUN recvok
1010 [EXECUTE]
1011 [ASSERT Mysqlx.Resultset.ColumnMetaData]
1012 [ASSERT Mysqlx.Resultset.ColumnMetaData]
1013 [ASSERT Mysqlx.Resultset.Row]
1014 [ASSERT Mysqlx.Resultset.Row]
1015 [ASSERT Mysqlx.Resultset.FetchSuspended]
1016 [ASSERT Mysqlx.Sql.StmtExecuteOk]
1017 [FETCH]
1018 [ASSERT Mysqlx.Resultset.Row]
1019 [ASSERT Mysqlx.Resultset.Row]
1020 [ASSERT Mysqlx.Resultset.FetchDone]
1021 [ASSERT notice session state change - ROWS_AFFECTED, v_unsigned_int:0]
1022 [ASSERT Mysqlx.Sql.StmtExecuteOk]
1023
1024 #
1025 # II.5
1026 [PREPARE - SELECT * FROM xtable LIMIT 3]
1027 RUN recvok
1028 [EXECUTE]
1029 [ASSERT Mysqlx.Resultset.ColumnMetaData]
1030 [ASSERT Mysqlx.Resultset.ColumnMetaData]
1031 [ASSERT Mysqlx.Resultset.Row]
1032 [ASSERT Mysqlx.Resultset.FetchSuspended]
1033 [ASSERT Mysqlx.Sql.StmtExecuteOk]
1034 [FETCH]
1035 [ASSERT Mysqlx.Resultset.Row]
1036 [ASSERT Mysqlx.Resultset.FetchSuspended]
1037 [ASSERT Mysqlx.Sql.StmtExecuteOk]
1038 [FETCH]
1039 [ASSERT Mysqlx.Resultset.Row]
1040 [ASSERT Mysqlx.Resultset.FetchSuspended]
1041 [ASSERT Mysqlx.Sql.StmtExecuteOk]
1042 [FETCH]
1043 [ASSERT Mysqlx.Resultset.FetchDone]
1044 [ASSERT notice session state change - ROWS_AFFECTED, v_unsigned_int:0]
1045 [ASSERT Mysqlx.Sql.StmtExecuteOk]
1046
1047 #
1048 # II.6
1049 [PREPARE - SELECT 1/prio as col1 FROM xtable]
1050 RUN recvok
1051 [EXECUTE]
1052 [ASSERT Mysqlx.Resultset.ColumnMetaData]
1053 [ASSERT Mysqlx.Resultset.FetchSuspended]
1054 [ASSERT notice warning - WARNING, 1365]
1055 [ASSERT notice warning - WARNING, 1365]
1056 [ASSERT Mysqlx.Sql.StmtExecuteOk]
1057 [FETCH]
1058 [ASSERT Mysqlx.Resultset.Row]
1059 [ASSERT Mysqlx.Resultset.Row]
1060 [ASSERT Mysqlx.Resultset.FetchSuspended]
1061 [ASSERT Mysqlx.Sql.StmtExecuteOk]
1062 [FETCH]
1063 [ASSERT Mysqlx.Resultset.Row]
1064 [ASSERT Mysqlx.Resultset.Row]
1065 [ASSERT Mysqlx.Resultset.Row]
1066 [ASSERT Mysqlx.Resultset.FetchDone]
1067 [ASSERT notice session state change - ROWS_AFFECTED, v_unsigned_int:0]
1068 [ASSERT Mysqlx.Sql.StmtExecuteOk]
1069
1070 #
1071 # III.1.a
1072 [PREPARE - CALL one_resultsets()]
1073 RUN recvok
1074 [EXECUTE]
1075 [ASSERT Mysqlx.Resultset.ColumnMetaData]
1076 [ASSERT Mysqlx.Resultset.Row]
1077 [ASSERT Mysqlx.Resultset.Row]
1078 [ASSERT Mysqlx.Resultset.Row]
1079 [ASSERT Mysqlx.Resultset.FetchDoneMoreResultsets]
1080 [ASSERT Mysqlx.Resultset.FetchDone]
1081 [ASSERT notice session state change - ROWS_AFFECTED, v_unsigned_int:0]
1082 [ASSERT Mysqlx.Sql.StmtExecuteOk]
1083
1084 #
1085 # III.1.b
1086 [PREPARE - CALL one_resultsets()]
1087 RUN recvok
1088 [EXECUTE]
1089 [ASSERT Mysqlx.Resultset.ColumnMetaData]
1090 [ASSERT Mysqlx.Resultset.Row]
1091 [ASSERT Mysqlx.Resultset.Row]
1092 [ASSERT Mysqlx.Resultset.Row]
1093 [ASSERT Mysqlx.Resultset.FetchDoneMoreResultsets]
1094 [ASSERT Mysqlx.Resultset.FetchDone]
1095 [ASSERT notice session state change - ROWS_AFFECTED, v_unsigned_int:0]
1096 [ASSERT Mysqlx.Sql.StmtExecuteOk]
1097
1098 #
1099 # III.2
1100 [PREPARE - CALL two_resultsets()]
1101 RUN recvok
1102 [EXECUTE]
1103 [ASSERT Mysqlx.Resultset.ColumnMetaData]
1104 [ASSERT Mysqlx.Resultset.Row]
1105 [ASSERT Mysqlx.Resultset.Row]
1106 [ASSERT Mysqlx.Resultset.Row]
1107 [ASSERT Mysqlx.Resultset.FetchDoneMoreResultsets]
1108 [ASSERT Mysqlx.Resultset.ColumnMetaData]
1109 [ASSERT Mysqlx.Resultset.Row]
1110 [ASSERT Mysqlx.Resultset.Row]
1111 [ASSERT Mysqlx.Resultset.FetchDoneMoreResultsets]
1112 [ASSERT Mysqlx.Resultset.FetchDone]
1113 [ASSERT notice session state change - ROWS_AFFECTED, v_unsigned_int:0]
1114 [ASSERT Mysqlx.Sql.StmtExecuteOk]
1115
1116 #
1117 # III.3
1118 [PREPARE - CALL two_resultsets_with_errors]
1119 RUN recvok
1120 [EXECUTE]
1121 [ASSERT Mysqlx.Resultset.ColumnMetaData]
1122 [ASSERT Mysqlx.Resultset.Row]
1123 [ASSERT Mysqlx.Resultset.Row]
1124 [ASSERT Mysqlx.Resultset.Row]
1125 [ASSERT Mysqlx.Resultset.Row]
1126 [ASSERT Mysqlx.Resultset.Row]
1127 [ASSERT Mysqlx.Resultset.FetchDoneMoreResultsets]
1128 [ASSERT Mysqlx.Resultset.ColumnMetaData]
1129 [ASSERT Mysqlx.Resultset.Row]
1130 [ASSERT Mysqlx.Resultset.Row]
1131 [ASSERT Mysqlx.Resultset.Row]
1132 [ASSERT Mysqlx.Resultset.Row]
1133 [ASSERT Mysqlx.Resultset.Row]
1134 [ASSERT Mysqlx.Resultset.FetchDoneMoreResultsets]
1135 [ASSERT Mysqlx.Resultset.FetchDone]
1136 [ASSERT notice warning - WARNING, 1365]
1137 [ASSERT notice warning - WARNING, 1365]
1138 [ASSERT notice session state change - ROWS_AFFECTED, v_unsigned_int:0]
1139 [ASSERT Mysqlx.Sql.StmtExecuteOk]
1140
1141 #
1142 # IV.1.a
1143 [PREPARE - INSERT INTO xtest.xtable_with_pk(description) VALUE('MyCustomRow')]
1144 RUN recvok
1145 [EXECUTE]
1146 [ASSERT notice session state change - ROWS_AFFECTED, v_unsigned_int:1]
1147 [ASSERT notice session state change - GENERATED_INSERT_ID, v_unsigned_int: 2]
1148 [ASSERT Mysqlx.Sql.StmtExecuteOk]
1149
1150 #
1151 # IV.1.b
1152 [PREPARE - INSERT INTO xtest.xtable(phrase, prio) VALUE('MyCustomRow', 100)]
1153 RUN recvok
1154 [EXECUTE]
1155 [ASSERT notice session state change - ROWS_AFFECTED, v_unsigned_int:1]
1156 [ASSERT Mysqlx.Sql.StmtExecuteOk]
1157
1158 #
1159 # IV.2
1160 [PREPARE - DELETE FROM xtest.xtable WHERE prio=100]
1161 RUN recvok
1162 [EXECUTE]
1163 [ASSERT notice session state change - ROWS_AFFECTED, v_unsigned_int:1]
1164 [ASSERT Mysqlx.Sql.StmtExecuteOk]
1165
1166 #
1167 # IV.3
1168 [PREPARE - UPDATE xtest.xtable SET phrase='New']
1169 RUN recvok
1170 [EXECUTE]
1171 [ASSERT notice session state change - PRODUCED_MESSAGE, type: V_STRING]
1172 [ASSERT notice session state change - ROWS_AFFECTED, v_unsigned_int:5]
1173 [ASSERT Mysqlx.Sql.StmtExecuteOk]
1174 Mysqlx.Ok {
1175 msg: "bye!"
1176 }
1177 ok
1178 ## E. Execute the test using lz4/multiple
1179 #
1180 CALL recreate_tables();
1181
1182
1183 ## I. Validate non dynamic SQL statement where Cursor.Fetch is not needed
1184 #
1185 # 1. Assert empty resultset, dont get any rows at Cursor.Open.
1186 # 2. Assert resultset that has less rows than requested by Cursor.Open.
1187
1188 ## II. Validate non dynamic SQL statement where Cursor.Fetch is needed to get all data
1189 #
1190 # 1. Assert empty resultset, still try to get at last one row at open
1191 # 2. Assert resultset that has same amount of rows as requested
1192 # 3. Assert resultset that has rows grater by one than requested
1193 # 4. Assert resultset that has two times the amount of rows as requested
1194 # 5. Assert resultset by fetching the resultset one by one row
1195 # 6. Assert resultset by fetching the resultset and warnings generated by it
1196
1197 ## III. Validate dynamic SQL statement
1198 #
1199 # 1. Assert that cursor open, fetches whole resultset
1200 # a. fetch_rows in Cursor.Open is not set
1201 # b. fetch_rows in Cursor.Open is set (value doesn't matter).
1202 # 2. Assert that cursor open, fetches multiple resultsets
1203 # 3. Assert that cursor open, fetches multiple resultsets with warnings
1204
1205 ## IV. Validate notices
1206 #
1207 # 1. Insert stmt
1208 # a. Table with primary key (expect notice GENERATED_INSERT_ID)
1209 # b. Table without primary key (must not be generate GENERATED_INSERT_ID)
1210 # 2. Delete stmt
1211 # 3. Update stmt
1212
1213
1214 #
1215 # I.1
1216 [PREPARE - SELECT * FROM xtable LIMIT 0]
1217 RUN recvok
1218 [EXECUTE]
1219 [ASSERT Mysqlx.Resultset.ColumnMetaData]
1220 [ASSERT Mysqlx.Resultset.ColumnMetaData]
1221 [ASSERT Mysqlx.Resultset.FetchDone]
1222 [ASSERT notice session state change - ROWS_AFFECTED, v_unsigned_int:0]
1223 [ASSERT Mysqlx.Sql.StmtExecuteOk]
1224
1225 #
1226 # I.2
1227 [PREPARE - SELECT * FROM xtable]
1228 RUN recvok
1229 [EXECUTE]
1230 [ASSERT Mysqlx.Resultset.ColumnMetaData]
1231 [ASSERT Mysqlx.Resultset.ColumnMetaData]
1232 [ASSERT Mysqlx.Resultset.Row]
1233 [ASSERT Mysqlx.Resultset.Row]
1234 [ASSERT Mysqlx.Resultset.Row]
1235 [ASSERT Mysqlx.Resultset.Row]
1236 [ASSERT Mysqlx.Resultset.Row]
1237 [ASSERT Mysqlx.Resultset.FetchDone]
1238 [ASSERT notice session state change - ROWS_AFFECTED, v_unsigned_int:0]
1239 [ASSERT Mysqlx.Sql.StmtExecuteOk]
1240
1241 #
1242 # II.1
1243 [PREPARE - SELECT * FROM xtable LIMIT 0]
1244 RUN recvok
1245 [EXECUTE]
1246 [ASSERT Mysqlx.Resultset.ColumnMetaData]
1247 [ASSERT Mysqlx.Resultset.ColumnMetaData]
1248 [ASSERT Mysqlx.Resultset.FetchSuspended]
1249 [ASSERT Mysqlx.Sql.StmtExecuteOk]
1250 [FETCH]
1251 [ASSERT Mysqlx.Resultset.FetchDone]
1252 [ASSERT notice session state change - ROWS_AFFECTED, v_unsigned_int:0]
1253 [ASSERT Mysqlx.Sql.StmtExecuteOk]
1254
1255 #
1256 # II.2
1257 [PREPARE - SELECT * FROM xtable LIMIT 5]
1258 RUN recvok
1259 [EXECUTE]
1260 [ASSERT Mysqlx.Resultset.ColumnMetaData]
1261 [ASSERT Mysqlx.Resultset.ColumnMetaData]
1262 [ASSERT Mysqlx.Resultset.Row]
1263 [ASSERT Mysqlx.Resultset.Row]
1264 [ASSERT Mysqlx.Resultset.Row]
1265 [ASSERT Mysqlx.Resultset.Row]
1266 [ASSERT Mysqlx.Resultset.Row]
1267 [ASSERT Mysqlx.Resultset.FetchSuspended]
1268 [ASSERT Mysqlx.Sql.StmtExecuteOk]
1269 [FETCH]
1270 [ASSERT Mysqlx.Resultset.FetchDone]
1271 [ASSERT notice session state change - ROWS_AFFECTED, v_unsigned_int:0]
1272 [ASSERT Mysqlx.Sql.StmtExecuteOk]
1273
1274 #
1275 # II.3
1276 [PREPARE - SELECT * FROM xtable LIMIT 5]
1277 RUN recvok
1278 [EXECUTE]
1279 [ASSERT Mysqlx.Resultset.ColumnMetaData]
1280 [ASSERT Mysqlx.Resultset.ColumnMetaData]
1281 [ASSERT Mysqlx.Resultset.Row]
1282 [ASSERT Mysqlx.Resultset.Row]
1283 [ASSERT Mysqlx.Resultset.Row]
1284 [ASSERT Mysqlx.Resultset.Row]
1285 [ASSERT Mysqlx.Resultset.FetchSuspended]
1286 [ASSERT Mysqlx.Sql.StmtExecuteOk]
1287 [FETCH]
1288 [ASSERT Mysqlx.Resultset.Row]
1289 [ASSERT Mysqlx.Resultset.FetchDone]
1290 [ASSERT notice session state change - ROWS_AFFECTED, v_unsigned_int:0]
1291 [ASSERT Mysqlx.Sql.StmtExecuteOk]
1292
1293 #
1294 # II.4
1295 [PREPARE - SELECT * FROM xtable LIMIT 4]
1296 RUN recvok
1297 [EXECUTE]
1298 [ASSERT Mysqlx.Resultset.ColumnMetaData]
1299 [ASSERT Mysqlx.Resultset.ColumnMetaData]
1300 [ASSERT Mysqlx.Resultset.Row]
1301 [ASSERT Mysqlx.Resultset.Row]
1302 [ASSERT Mysqlx.Resultset.FetchSuspended]
1303 [ASSERT Mysqlx.Sql.StmtExecuteOk]
1304 [FETCH]
1305 [ASSERT Mysqlx.Resultset.Row]
1306 [ASSERT Mysqlx.Resultset.Row]
1307 [ASSERT Mysqlx.Resultset.FetchDone]
1308 [ASSERT notice session state change - ROWS_AFFECTED, v_unsigned_int:0]
1309 [ASSERT Mysqlx.Sql.StmtExecuteOk]
1310
1311 #
1312 # II.5
1313 [PREPARE - SELECT * FROM xtable LIMIT 3]
1314 RUN recvok
1315 [EXECUTE]
1316 [ASSERT Mysqlx.Resultset.ColumnMetaData]
1317 [ASSERT Mysqlx.Resultset.ColumnMetaData]
1318 [ASSERT Mysqlx.Resultset.Row]
1319 [ASSERT Mysqlx.Resultset.FetchSuspended]
1320 [ASSERT Mysqlx.Sql.StmtExecuteOk]
1321 [FETCH]
1322 [ASSERT Mysqlx.Resultset.Row]
1323 [ASSERT Mysqlx.Resultset.FetchSuspended]
1324 [ASSERT Mysqlx.Sql.StmtExecuteOk]
1325 [FETCH]
1326 [ASSERT Mysqlx.Resultset.Row]
1327 [ASSERT Mysqlx.Resultset.FetchSuspended]
1328 [ASSERT Mysqlx.Sql.StmtExecuteOk]
1329 [FETCH]
1330 [ASSERT Mysqlx.Resultset.FetchDone]
1331 [ASSERT notice session state change - ROWS_AFFECTED, v_unsigned_int:0]
1332 [ASSERT Mysqlx.Sql.StmtExecuteOk]
1333
1334 #
1335 # II.6
1336 [PREPARE - SELECT 1/prio as col1 FROM xtable]
1337 RUN recvok
1338 [EXECUTE]
1339 [ASSERT Mysqlx.Resultset.ColumnMetaData]
1340 [ASSERT Mysqlx.Resultset.FetchSuspended]
1341 [ASSERT notice warning - WARNING, 1365]
1342 [ASSERT notice warning - WARNING, 1365]
1343 [ASSERT Mysqlx.Sql.StmtExecuteOk]
1344 [FETCH]
1345 [ASSERT Mysqlx.Resultset.Row]
1346 [ASSERT Mysqlx.Resultset.Row]
1347 [ASSERT Mysqlx.Resultset.FetchSuspended]
1348 [ASSERT Mysqlx.Sql.StmtExecuteOk]
1349 [FETCH]
1350 [ASSERT Mysqlx.Resultset.Row]
1351 [ASSERT Mysqlx.Resultset.Row]
1352 [ASSERT Mysqlx.Resultset.Row]
1353 [ASSERT Mysqlx.Resultset.FetchDone]
1354 [ASSERT notice session state change - ROWS_AFFECTED, v_unsigned_int:0]
1355 [ASSERT Mysqlx.Sql.StmtExecuteOk]
1356
1357 #
1358 # III.1.a
1359 [PREPARE - CALL one_resultsets()]
1360 RUN recvok
1361 [EXECUTE]
1362 [ASSERT Mysqlx.Resultset.ColumnMetaData]
1363 [ASSERT Mysqlx.Resultset.Row]
1364 [ASSERT Mysqlx.Resultset.Row]
1365 [ASSERT Mysqlx.Resultset.Row]
1366 [ASSERT Mysqlx.Resultset.FetchDoneMoreResultsets]
1367 [ASSERT Mysqlx.Resultset.FetchDone]
1368 [ASSERT notice session state change - ROWS_AFFECTED, v_unsigned_int:0]
1369 [ASSERT Mysqlx.Sql.StmtExecuteOk]
1370
1371 #
1372 # III.1.b
1373 [PREPARE - CALL one_resultsets()]
1374 RUN recvok
1375 [EXECUTE]
1376 [ASSERT Mysqlx.Resultset.ColumnMetaData]
1377 [ASSERT Mysqlx.Resultset.Row]
1378 [ASSERT Mysqlx.Resultset.Row]
1379 [ASSERT Mysqlx.Resultset.Row]
1380 [ASSERT Mysqlx.Resultset.FetchDoneMoreResultsets]
1381 [ASSERT Mysqlx.Resultset.FetchDone]
1382 [ASSERT notice session state change - ROWS_AFFECTED, v_unsigned_int:0]
1383 [ASSERT Mysqlx.Sql.StmtExecuteOk]
1384
1385 #
1386 # III.2
1387 [PREPARE - CALL two_resultsets()]
1388 RUN recvok
1389 [EXECUTE]
1390 [ASSERT Mysqlx.Resultset.ColumnMetaData]
1391 [ASSERT Mysqlx.Resultset.Row]
1392 [ASSERT Mysqlx.Resultset.Row]
1393 [ASSERT Mysqlx.Resultset.Row]
1394 [ASSERT Mysqlx.Resultset.FetchDoneMoreResultsets]
1395 [ASSERT Mysqlx.Resultset.ColumnMetaData]
1396 [ASSERT Mysqlx.Resultset.Row]
1397 [ASSERT Mysqlx.Resultset.Row]
1398 [ASSERT Mysqlx.Resultset.FetchDoneMoreResultsets]
1399 [ASSERT Mysqlx.Resultset.FetchDone]
1400 [ASSERT notice session state change - ROWS_AFFECTED, v_unsigned_int:0]
1401 [ASSERT Mysqlx.Sql.StmtExecuteOk]
1402
1403 #
1404 # III.3
1405 [PREPARE - CALL two_resultsets_with_errors]
1406 RUN recvok
1407 [EXECUTE]
1408 [ASSERT Mysqlx.Resultset.ColumnMetaData]
1409 [ASSERT Mysqlx.Resultset.Row]
1410 [ASSERT Mysqlx.Resultset.Row]
1411 [ASSERT Mysqlx.Resultset.Row]
1412 [ASSERT Mysqlx.Resultset.Row]
1413 [ASSERT Mysqlx.Resultset.Row]
1414 [ASSERT Mysqlx.Resultset.FetchDoneMoreResultsets]
1415 [ASSERT Mysqlx.Resultset.ColumnMetaData]
1416 [ASSERT Mysqlx.Resultset.Row]
1417 [ASSERT Mysqlx.Resultset.Row]
1418 [ASSERT Mysqlx.Resultset.Row]
1419 [ASSERT Mysqlx.Resultset.Row]
1420 [ASSERT Mysqlx.Resultset.Row]
1421 [ASSERT Mysqlx.Resultset.FetchDoneMoreResultsets]
1422 [ASSERT Mysqlx.Resultset.FetchDone]
1423 [ASSERT notice warning - WARNING, 1365]
1424 [ASSERT notice warning - WARNING, 1365]
1425 [ASSERT notice session state change - ROWS_AFFECTED, v_unsigned_int:0]
1426 [ASSERT Mysqlx.Sql.StmtExecuteOk]
1427
1428 #
1429 # IV.1.a
1430 [PREPARE - INSERT INTO xtest.xtable_with_pk(description) VALUE('MyCustomRow')]
1431 RUN recvok
1432 [EXECUTE]
1433 [ASSERT notice session state change - ROWS_AFFECTED, v_unsigned_int:1]
1434 [ASSERT notice session state change - GENERATED_INSERT_ID, v_unsigned_int: 2]
1435 [ASSERT Mysqlx.Sql.StmtExecuteOk]
1436
1437 #
1438 # IV.1.b
1439 [PREPARE - INSERT INTO xtest.xtable(phrase, prio) VALUE('MyCustomRow', 100)]
1440 RUN recvok
1441 [EXECUTE]
1442 [ASSERT notice session state change - ROWS_AFFECTED, v_unsigned_int:1]
1443 [ASSERT Mysqlx.Sql.StmtExecuteOk]
1444
1445 #
1446 # IV.2
1447 [PREPARE - DELETE FROM xtest.xtable WHERE prio=100]
1448 RUN recvok
1449 [EXECUTE]
1450 [ASSERT notice session state change - ROWS_AFFECTED, v_unsigned_int:1]
1451 [ASSERT Mysqlx.Sql.StmtExecuteOk]
1452
1453 #
1454 # IV.3
1455 [PREPARE - UPDATE xtest.xtable SET phrase='New']
1456 RUN recvok
1457 [EXECUTE]
1458 [ASSERT notice session state change - PRODUCED_MESSAGE, type: V_STRING]
1459 [ASSERT notice session state change - ROWS_AFFECTED, v_unsigned_int:5]
1460 [ASSERT Mysqlx.Sql.StmtExecuteOk]
1461 Mysqlx.Ok {
1462 msg: "bye!"
1463 }
1464 ok
1465 ## F. Execute the test using lz4/single
1466 #
1467 CALL recreate_tables();
1468
1469
1470 ## I. Validate non dynamic SQL statement where Cursor.Fetch is not needed
1471 #
1472 # 1. Assert empty resultset, dont get any rows at Cursor.Open.
1473 # 2. Assert resultset that has less rows than requested by Cursor.Open.
1474
1475 ## II. Validate non dynamic SQL statement where Cursor.Fetch is needed to get all data
1476 #
1477 # 1. Assert empty resultset, still try to get at last one row at open
1478 # 2. Assert resultset that has same amount of rows as requested
1479 # 3. Assert resultset that has rows grater by one than requested
1480 # 4. Assert resultset that has two times the amount of rows as requested
1481 # 5. Assert resultset by fetching the resultset one by one row
1482 # 6. Assert resultset by fetching the resultset and warnings generated by it
1483
1484 ## III. Validate dynamic SQL statement
1485 #
1486 # 1. Assert that cursor open, fetches whole resultset
1487 # a. fetch_rows in Cursor.Open is not set
1488 # b. fetch_rows in Cursor.Open is set (value doesn't matter).
1489 # 2. Assert that cursor open, fetches multiple resultsets
1490 # 3. Assert that cursor open, fetches multiple resultsets with warnings
1491
1492 ## IV. Validate notices
1493 #
1494 # 1. Insert stmt
1495 # a. Table with primary key (expect notice GENERATED_INSERT_ID)
1496 # b. Table without primary key (must not be generate GENERATED_INSERT_ID)
1497 # 2. Delete stmt
1498 # 3. Update stmt
1499
1500
1501 #
1502 # I.1
1503 [PREPARE - SELECT * FROM xtable LIMIT 0]
1504 RUN recvok
1505 [EXECUTE]
1506 [ASSERT Mysqlx.Resultset.ColumnMetaData]
1507 [ASSERT Mysqlx.Resultset.ColumnMetaData]
1508 [ASSERT Mysqlx.Resultset.FetchDone]
1509 [ASSERT notice session state change - ROWS_AFFECTED, v_unsigned_int:0]
1510 [ASSERT Mysqlx.Sql.StmtExecuteOk]
1511
1512 #
1513 # I.2
1514 [PREPARE - SELECT * FROM xtable]
1515 RUN recvok
1516 [EXECUTE]
1517 [ASSERT Mysqlx.Resultset.ColumnMetaData]
1518 [ASSERT Mysqlx.Resultset.ColumnMetaData]
1519 [ASSERT Mysqlx.Resultset.Row]
1520 [ASSERT Mysqlx.Resultset.Row]
1521 [ASSERT Mysqlx.Resultset.Row]
1522 [ASSERT Mysqlx.Resultset.Row]
1523 [ASSERT Mysqlx.Resultset.Row]
1524 [ASSERT Mysqlx.Resultset.FetchDone]
1525 [ASSERT notice session state change - ROWS_AFFECTED, v_unsigned_int:0]
1526 [ASSERT Mysqlx.Sql.StmtExecuteOk]
1527
1528 #
1529 # II.1
1530 [PREPARE - SELECT * FROM xtable LIMIT 0]
1531 RUN recvok
1532 [EXECUTE]
1533 [ASSERT Mysqlx.Resultset.ColumnMetaData]
1534 [ASSERT Mysqlx.Resultset.ColumnMetaData]
1535 [ASSERT Mysqlx.Resultset.FetchSuspended]
1536 [ASSERT Mysqlx.Sql.StmtExecuteOk]
1537 [FETCH]
1538 [ASSERT Mysqlx.Resultset.FetchDone]
1539 [ASSERT notice session state change - ROWS_AFFECTED, v_unsigned_int:0]
1540 [ASSERT Mysqlx.Sql.StmtExecuteOk]
1541
1542 #
1543 # II.2
1544 [PREPARE - SELECT * FROM xtable LIMIT 5]
1545 RUN recvok
1546 [EXECUTE]
1547 [ASSERT Mysqlx.Resultset.ColumnMetaData]
1548 [ASSERT Mysqlx.Resultset.ColumnMetaData]
1549 [ASSERT Mysqlx.Resultset.Row]
1550 [ASSERT Mysqlx.Resultset.Row]
1551 [ASSERT Mysqlx.Resultset.Row]
1552 [ASSERT Mysqlx.Resultset.Row]
1553 [ASSERT Mysqlx.Resultset.Row]
1554 [ASSERT Mysqlx.Resultset.FetchSuspended]
1555 [ASSERT Mysqlx.Sql.StmtExecuteOk]
1556 [FETCH]
1557 [ASSERT Mysqlx.Resultset.FetchDone]
1558 [ASSERT notice session state change - ROWS_AFFECTED, v_unsigned_int:0]
1559 [ASSERT Mysqlx.Sql.StmtExecuteOk]
1560
1561 #
1562 # II.3
1563 [PREPARE - SELECT * FROM xtable LIMIT 5]
1564 RUN recvok
1565 [EXECUTE]
1566 [ASSERT Mysqlx.Resultset.ColumnMetaData]
1567 [ASSERT Mysqlx.Resultset.ColumnMetaData]
1568 [ASSERT Mysqlx.Resultset.Row]
1569 [ASSERT Mysqlx.Resultset.Row]
1570 [ASSERT Mysqlx.Resultset.Row]
1571 [ASSERT Mysqlx.Resultset.Row]
1572 [ASSERT Mysqlx.Resultset.FetchSuspended]
1573 [ASSERT Mysqlx.Sql.StmtExecuteOk]
1574 [FETCH]
1575 [ASSERT Mysqlx.Resultset.Row]
1576 [ASSERT Mysqlx.Resultset.FetchDone]
1577 [ASSERT notice session state change - ROWS_AFFECTED, v_unsigned_int:0]
1578 [ASSERT Mysqlx.Sql.StmtExecuteOk]
1579
1580 #
1581 # II.4
1582 [PREPARE - SELECT * FROM xtable LIMIT 4]
1583 RUN recvok
1584 [EXECUTE]
1585 [ASSERT Mysqlx.Resultset.ColumnMetaData]
1586 [ASSERT Mysqlx.Resultset.ColumnMetaData]
1587 [ASSERT Mysqlx.Resultset.Row]
1588 [ASSERT Mysqlx.Resultset.Row]
1589 [ASSERT Mysqlx.Resultset.FetchSuspended]
1590 [ASSERT Mysqlx.Sql.StmtExecuteOk]
1591 [FETCH]
1592 [ASSERT Mysqlx.Resultset.Row]
1593 [ASSERT Mysqlx.Resultset.Row]
1594 [ASSERT Mysqlx.Resultset.FetchDone]
1595 [ASSERT notice session state change - ROWS_AFFECTED, v_unsigned_int:0]
1596 [ASSERT Mysqlx.Sql.StmtExecuteOk]
1597
1598 #
1599 # II.5
1600 [PREPARE - SELECT * FROM xtable LIMIT 3]
1601 RUN recvok
1602 [EXECUTE]
1603 [ASSERT Mysqlx.Resultset.ColumnMetaData]
1604 [ASSERT Mysqlx.Resultset.ColumnMetaData]
1605 [ASSERT Mysqlx.Resultset.Row]
1606 [ASSERT Mysqlx.Resultset.FetchSuspended]
1607 [ASSERT Mysqlx.Sql.StmtExecuteOk]
1608 [FETCH]
1609 [ASSERT Mysqlx.Resultset.Row]
1610 [ASSERT Mysqlx.Resultset.FetchSuspended]
1611 [ASSERT Mysqlx.Sql.StmtExecuteOk]
1612 [FETCH]
1613 [ASSERT Mysqlx.Resultset.Row]
1614 [ASSERT Mysqlx.Resultset.FetchSuspended]
1615 [ASSERT Mysqlx.Sql.StmtExecuteOk]
1616 [FETCH]
1617 [ASSERT Mysqlx.Resultset.FetchDone]
1618 [ASSERT notice session state change - ROWS_AFFECTED, v_unsigned_int:0]
1619 [ASSERT Mysqlx.Sql.StmtExecuteOk]
1620
1621 #
1622 # II.6
1623 [PREPARE - SELECT 1/prio as col1 FROM xtable]
1624 RUN recvok
1625 [EXECUTE]
1626 [ASSERT Mysqlx.Resultset.ColumnMetaData]
1627 [ASSERT Mysqlx.Resultset.FetchSuspended]
1628 [ASSERT notice warning - WARNING, 1365]
1629 [ASSERT notice warning - WARNING, 1365]
1630 [ASSERT Mysqlx.Sql.StmtExecuteOk]
1631 [FETCH]
1632 [ASSERT Mysqlx.Resultset.Row]
1633 [ASSERT Mysqlx.Resultset.Row]
1634 [ASSERT Mysqlx.Resultset.FetchSuspended]
1635 [ASSERT Mysqlx.Sql.StmtExecuteOk]
1636 [FETCH]
1637 [ASSERT Mysqlx.Resultset.Row]
1638 [ASSERT Mysqlx.Resultset.Row]
1639 [ASSERT Mysqlx.Resultset.Row]
1640 [ASSERT Mysqlx.Resultset.FetchDone]
1641 [ASSERT notice session state change - ROWS_AFFECTED, v_unsigned_int:0]
1642 [ASSERT Mysqlx.Sql.StmtExecuteOk]
1643
1644 #
1645 # III.1.a
1646 [PREPARE - CALL one_resultsets()]
1647 RUN recvok
1648 [EXECUTE]
1649 [ASSERT Mysqlx.Resultset.ColumnMetaData]
1650 [ASSERT Mysqlx.Resultset.Row]
1651 [ASSERT Mysqlx.Resultset.Row]
1652 [ASSERT Mysqlx.Resultset.Row]
1653 [ASSERT Mysqlx.Resultset.FetchDoneMoreResultsets]
1654 [ASSERT Mysqlx.Resultset.FetchDone]
1655 [ASSERT notice session state change - ROWS_AFFECTED, v_unsigned_int:0]
1656 [ASSERT Mysqlx.Sql.StmtExecuteOk]
1657
1658 #
1659 # III.1.b
1660 [PREPARE - CALL one_resultsets()]
1661 RUN recvok
1662 [EXECUTE]
1663 [ASSERT Mysqlx.Resultset.ColumnMetaData]
1664 [ASSERT Mysqlx.Resultset.Row]
1665 [ASSERT Mysqlx.Resultset.Row]
1666 [ASSERT Mysqlx.Resultset.Row]
1667 [ASSERT Mysqlx.Resultset.FetchDoneMoreResultsets]
1668 [ASSERT Mysqlx.Resultset.FetchDone]
1669 [ASSERT notice session state change - ROWS_AFFECTED, v_unsigned_int:0]
1670 [ASSERT Mysqlx.Sql.StmtExecuteOk]
1671
1672 #
1673 # III.2
1674 [PREPARE - CALL two_resultsets()]
1675 RUN recvok
1676 [EXECUTE]
1677 [ASSERT Mysqlx.Resultset.ColumnMetaData]
1678 [ASSERT Mysqlx.Resultset.Row]
1679 [ASSERT Mysqlx.Resultset.Row]
1680 [ASSERT Mysqlx.Resultset.Row]
1681 [ASSERT Mysqlx.Resultset.FetchDoneMoreResultsets]
1682 [ASSERT Mysqlx.Resultset.ColumnMetaData]
1683 [ASSERT Mysqlx.Resultset.Row]
1684 [ASSERT Mysqlx.Resultset.Row]
1685 [ASSERT Mysqlx.Resultset.FetchDoneMoreResultsets]
1686 [ASSERT Mysqlx.Resultset.FetchDone]
1687 [ASSERT notice session state change - ROWS_AFFECTED, v_unsigned_int:0]
1688 [ASSERT Mysqlx.Sql.StmtExecuteOk]
1689
1690 #
1691 # III.3
1692 [PREPARE - CALL two_resultsets_with_errors]
1693 RUN recvok
1694 [EXECUTE]
1695 [ASSERT Mysqlx.Resultset.ColumnMetaData]
1696 [ASSERT Mysqlx.Resultset.Row]
1697 [ASSERT Mysqlx.Resultset.Row]
1698 [ASSERT Mysqlx.Resultset.Row]
1699 [ASSERT Mysqlx.Resultset.Row]
1700 [ASSERT Mysqlx.Resultset.Row]
1701 [ASSERT Mysqlx.Resultset.FetchDoneMoreResultsets]
1702 [ASSERT Mysqlx.Resultset.ColumnMetaData]
1703 [ASSERT Mysqlx.Resultset.Row]
1704 [ASSERT Mysqlx.Resultset.Row]
1705 [ASSERT Mysqlx.Resultset.Row]
1706 [ASSERT Mysqlx.Resultset.Row]
1707 [ASSERT Mysqlx.Resultset.Row]
1708 [ASSERT Mysqlx.Resultset.FetchDoneMoreResultsets]
1709 [ASSERT Mysqlx.Resultset.FetchDone]
1710 [ASSERT notice warning - WARNING, 1365]
1711 [ASSERT notice warning - WARNING, 1365]
1712 [ASSERT notice session state change - ROWS_AFFECTED, v_unsigned_int:0]
1713 [ASSERT Mysqlx.Sql.StmtExecuteOk]
1714
1715 #
1716 # IV.1.a
1717 [PREPARE - INSERT INTO xtest.xtable_with_pk(description) VALUE('MyCustomRow')]
1718 RUN recvok
1719 [EXECUTE]
1720 [ASSERT notice session state change - ROWS_AFFECTED, v_unsigned_int:1]
1721 [ASSERT notice session state change - GENERATED_INSERT_ID, v_unsigned_int: 2]
1722 [ASSERT Mysqlx.Sql.StmtExecuteOk]
1723
1724 #
1725 # IV.1.b
1726 [PREPARE - INSERT INTO xtest.xtable(phrase, prio) VALUE('MyCustomRow', 100)]
1727 RUN recvok
1728 [EXECUTE]
1729 [ASSERT notice session state change - ROWS_AFFECTED, v_unsigned_int:1]
1730 [ASSERT Mysqlx.Sql.StmtExecuteOk]
1731
1732 #
1733 # IV.2
1734 [PREPARE - DELETE FROM xtest.xtable WHERE prio=100]
1735 RUN recvok
1736 [EXECUTE]
1737 [ASSERT notice session state change - ROWS_AFFECTED, v_unsigned_int:1]
1738 [ASSERT Mysqlx.Sql.StmtExecuteOk]
1739
1740 #
1741 # IV.3
1742 [PREPARE - UPDATE xtest.xtable SET phrase='New']
1743 RUN recvok
1744 [EXECUTE]
1745 [ASSERT notice session state change - PRODUCED_MESSAGE, type: V_STRING]
1746 [ASSERT notice session state change - ROWS_AFFECTED, v_unsigned_int:5]
1747 [ASSERT Mysqlx.Sql.StmtExecuteOk]
1748 Mysqlx.Ok {
1749 msg: "bye!"
1750 }
1751 ok
1752 ## G. Execute the test using zstd/group
1753 #
1754 CALL recreate_tables();
1755
1756
1757 ## I. Validate non dynamic SQL statement where Cursor.Fetch is not needed
1758 #
1759 # 1. Assert empty resultset, dont get any rows at Cursor.Open.
1760 # 2. Assert resultset that has less rows than requested by Cursor.Open.
1761
1762 ## II. Validate non dynamic SQL statement where Cursor.Fetch is needed to get all data
1763 #
1764 # 1. Assert empty resultset, still try to get at last one row at open
1765 # 2. Assert resultset that has same amount of rows as requested
1766 # 3. Assert resultset that has rows grater by one than requested
1767 # 4. Assert resultset that has two times the amount of rows as requested
1768 # 5. Assert resultset by fetching the resultset one by one row
1769 # 6. Assert resultset by fetching the resultset and warnings generated by it
1770
1771 ## III. Validate dynamic SQL statement
1772 #
1773 # 1. Assert that cursor open, fetches whole resultset
1774 # a. fetch_rows in Cursor.Open is not set
1775 # b. fetch_rows in Cursor.Open is set (value doesn't matter).
1776 # 2. Assert that cursor open, fetches multiple resultsets
1777 # 3. Assert that cursor open, fetches multiple resultsets with warnings
1778
1779 ## IV. Validate notices
1780 #
1781 # 1. Insert stmt
1782 # a. Table with primary key (expect notice GENERATED_INSERT_ID)
1783 # b. Table without primary key (must not be generate GENERATED_INSERT_ID)
1784 # 2. Delete stmt
1785 # 3. Update stmt
1786
1787
1788 #
1789 # I.1
1790 [PREPARE - SELECT * FROM xtable LIMIT 0]
1791 RUN recvok
1792 [EXECUTE]
1793 [ASSERT Mysqlx.Resultset.ColumnMetaData]
1794 [ASSERT Mysqlx.Resultset.ColumnMetaData]
1795 [ASSERT Mysqlx.Resultset.FetchDone]
1796 [ASSERT notice session state change - ROWS_AFFECTED, v_unsigned_int:0]
1797 [ASSERT Mysqlx.Sql.StmtExecuteOk]
1798
1799 #
1800 # I.2
1801 [PREPARE - SELECT * FROM xtable]
1802 RUN recvok
1803 [EXECUTE]
1804 [ASSERT Mysqlx.Resultset.ColumnMetaData]
1805 [ASSERT Mysqlx.Resultset.ColumnMetaData]
1806 [ASSERT Mysqlx.Resultset.Row]
1807 [ASSERT Mysqlx.Resultset.Row]
1808 [ASSERT Mysqlx.Resultset.Row]
1809 [ASSERT Mysqlx.Resultset.Row]
1810 [ASSERT Mysqlx.Resultset.Row]
1811 [ASSERT Mysqlx.Resultset.FetchDone]
1812 [ASSERT notice session state change - ROWS_AFFECTED, v_unsigned_int:0]
1813 [ASSERT Mysqlx.Sql.StmtExecuteOk]
1814
1815 #
1816 # II.1
1817 [PREPARE - SELECT * FROM xtable LIMIT 0]
1818 RUN recvok
1819 [EXECUTE]
1820 [ASSERT Mysqlx.Resultset.ColumnMetaData]
1821 [ASSERT Mysqlx.Resultset.ColumnMetaData]
1822 [ASSERT Mysqlx.Resultset.FetchSuspended]
1823 [ASSERT Mysqlx.Sql.StmtExecuteOk]
1824 [FETCH]
1825 [ASSERT Mysqlx.Resultset.FetchDone]
1826 [ASSERT notice session state change - ROWS_AFFECTED, v_unsigned_int:0]
1827 [ASSERT Mysqlx.Sql.StmtExecuteOk]
1828
1829 #
1830 # II.2
1831 [PREPARE - SELECT * FROM xtable LIMIT 5]
1832 RUN recvok
1833 [EXECUTE]
1834 [ASSERT Mysqlx.Resultset.ColumnMetaData]
1835 [ASSERT Mysqlx.Resultset.ColumnMetaData]
1836 [ASSERT Mysqlx.Resultset.Row]
1837 [ASSERT Mysqlx.Resultset.Row]
1838 [ASSERT Mysqlx.Resultset.Row]
1839 [ASSERT Mysqlx.Resultset.Row]
1840 [ASSERT Mysqlx.Resultset.Row]
1841 [ASSERT Mysqlx.Resultset.FetchSuspended]
1842 [ASSERT Mysqlx.Sql.StmtExecuteOk]
1843 [FETCH]
1844 [ASSERT Mysqlx.Resultset.FetchDone]
1845 [ASSERT notice session state change - ROWS_AFFECTED, v_unsigned_int:0]
1846 [ASSERT Mysqlx.Sql.StmtExecuteOk]
1847
1848 #
1849 # II.3
1850 [PREPARE - SELECT * FROM xtable LIMIT 5]
1851 RUN recvok
1852 [EXECUTE]
1853 [ASSERT Mysqlx.Resultset.ColumnMetaData]
1854 [ASSERT Mysqlx.Resultset.ColumnMetaData]
1855 [ASSERT Mysqlx.Resultset.Row]
1856 [ASSERT Mysqlx.Resultset.Row]
1857 [ASSERT Mysqlx.Resultset.Row]
1858 [ASSERT Mysqlx.Resultset.Row]
1859 [ASSERT Mysqlx.Resultset.FetchSuspended]
1860 [ASSERT Mysqlx.Sql.StmtExecuteOk]
1861 [FETCH]
1862 [ASSERT Mysqlx.Resultset.Row]
1863 [ASSERT Mysqlx.Resultset.FetchDone]
1864 [ASSERT notice session state change - ROWS_AFFECTED, v_unsigned_int:0]
1865 [ASSERT Mysqlx.Sql.StmtExecuteOk]
1866
1867 #
1868 # II.4
1869 [PREPARE - SELECT * FROM xtable LIMIT 4]
1870 RUN recvok
1871 [EXECUTE]
1872 [ASSERT Mysqlx.Resultset.ColumnMetaData]
1873 [ASSERT Mysqlx.Resultset.ColumnMetaData]
1874 [ASSERT Mysqlx.Resultset.Row]
1875 [ASSERT Mysqlx.Resultset.Row]
1876 [ASSERT Mysqlx.Resultset.FetchSuspended]
1877 [ASSERT Mysqlx.Sql.StmtExecuteOk]
1878 [FETCH]
1879 [ASSERT Mysqlx.Resultset.Row]
1880 [ASSERT Mysqlx.Resultset.Row]
1881 [ASSERT Mysqlx.Resultset.FetchDone]
1882 [ASSERT notice session state change - ROWS_AFFECTED, v_unsigned_int:0]
1883 [ASSERT Mysqlx.Sql.StmtExecuteOk]
1884
1885 #
1886 # II.5
1887 [PREPARE - SELECT * FROM xtable LIMIT 3]
1888 RUN recvok
1889 [EXECUTE]
1890 [ASSERT Mysqlx.Resultset.ColumnMetaData]
1891 [ASSERT Mysqlx.Resultset.ColumnMetaData]
1892 [ASSERT Mysqlx.Resultset.Row]
1893 [ASSERT Mysqlx.Resultset.FetchSuspended]
1894 [ASSERT Mysqlx.Sql.StmtExecuteOk]
1895 [FETCH]
1896 [ASSERT Mysqlx.Resultset.Row]
1897 [ASSERT Mysqlx.Resultset.FetchSuspended]
1898 [ASSERT Mysqlx.Sql.StmtExecuteOk]
1899 [FETCH]
1900 [ASSERT Mysqlx.Resultset.Row]
1901 [ASSERT Mysqlx.Resultset.FetchSuspended]
1902 [ASSERT Mysqlx.Sql.StmtExecuteOk]
1903 [FETCH]
1904 [ASSERT Mysqlx.Resultset.FetchDone]
1905 [ASSERT notice session state change - ROWS_AFFECTED, v_unsigned_int:0]
1906 [ASSERT Mysqlx.Sql.StmtExecuteOk]
1907
1908 #
1909 # II.6
1910 [PREPARE - SELECT 1/prio as col1 FROM xtable]
1911 RUN recvok
1912 [EXECUTE]
1913 [ASSERT Mysqlx.Resultset.ColumnMetaData]
1914 [ASSERT Mysqlx.Resultset.FetchSuspended]
1915 [ASSERT notice warning - WARNING, 1365]
1916 [ASSERT notice warning - WARNING, 1365]
1917 [ASSERT Mysqlx.Sql.StmtExecuteOk]
1918 [FETCH]
1919 [ASSERT Mysqlx.Resultset.Row]
1920 [ASSERT Mysqlx.Resultset.Row]
1921 [ASSERT Mysqlx.Resultset.FetchSuspended]
1922 [ASSERT Mysqlx.Sql.StmtExecuteOk]
1923 [FETCH]
1924 [ASSERT Mysqlx.Resultset.Row]
1925 [ASSERT Mysqlx.Resultset.Row]
1926 [ASSERT Mysqlx.Resultset.Row]
1927 [ASSERT Mysqlx.Resultset.FetchDone]
1928 [ASSERT notice session state change - ROWS_AFFECTED, v_unsigned_int:0]
1929 [ASSERT Mysqlx.Sql.StmtExecuteOk]
1930
1931 #
1932 # III.1.a
1933 [PREPARE - CALL one_resultsets()]
1934 RUN recvok
1935 [EXECUTE]
1936 [ASSERT Mysqlx.Resultset.ColumnMetaData]
1937 [ASSERT Mysqlx.Resultset.Row]
1938 [ASSERT Mysqlx.Resultset.Row]
1939 [ASSERT Mysqlx.Resultset.Row]
1940 [ASSERT Mysqlx.Resultset.FetchDoneMoreResultsets]
1941 [ASSERT Mysqlx.Resultset.FetchDone]
1942 [ASSERT notice session state change - ROWS_AFFECTED, v_unsigned_int:0]
1943 [ASSERT Mysqlx.Sql.StmtExecuteOk]
1944
1945 #
1946 # III.1.b
1947 [PREPARE - CALL one_resultsets()]
1948 RUN recvok
1949 [EXECUTE]
1950 [ASSERT Mysqlx.Resultset.ColumnMetaData]
1951 [ASSERT Mysqlx.Resultset.Row]
1952 [ASSERT Mysqlx.Resultset.Row]
1953 [ASSERT Mysqlx.Resultset.Row]
1954 [ASSERT Mysqlx.Resultset.FetchDoneMoreResultsets]
1955 [ASSERT Mysqlx.Resultset.FetchDone]
1956 [ASSERT notice session state change - ROWS_AFFECTED, v_unsigned_int:0]
1957 [ASSERT Mysqlx.Sql.StmtExecuteOk]
1958
1959 #
1960 # III.2
1961 [PREPARE - CALL two_resultsets()]
1962 RUN recvok
1963 [EXECUTE]
1964 [ASSERT Mysqlx.Resultset.ColumnMetaData]
1965 [ASSERT Mysqlx.Resultset.Row]
1966 [ASSERT Mysqlx.Resultset.Row]
1967 [ASSERT Mysqlx.Resultset.Row]
1968 [ASSERT Mysqlx.Resultset.FetchDoneMoreResultsets]
1969 [ASSERT Mysqlx.Resultset.ColumnMetaData]
1970 [ASSERT Mysqlx.Resultset.Row]
1971 [ASSERT Mysqlx.Resultset.Row]
1972 [ASSERT Mysqlx.Resultset.FetchDoneMoreResultsets]
1973 [ASSERT Mysqlx.Resultset.FetchDone]
1974 [ASSERT notice session state change - ROWS_AFFECTED, v_unsigned_int:0]
1975 [ASSERT Mysqlx.Sql.StmtExecuteOk]
1976
1977 #
1978 # III.3
1979 [PREPARE - CALL two_resultsets_with_errors]
1980 RUN recvok
1981 [EXECUTE]
1982 [ASSERT Mysqlx.Resultset.ColumnMetaData]
1983 [ASSERT Mysqlx.Resultset.Row]
1984 [ASSERT Mysqlx.Resultset.Row]
1985 [ASSERT Mysqlx.Resultset.Row]
1986 [ASSERT Mysqlx.Resultset.Row]
1987 [ASSERT Mysqlx.Resultset.Row]
1988 [ASSERT Mysqlx.Resultset.FetchDoneMoreResultsets]
1989 [ASSERT Mysqlx.Resultset.ColumnMetaData]
1990 [ASSERT Mysqlx.Resultset.Row]
1991 [ASSERT Mysqlx.Resultset.Row]
1992 [ASSERT Mysqlx.Resultset.Row]
1993 [ASSERT Mysqlx.Resultset.Row]
1994 [ASSERT Mysqlx.Resultset.Row]
1995 [ASSERT Mysqlx.Resultset.FetchDoneMoreResultsets]
1996 [ASSERT Mysqlx.Resultset.FetchDone]
1997 [ASSERT notice warning - WARNING, 1365]
1998 [ASSERT notice warning - WARNING, 1365]
1999 [ASSERT notice session state change - ROWS_AFFECTED, v_unsigned_int:0]
2000 [ASSERT Mysqlx.Sql.StmtExecuteOk]
2001
2002 #
2003 # IV.1.a
2004 [PREPARE - INSERT INTO xtest.xtable_with_pk(description) VALUE('MyCustomRow')]
2005 RUN recvok
2006 [EXECUTE]
2007 [ASSERT notice session state change - ROWS_AFFECTED, v_unsigned_int:1]
2008 [ASSERT notice session state change - GENERATED_INSERT_ID, v_unsigned_int: 2]
2009 [ASSERT Mysqlx.Sql.StmtExecuteOk]
2010
2011 #
2012 # IV.1.b
2013 [PREPARE - INSERT INTO xtest.xtable(phrase, prio) VALUE('MyCustomRow', 100)]
2014 RUN recvok
2015 [EXECUTE]
2016 [ASSERT notice session state change - ROWS_AFFECTED, v_unsigned_int:1]
2017 [ASSERT Mysqlx.Sql.StmtExecuteOk]
2018
2019 #
2020 # IV.2
2021 [PREPARE - DELETE FROM xtest.xtable WHERE prio=100]
2022 RUN recvok
2023 [EXECUTE]
2024 [ASSERT notice session state change - ROWS_AFFECTED, v_unsigned_int:1]
2025 [ASSERT Mysqlx.Sql.StmtExecuteOk]
2026
2027 #
2028 # IV.3
2029 [PREPARE - UPDATE xtest.xtable SET phrase='New']
2030 RUN recvok
2031 [EXECUTE]
2032 [ASSERT notice session state change - PRODUCED_MESSAGE, type: V_STRING]
2033 [ASSERT notice session state change - ROWS_AFFECTED, v_unsigned_int:5]
2034 [ASSERT Mysqlx.Sql.StmtExecuteOk]
2035 Mysqlx.Ok {
2036 msg: "bye!"
2037 }
2038 ok
2039 ## H. Execute the test using zstd/multiple
2040 #
2041 CALL recreate_tables();
2042
2043
2044 ## I. Validate non dynamic SQL statement where Cursor.Fetch is not needed
2045 #
2046 # 1. Assert empty resultset, dont get any rows at Cursor.Open.
2047 # 2. Assert resultset that has less rows than requested by Cursor.Open.
2048
2049 ## II. Validate non dynamic SQL statement where Cursor.Fetch is needed to get all data
2050 #
2051 # 1. Assert empty resultset, still try to get at last one row at open
2052 # 2. Assert resultset that has same amount of rows as requested
2053 # 3. Assert resultset that has rows grater by one than requested
2054 # 4. Assert resultset that has two times the amount of rows as requested
2055 # 5. Assert resultset by fetching the resultset one by one row
2056 # 6. Assert resultset by fetching the resultset and warnings generated by it
2057
2058 ## III. Validate dynamic SQL statement
2059 #
2060 # 1. Assert that cursor open, fetches whole resultset
2061 # a. fetch_rows in Cursor.Open is not set
2062 # b. fetch_rows in Cursor.Open is set (value doesn't matter).
2063 # 2. Assert that cursor open, fetches multiple resultsets
2064 # 3. Assert that cursor open, fetches multiple resultsets with warnings
2065
2066 ## IV. Validate notices
2067 #
2068 # 1. Insert stmt
2069 # a. Table with primary key (expect notice GENERATED_INSERT_ID)
2070 # b. Table without primary key (must not be generate GENERATED_INSERT_ID)
2071 # 2. Delete stmt
2072 # 3. Update stmt
2073
2074
2075 #
2076 # I.1
2077 [PREPARE - SELECT * FROM xtable LIMIT 0]
2078 RUN recvok
2079 [EXECUTE]
2080 [ASSERT Mysqlx.Resultset.ColumnMetaData]
2081 [ASSERT Mysqlx.Resultset.ColumnMetaData]
2082 [ASSERT Mysqlx.Resultset.FetchDone]
2083 [ASSERT notice session state change - ROWS_AFFECTED, v_unsigned_int:0]
2084 [ASSERT Mysqlx.Sql.StmtExecuteOk]
2085
2086 #
2087 # I.2
2088 [PREPARE - SELECT * FROM xtable]
2089 RUN recvok
2090 [EXECUTE]
2091 [ASSERT Mysqlx.Resultset.ColumnMetaData]
2092 [ASSERT Mysqlx.Resultset.ColumnMetaData]
2093 [ASSERT Mysqlx.Resultset.Row]
2094 [ASSERT Mysqlx.Resultset.Row]
2095 [ASSERT Mysqlx.Resultset.Row]
2096 [ASSERT Mysqlx.Resultset.Row]
2097 [ASSERT Mysqlx.Resultset.Row]
2098 [ASSERT Mysqlx.Resultset.FetchDone]
2099 [ASSERT notice session state change - ROWS_AFFECTED, v_unsigned_int:0]
2100 [ASSERT Mysqlx.Sql.StmtExecuteOk]
2101
2102 #
2103 # II.1
2104 [PREPARE - SELECT * FROM xtable LIMIT 0]
2105 RUN recvok
2106 [EXECUTE]
2107 [ASSERT Mysqlx.Resultset.ColumnMetaData]
2108 [ASSERT Mysqlx.Resultset.ColumnMetaData]
2109 [ASSERT Mysqlx.Resultset.FetchSuspended]
2110 [ASSERT Mysqlx.Sql.StmtExecuteOk]
2111 [FETCH]
2112 [ASSERT Mysqlx.Resultset.FetchDone]
2113 [ASSERT notice session state change - ROWS_AFFECTED, v_unsigned_int:0]
2114 [ASSERT Mysqlx.Sql.StmtExecuteOk]
2115
2116 #
2117 # II.2
2118 [PREPARE - SELECT * FROM xtable LIMIT 5]
2119 RUN recvok
2120 [EXECUTE]
2121 [ASSERT Mysqlx.Resultset.ColumnMetaData]
2122 [ASSERT Mysqlx.Resultset.ColumnMetaData]
2123 [ASSERT Mysqlx.Resultset.Row]
2124 [ASSERT Mysqlx.Resultset.Row]
2125 [ASSERT Mysqlx.Resultset.Row]
2126 [ASSERT Mysqlx.Resultset.Row]
2127 [ASSERT Mysqlx.Resultset.Row]
2128 [ASSERT Mysqlx.Resultset.FetchSuspended]
2129 [ASSERT Mysqlx.Sql.StmtExecuteOk]
2130 [FETCH]
2131 [ASSERT Mysqlx.Resultset.FetchDone]
2132 [ASSERT notice session state change - ROWS_AFFECTED, v_unsigned_int:0]
2133 [ASSERT Mysqlx.Sql.StmtExecuteOk]
2134
2135 #
2136 # II.3
2137 [PREPARE - SELECT * FROM xtable LIMIT 5]
2138 RUN recvok
2139 [EXECUTE]
2140 [ASSERT Mysqlx.Resultset.ColumnMetaData]
2141 [ASSERT Mysqlx.Resultset.ColumnMetaData]
2142 [ASSERT Mysqlx.Resultset.Row]
2143 [ASSERT Mysqlx.Resultset.Row]
2144 [ASSERT Mysqlx.Resultset.Row]
2145 [ASSERT Mysqlx.Resultset.Row]
2146 [ASSERT Mysqlx.Resultset.FetchSuspended]
2147 [ASSERT Mysqlx.Sql.StmtExecuteOk]
2148 [FETCH]
2149 [ASSERT Mysqlx.Resultset.Row]
2150 [ASSERT Mysqlx.Resultset.FetchDone]
2151 [ASSERT notice session state change - ROWS_AFFECTED, v_unsigned_int:0]
2152 [ASSERT Mysqlx.Sql.StmtExecuteOk]
2153
2154 #
2155 # II.4
2156 [PREPARE - SELECT * FROM xtable LIMIT 4]
2157 RUN recvok
2158 [EXECUTE]
2159 [ASSERT Mysqlx.Resultset.ColumnMetaData]
2160 [ASSERT Mysqlx.Resultset.ColumnMetaData]
2161 [ASSERT Mysqlx.Resultset.Row]
2162 [ASSERT Mysqlx.Resultset.Row]
2163 [ASSERT Mysqlx.Resultset.FetchSuspended]
2164 [ASSERT Mysqlx.Sql.StmtExecuteOk]
2165 [FETCH]
2166 [ASSERT Mysqlx.Resultset.Row]
2167 [ASSERT Mysqlx.Resultset.Row]
2168 [ASSERT Mysqlx.Resultset.FetchDone]
2169 [ASSERT notice session state change - ROWS_AFFECTED, v_unsigned_int:0]
2170 [ASSERT Mysqlx.Sql.StmtExecuteOk]
2171
2172 #
2173 # II.5
2174 [PREPARE - SELECT * FROM xtable LIMIT 3]
2175 RUN recvok
2176 [EXECUTE]
2177 [ASSERT Mysqlx.Resultset.ColumnMetaData]
2178 [ASSERT Mysqlx.Resultset.ColumnMetaData]
2179 [ASSERT Mysqlx.Resultset.Row]
2180 [ASSERT Mysqlx.Resultset.FetchSuspended]
2181 [ASSERT Mysqlx.Sql.StmtExecuteOk]
2182 [FETCH]
2183 [ASSERT Mysqlx.Resultset.Row]
2184 [ASSERT Mysqlx.Resultset.FetchSuspended]
2185 [ASSERT Mysqlx.Sql.StmtExecuteOk]
2186 [FETCH]
2187 [ASSERT Mysqlx.Resultset.Row]
2188 [ASSERT Mysqlx.Resultset.FetchSuspended]
2189 [ASSERT Mysqlx.Sql.StmtExecuteOk]
2190 [FETCH]
2191 [ASSERT Mysqlx.Resultset.FetchDone]
2192 [ASSERT notice session state change - ROWS_AFFECTED, v_unsigned_int:0]
2193 [ASSERT Mysqlx.Sql.StmtExecuteOk]
2194
2195 #
2196 # II.6
2197 [PREPARE - SELECT 1/prio as col1 FROM xtable]
2198 RUN recvok
2199 [EXECUTE]
2200 [ASSERT Mysqlx.Resultset.ColumnMetaData]
2201 [ASSERT Mysqlx.Resultset.FetchSuspended]
2202 [ASSERT notice warning - WARNING, 1365]
2203 [ASSERT notice warning - WARNING, 1365]
2204 [ASSERT Mysqlx.Sql.StmtExecuteOk]
2205 [FETCH]
2206 [ASSERT Mysqlx.Resultset.Row]
2207 [ASSERT Mysqlx.Resultset.Row]
2208 [ASSERT Mysqlx.Resultset.FetchSuspended]
2209 [ASSERT Mysqlx.Sql.StmtExecuteOk]
2210 [FETCH]
2211 [ASSERT Mysqlx.Resultset.Row]
2212 [ASSERT Mysqlx.Resultset.Row]
2213 [ASSERT Mysqlx.Resultset.Row]
2214 [ASSERT Mysqlx.Resultset.FetchDone]
2215 [ASSERT notice session state change - ROWS_AFFECTED, v_unsigned_int:0]
2216 [ASSERT Mysqlx.Sql.StmtExecuteOk]
2217
2218 #
2219 # III.1.a
2220 [PREPARE - CALL one_resultsets()]
2221 RUN recvok
2222 [EXECUTE]
2223 [ASSERT Mysqlx.Resultset.ColumnMetaData]
2224 [ASSERT Mysqlx.Resultset.Row]
2225 [ASSERT Mysqlx.Resultset.Row]
2226 [ASSERT Mysqlx.Resultset.Row]
2227 [ASSERT Mysqlx.Resultset.FetchDoneMoreResultsets]
2228 [ASSERT Mysqlx.Resultset.FetchDone]
2229 [ASSERT notice session state change - ROWS_AFFECTED, v_unsigned_int:0]
2230 [ASSERT Mysqlx.Sql.StmtExecuteOk]
2231
2232 #
2233 # III.1.b
2234 [PREPARE - CALL one_resultsets()]
2235 RUN recvok
2236 [EXECUTE]
2237 [ASSERT Mysqlx.Resultset.ColumnMetaData]
2238 [ASSERT Mysqlx.Resultset.Row]
2239 [ASSERT Mysqlx.Resultset.Row]
2240 [ASSERT Mysqlx.Resultset.Row]
2241 [ASSERT Mysqlx.Resultset.FetchDoneMoreResultsets]
2242 [ASSERT Mysqlx.Resultset.FetchDone]
2243 [ASSERT notice session state change - ROWS_AFFECTED, v_unsigned_int:0]
2244 [ASSERT Mysqlx.Sql.StmtExecuteOk]
2245
2246 #
2247 # III.2
2248 [PREPARE - CALL two_resultsets()]
2249 RUN recvok
2250 [EXECUTE]
2251 [ASSERT Mysqlx.Resultset.ColumnMetaData]
2252 [ASSERT Mysqlx.Resultset.Row]
2253 [ASSERT Mysqlx.Resultset.Row]
2254 [ASSERT Mysqlx.Resultset.Row]
2255 [ASSERT Mysqlx.Resultset.FetchDoneMoreResultsets]
2256 [ASSERT Mysqlx.Resultset.ColumnMetaData]
2257 [ASSERT Mysqlx.Resultset.Row]
2258 [ASSERT Mysqlx.Resultset.Row]
2259 [ASSERT Mysqlx.Resultset.FetchDoneMoreResultsets]
2260 [ASSERT Mysqlx.Resultset.FetchDone]
2261 [ASSERT notice session state change - ROWS_AFFECTED, v_unsigned_int:0]
2262 [ASSERT Mysqlx.Sql.StmtExecuteOk]
2263
2264 #
2265 # III.3
2266 [PREPARE - CALL two_resultsets_with_errors]
2267 RUN recvok
2268 [EXECUTE]
2269 [ASSERT Mysqlx.Resultset.ColumnMetaData]
2270 [ASSERT Mysqlx.Resultset.Row]
2271 [ASSERT Mysqlx.Resultset.Row]
2272 [ASSERT Mysqlx.Resultset.Row]
2273 [ASSERT Mysqlx.Resultset.Row]
2274 [ASSERT Mysqlx.Resultset.Row]
2275 [ASSERT Mysqlx.Resultset.FetchDoneMoreResultsets]
2276 [ASSERT Mysqlx.Resultset.ColumnMetaData]
2277 [ASSERT Mysqlx.Resultset.Row]
2278 [ASSERT Mysqlx.Resultset.Row]
2279 [ASSERT Mysqlx.Resultset.Row]
2280 [ASSERT Mysqlx.Resultset.Row]
2281 [ASSERT Mysqlx.Resultset.Row]
2282 [ASSERT Mysqlx.Resultset.FetchDoneMoreResultsets]
2283 [ASSERT Mysqlx.Resultset.FetchDone]
2284 [ASSERT notice warning - WARNING, 1365]
2285 [ASSERT notice warning - WARNING, 1365]
2286 [ASSERT notice session state change - ROWS_AFFECTED, v_unsigned_int:0]
2287 [ASSERT Mysqlx.Sql.StmtExecuteOk]
2288
2289 #
2290 # IV.1.a
2291 [PREPARE - INSERT INTO xtest.xtable_with_pk(description) VALUE('MyCustomRow')]
2292 RUN recvok
2293 [EXECUTE]
2294 [ASSERT notice session state change - ROWS_AFFECTED, v_unsigned_int:1]
2295 [ASSERT notice session state change - GENERATED_INSERT_ID, v_unsigned_int: 2]
2296 [ASSERT Mysqlx.Sql.StmtExecuteOk]
2297
2298 #
2299 # IV.1.b
2300 [PREPARE - INSERT INTO xtest.xtable(phrase, prio) VALUE('MyCustomRow', 100)]
2301 RUN recvok
2302 [EXECUTE]
2303 [ASSERT notice session state change - ROWS_AFFECTED, v_unsigned_int:1]
2304 [ASSERT Mysqlx.Sql.StmtExecuteOk]
2305
2306 #
2307 # IV.2
2308 [PREPARE - DELETE FROM xtest.xtable WHERE prio=100]
2309 RUN recvok
2310 [EXECUTE]
2311 [ASSERT notice session state change - ROWS_AFFECTED, v_unsigned_int:1]
2312 [ASSERT Mysqlx.Sql.StmtExecuteOk]
2313
2314 #
2315 # IV.3
2316 [PREPARE - UPDATE xtest.xtable SET phrase='New']
2317 RUN recvok
2318 [EXECUTE]
2319 [ASSERT notice session state change - PRODUCED_MESSAGE, type: V_STRING]
2320 [ASSERT notice session state change - ROWS_AFFECTED, v_unsigned_int:5]
2321 [ASSERT Mysqlx.Sql.StmtExecuteOk]
2322 Mysqlx.Ok {
2323 msg: "bye!"
2324 }
2325 ok
2326 ## I. Execute the test using zstd/single
2327 #
2328 CALL recreate_tables();
2329
2330
2331 ## I. Validate non dynamic SQL statement where Cursor.Fetch is not needed
2332 #
2333 # 1. Assert empty resultset, dont get any rows at Cursor.Open.
2334 # 2. Assert resultset that has less rows than requested by Cursor.Open.
2335
2336 ## II. Validate non dynamic SQL statement where Cursor.Fetch is needed to get all data
2337 #
2338 # 1. Assert empty resultset, still try to get at last one row at open
2339 # 2. Assert resultset that has same amount of rows as requested
2340 # 3. Assert resultset that has rows grater by one than requested
2341 # 4. Assert resultset that has two times the amount of rows as requested
2342 # 5. Assert resultset by fetching the resultset one by one row
2343 # 6. Assert resultset by fetching the resultset and warnings generated by it
2344
2345 ## III. Validate dynamic SQL statement
2346 #
2347 # 1. Assert that cursor open, fetches whole resultset
2348 # a. fetch_rows in Cursor.Open is not set
2349 # b. fetch_rows in Cursor.Open is set (value doesn't matter).
2350 # 2. Assert that cursor open, fetches multiple resultsets
2351 # 3. Assert that cursor open, fetches multiple resultsets with warnings
2352
2353 ## IV. Validate notices
2354 #
2355 # 1. Insert stmt
2356 # a. Table with primary key (expect notice GENERATED_INSERT_ID)
2357 # b. Table without primary key (must not be generate GENERATED_INSERT_ID)
2358 # 2. Delete stmt
2359 # 3. Update stmt
2360
2361
2362 #
2363 # I.1
2364 [PREPARE - SELECT * FROM xtable LIMIT 0]
2365 RUN recvok
2366 [EXECUTE]
2367 [ASSERT Mysqlx.Resultset.ColumnMetaData]
2368 [ASSERT Mysqlx.Resultset.ColumnMetaData]
2369 [ASSERT Mysqlx.Resultset.FetchDone]
2370 [ASSERT notice session state change - ROWS_AFFECTED, v_unsigned_int:0]
2371 [ASSERT Mysqlx.Sql.StmtExecuteOk]
2372
2373 #
2374 # I.2
2375 [PREPARE - SELECT * FROM xtable]
2376 RUN recvok
2377 [EXECUTE]
2378 [ASSERT Mysqlx.Resultset.ColumnMetaData]
2379 [ASSERT Mysqlx.Resultset.ColumnMetaData]
2380 [ASSERT Mysqlx.Resultset.Row]
2381 [ASSERT Mysqlx.Resultset.Row]
2382 [ASSERT Mysqlx.Resultset.Row]
2383 [ASSERT Mysqlx.Resultset.Row]
2384 [ASSERT Mysqlx.Resultset.Row]
2385 [ASSERT Mysqlx.Resultset.FetchDone]
2386 [ASSERT notice session state change - ROWS_AFFECTED, v_unsigned_int:0]
2387 [ASSERT Mysqlx.Sql.StmtExecuteOk]
2388
2389 #
2390 # II.1
2391 [PREPARE - SELECT * FROM xtable LIMIT 0]
2392 RUN recvok
2393 [EXECUTE]
2394 [ASSERT Mysqlx.Resultset.ColumnMetaData]
2395 [ASSERT Mysqlx.Resultset.ColumnMetaData]
2396 [ASSERT Mysqlx.Resultset.FetchSuspended]
2397 [ASSERT Mysqlx.Sql.StmtExecuteOk]
2398 [FETCH]
2399 [ASSERT Mysqlx.Resultset.FetchDone]
2400 [ASSERT notice session state change - ROWS_AFFECTED, v_unsigned_int:0]
2401 [ASSERT Mysqlx.Sql.StmtExecuteOk]
2402
2403 #
2404 # II.2
2405 [PREPARE - SELECT * FROM xtable LIMIT 5]
2406 RUN recvok
2407 [EXECUTE]
2408 [ASSERT Mysqlx.Resultset.ColumnMetaData]
2409 [ASSERT Mysqlx.Resultset.ColumnMetaData]
2410 [ASSERT Mysqlx.Resultset.Row]
2411 [ASSERT Mysqlx.Resultset.Row]
2412 [ASSERT Mysqlx.Resultset.Row]
2413 [ASSERT Mysqlx.Resultset.Row]
2414 [ASSERT Mysqlx.Resultset.Row]
2415 [ASSERT Mysqlx.Resultset.FetchSuspended]
2416 [ASSERT Mysqlx.Sql.StmtExecuteOk]
2417 [FETCH]
2418 [ASSERT Mysqlx.Resultset.FetchDone]
2419 [ASSERT notice session state change - ROWS_AFFECTED, v_unsigned_int:0]
2420 [ASSERT Mysqlx.Sql.StmtExecuteOk]
2421
2422 #
2423 # II.3
2424 [PREPARE - SELECT * FROM xtable LIMIT 5]
2425 RUN recvok
2426 [EXECUTE]
2427 [ASSERT Mysqlx.Resultset.ColumnMetaData]
2428 [ASSERT Mysqlx.Resultset.ColumnMetaData]
2429 [ASSERT Mysqlx.Resultset.Row]
2430 [ASSERT Mysqlx.Resultset.Row]
2431 [ASSERT Mysqlx.Resultset.Row]
2432 [ASSERT Mysqlx.Resultset.Row]
2433 [ASSERT Mysqlx.Resultset.FetchSuspended]
2434 [ASSERT Mysqlx.Sql.StmtExecuteOk]
2435 [FETCH]
2436 [ASSERT Mysqlx.Resultset.Row]
2437 [ASSERT Mysqlx.Resultset.FetchDone]
2438 [ASSERT notice session state change - ROWS_AFFECTED, v_unsigned_int:0]
2439 [ASSERT Mysqlx.Sql.StmtExecuteOk]
2440
2441 #
2442 # II.4
2443 [PREPARE - SELECT * FROM xtable LIMIT 4]
2444 RUN recvok
2445 [EXECUTE]
2446 [ASSERT Mysqlx.Resultset.ColumnMetaData]
2447 [ASSERT Mysqlx.Resultset.ColumnMetaData]
2448 [ASSERT Mysqlx.Resultset.Row]
2449 [ASSERT Mysqlx.Resultset.Row]
2450 [ASSERT Mysqlx.Resultset.FetchSuspended]
2451 [ASSERT Mysqlx.Sql.StmtExecuteOk]
2452 [FETCH]
2453 [ASSERT Mysqlx.Resultset.Row]
2454 [ASSERT Mysqlx.Resultset.Row]
2455 [ASSERT Mysqlx.Resultset.FetchDone]
2456 [ASSERT notice session state change - ROWS_AFFECTED, v_unsigned_int:0]
2457 [ASSERT Mysqlx.Sql.StmtExecuteOk]
2458
2459 #
2460 # II.5
2461 [PREPARE - SELECT * FROM xtable LIMIT 3]
2462 RUN recvok
2463 [EXECUTE]
2464 [ASSERT Mysqlx.Resultset.ColumnMetaData]
2465 [ASSERT Mysqlx.Resultset.ColumnMetaData]
2466 [ASSERT Mysqlx.Resultset.Row]
2467 [ASSERT Mysqlx.Resultset.FetchSuspended]
2468 [ASSERT Mysqlx.Sql.StmtExecuteOk]
2469 [FETCH]
2470 [ASSERT Mysqlx.Resultset.Row]
2471 [ASSERT Mysqlx.Resultset.FetchSuspended]
2472 [ASSERT Mysqlx.Sql.StmtExecuteOk]
2473 [FETCH]
2474 [ASSERT Mysqlx.Resultset.Row]
2475 [ASSERT Mysqlx.Resultset.FetchSuspended]
2476 [ASSERT Mysqlx.Sql.StmtExecuteOk]
2477 [FETCH]
2478 [ASSERT Mysqlx.Resultset.FetchDone]
2479 [ASSERT notice session state change - ROWS_AFFECTED, v_unsigned_int:0]
2480 [ASSERT Mysqlx.Sql.StmtExecuteOk]
2481
2482 #
2483 # II.6
2484 [PREPARE - SELECT 1/prio as col1 FROM xtable]
2485 RUN recvok
2486 [EXECUTE]
2487 [ASSERT Mysqlx.Resultset.ColumnMetaData]
2488 [ASSERT Mysqlx.Resultset.FetchSuspended]
2489 [ASSERT notice warning - WARNING, 1365]
2490 [ASSERT notice warning - WARNING, 1365]
2491 [ASSERT Mysqlx.Sql.StmtExecuteOk]
2492 [FETCH]
2493 [ASSERT Mysqlx.Resultset.Row]
2494 [ASSERT Mysqlx.Resultset.Row]
2495 [ASSERT Mysqlx.Resultset.FetchSuspended]
2496 [ASSERT Mysqlx.Sql.StmtExecuteOk]
2497 [FETCH]
2498 [ASSERT Mysqlx.Resultset.Row]
2499 [ASSERT Mysqlx.Resultset.Row]
2500 [ASSERT Mysqlx.Resultset.Row]
2501 [ASSERT Mysqlx.Resultset.FetchDone]
2502 [ASSERT notice session state change - ROWS_AFFECTED, v_unsigned_int:0]
2503 [ASSERT Mysqlx.Sql.StmtExecuteOk]
2504
2505 #
2506 # III.1.a
2507 [PREPARE - CALL one_resultsets()]
2508 RUN recvok
2509 [EXECUTE]
2510 [ASSERT Mysqlx.Resultset.ColumnMetaData]
2511 [ASSERT Mysqlx.Resultset.Row]
2512 [ASSERT Mysqlx.Resultset.Row]
2513 [ASSERT Mysqlx.Resultset.Row]
2514 [ASSERT Mysqlx.Resultset.FetchDoneMoreResultsets]
2515 [ASSERT Mysqlx.Resultset.FetchDone]
2516 [ASSERT notice session state change - ROWS_AFFECTED, v_unsigned_int:0]
2517 [ASSERT Mysqlx.Sql.StmtExecuteOk]
2518
2519 #
2520 # III.1.b
2521 [PREPARE - CALL one_resultsets()]
2522 RUN recvok
2523 [EXECUTE]
2524 [ASSERT Mysqlx.Resultset.ColumnMetaData]
2525 [ASSERT Mysqlx.Resultset.Row]
2526 [ASSERT Mysqlx.Resultset.Row]
2527 [ASSERT Mysqlx.Resultset.Row]
2528 [ASSERT Mysqlx.Resultset.FetchDoneMoreResultsets]
2529 [ASSERT Mysqlx.Resultset.FetchDone]
2530 [ASSERT notice session state change - ROWS_AFFECTED, v_unsigned_int:0]
2531 [ASSERT Mysqlx.Sql.StmtExecuteOk]
2532
2533 #
2534 # III.2
2535 [PREPARE - CALL two_resultsets()]
2536 RUN recvok
2537 [EXECUTE]
2538 [ASSERT Mysqlx.Resultset.ColumnMetaData]
2539 [ASSERT Mysqlx.Resultset.Row]
2540 [ASSERT Mysqlx.Resultset.Row]
2541 [ASSERT Mysqlx.Resultset.Row]
2542 [ASSERT Mysqlx.Resultset.FetchDoneMoreResultsets]
2543 [ASSERT Mysqlx.Resultset.ColumnMetaData]
2544 [ASSERT Mysqlx.Resultset.Row]
2545 [ASSERT Mysqlx.Resultset.Row]
2546 [ASSERT Mysqlx.Resultset.FetchDoneMoreResultsets]
2547 [ASSERT Mysqlx.Resultset.FetchDone]
2548 [ASSERT notice session state change - ROWS_AFFECTED, v_unsigned_int:0]
2549 [ASSERT Mysqlx.Sql.StmtExecuteOk]
2550
2551 #
2552 # III.3
2553 [PREPARE - CALL two_resultsets_with_errors]
2554 RUN recvok
2555 [EXECUTE]
2556 [ASSERT Mysqlx.Resultset.ColumnMetaData]
2557 [ASSERT Mysqlx.Resultset.Row]
2558 [ASSERT Mysqlx.Resultset.Row]
2559 [ASSERT Mysqlx.Resultset.Row]
2560 [ASSERT Mysqlx.Resultset.Row]
2561 [ASSERT Mysqlx.Resultset.Row]
2562 [ASSERT Mysqlx.Resultset.FetchDoneMoreResultsets]
2563 [ASSERT Mysqlx.Resultset.ColumnMetaData]
2564 [ASSERT Mysqlx.Resultset.Row]
2565 [ASSERT Mysqlx.Resultset.Row]
2566 [ASSERT Mysqlx.Resultset.Row]
2567 [ASSERT Mysqlx.Resultset.Row]
2568 [ASSERT Mysqlx.Resultset.Row]
2569 [ASSERT Mysqlx.Resultset.FetchDoneMoreResultsets]
2570 [ASSERT Mysqlx.Resultset.FetchDone]
2571 [ASSERT notice warning - WARNING, 1365]
2572 [ASSERT notice warning - WARNING, 1365]
2573 [ASSERT notice session state change - ROWS_AFFECTED, v_unsigned_int:0]
2574 [ASSERT Mysqlx.Sql.StmtExecuteOk]
2575
2576 #
2577 # IV.1.a
2578 [PREPARE - INSERT INTO xtest.xtable_with_pk(description) VALUE('MyCustomRow')]
2579 RUN recvok
2580 [EXECUTE]
2581 [ASSERT notice session state change - ROWS_AFFECTED, v_unsigned_int:1]
2582 [ASSERT notice session state change - GENERATED_INSERT_ID, v_unsigned_int: 2]
2583 [ASSERT Mysqlx.Sql.StmtExecuteOk]
2584
2585 #
2586 # IV.1.b
2587 [PREPARE - INSERT INTO xtest.xtable(phrase, prio) VALUE('MyCustomRow', 100)]
2588 RUN recvok
2589 [EXECUTE]
2590 [ASSERT notice session state change - ROWS_AFFECTED, v_unsigned_int:1]
2591 [ASSERT Mysqlx.Sql.StmtExecuteOk]
2592
2593 #
2594 # IV.2
2595 [PREPARE - DELETE FROM xtest.xtable WHERE prio=100]
2596 RUN recvok
2597 [EXECUTE]
2598 [ASSERT notice session state change - ROWS_AFFECTED, v_unsigned_int:1]
2599 [ASSERT Mysqlx.Sql.StmtExecuteOk]
2600
2601 #
2602 # IV.3
2603 [PREPARE - UPDATE xtest.xtable SET phrase='New']
2604 RUN recvok
2605 [EXECUTE]
2606 [ASSERT notice session state change - PRODUCED_MESSAGE, type: V_STRING]
2607 [ASSERT notice session state change - ROWS_AFFECTED, v_unsigned_int:5]
2608 [ASSERT Mysqlx.Sql.StmtExecuteOk]
2609 Mysqlx.Ok {
2610 msg: "bye!"
2611 }
2612 ok