Debian Codegraph @

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

raw
1 #
2 ## Setup tests: tables and stored procedures
3
4 ## A. Execute the test using zlib compression
5 #
6
7
8 ## Test setup
9
10
11 ## I. Validate that X Plugin sends compressed messages in StmtExecute resultset (GRAPH 2)
12 #
13 # 1. Assert SELECTs empty resultset
14 # 2. Assert SELECTs resultset with one column and one row
15 # 3. Assert SELECTs resultset with one column and multiple rows
16 # 4. Assert SELECTs resultset with multiple columns and multiple rows
17 # 5. Assert SQL that returns multiple resultsets
18 #
19 ## II. Validate that X Plugin sends compressed messages in Crud.Insert resultset (GRAPH 2)
20 #
21 # 1. Assert Crud.Insert resultset for single row insert
22 # 2. Assert Crud.Insert resultset for multiple rows insert
23 #
24 ## III. Validate that X Plugin sends compressed messages in Crud.Find resultset (GRAPH 2)
25 #
26 # 1. Assert Crud.Find empty resultset
27 # 2. Assert Crud.Find resultset with multiple rows
28 #
29 ## IV. Validate that X Plugin sends compressed messages in Crud.Update resultset (GRAPH 2)
30 #
31 # 1. Assert Crud.Update resultset with no hits
32 # 2. Assert Crud.Update resultset with multiple updated rows
33 #
34 ## V. Validate that X Plugin sends compressed messages in Crud.Delete resultset (GRAPH 2)
35 #
36 # 1. Assert Crud.Delete resultset with no hits
37 # 2. Assert Crud.Delete resultset with multiple deleted rows
38 #
39 ## VI. Validate that X Plugin sends compressed messages in PrepStmt resultset (GRAPH 2)
40 #
41 # 1. Assert PrepStmt resultset with out-params
42 # 2. Assert Cursor resultset that was suspended
43
44 # Create table "xtbl" and fill it with data
45 # Create collection "coll" and fill it with data
46
47 #
48 # I.1
49 RUN SELECT phrase FROM xtbl WHERE prio < 0
50 [ASSERT COMPRESSION]
51 [ASSERT COMPRESSION]
52 [ASSERT COMPRESSION]
53 [ASSERT Mysqlx.Sql.StmtExecuteOk]
54
55 #
56 # I.2
57 RUN SELECT phrase FROM xtbl LIMIT 1
58 [ASSERT COMPRESSION]
59 [ASSERT COMPRESSION]
60 [ASSERT COMPRESSION]
61 [ASSERT COMPRESSION]
62 [ASSERT Mysqlx.Sql.StmtExecuteOk]
63
64 #
65 # I.3
66 RUN SELECT phrase FROM xtbl LIMIT 4
67 [ASSERT COMPRESSION]
68 [ASSERT COMPRESSION]
69 [ASSERT COMPRESSION]
70 [ASSERT COMPRESSION]
71 [ASSERT COMPRESSION]
72 [ASSERT COMPRESSION]
73 [ASSERT COMPRESSION]
74 [ASSERT Mysqlx.Sql.StmtExecuteOk]
75
76 #
77 # I.4
78 RUN SELECT phrase, prio FROM xtbl LIMIT 4
79 [ASSERT COMPRESSION]
80 [ASSERT COMPRESSION]
81 [ASSERT COMPRESSION]
82 [ASSERT COMPRESSION]
83 [ASSERT COMPRESSION]
84 [ASSERT COMPRESSION]
85 [ASSERT COMPRESSION]
86 [ASSERT COMPRESSION]
87 [ASSERT Mysqlx.Sql.StmtExecuteOk]
88
89 #
90 # I.5
91 RUN CALL two_resultsets()
92 [ASSERT COMPRESSION]
93 [ASSERT COMPRESSION]
94 [ASSERT COMPRESSION]
95 [ASSERT COMPRESSION]
96 [ASSERT COMPRESSION]
97 [ASSERT COMPRESSION]
98 [ASSERT COMPRESSION]
99 [ASSERT COMPRESSION]
100 [ASSERT Mysqlx.Sql.StmtExecuteOk]
101
102 #
103 # II.1
104 send Mysqlx.Crud.Insert {
105 collection {
106 name: "coll"
107 schema: "xtest"
108 }
109 data_model: DOCUMENT
110 row {
111 field {
112 type: LITERAL
113 literal {
114 type: V_STRING
115 v_string {
116 value: "{\"some_field\":\"ok\"}"
117 }
118 }
119 }
120 }
121 }
122
123 [ASSERT COMPRESSION]
124 [ASSERT COMPRESSION]
125 [ASSERT Mysqlx.Sql.StmtExecuteOk]
126
127 #
128 # II.2
129 send Mysqlx.Crud.Insert {
130 collection {
131 name: "coll"
132 schema: "xtest"
133 }
134 data_model: DOCUMENT
135 row {
136 field {
137 type: LITERAL
138 literal {
139 type: V_STRING
140 v_string {
141 value: "{\"ints\":1}"
142 }
143 }
144 }
145 }
146 row {
147 field {
148 type: LITERAL
149 literal {
150 type: V_STRING
151 v_string {
152 value: "{\"ints\":2}"
153 }
154 }
155 }
156 }
157 row {
158 field {
159 type: LITERAL
160 literal {
161 type: V_STRING
162 v_string {
163 value: "{\"ints\":3}"
164 }
165 }
166 }
167 }
168 row {
169 field {
170 type: LITERAL
171 literal {
172 type: V_STRING
173 v_string {
174 value: "{\"ints\":4}"
175 }
176 }
177 }
178 }
179 }
180
181 [ASSERT COMPRESSION]
182 [ASSERT COMPRESSION]
183 [ASSERT COMPRESSION]
184 [ASSERT Mysqlx.Sql.StmtExecuteOk]
185
186 #
187 # III.1
188 send Mysqlx.Crud.Find {
189 collection {
190 name: "coll"
191 schema: "xtest"
192 }
193 data_model: DOCUMENT
194 criteria {
195 type: OPERATOR
196 operator {
197 name: "=="
198 param {
199 type: IDENT
200 identifier {
201 document_path {
202 type: MEMBER
203 value: "not_existing_member"
204 }
205 }
206 }
207 param {
208 type: LITERAL
209 literal {
210 type: V_OCTETS
211 v_octets {
212 value: "non-existing-value"
213 }
214 }
215 }
216 }
217 }
218 }
219
220 [ASSERT COMPRESSION]
221 [ASSERT COMPRESSION]
222 [ASSERT Mysqlx.Sql.StmtExecuteOk]
223
224 #
225 # III.2
226 send Mysqlx.Crud.Find {
227 collection {
228 name: "coll"
229 schema: "xtest"
230 }
231 data_model: DOCUMENT
232 limit {
233 row_count: 4
234 }
235 }
236
237 [ASSERT COMPRESSION]
238 [ASSERT COMPRESSION]
239 [ASSERT COMPRESSION]
240 [ASSERT COMPRESSION]
241 [ASSERT COMPRESSION]
242 [ASSERT COMPRESSION]
243 [ASSERT Mysqlx.Sql.StmtExecuteOk]
244
245 #
246 # IV.1
247 send Mysqlx.Crud.Update {
248 collection {
249 name: "coll"
250 schema: "xtest"
251 }
252 data_model: DOCUMENT
253 criteria {
254 type: OPERATOR
255 operator {
256 name: "=="
257 param {
258 type: IDENT
259 identifier {
260 document_path {
261 type: MEMBER
262 value: "not_existing_member"
263 }
264 }
265 }
266 param {
267 type: LITERAL
268 literal {
269 type: V_OCTETS
270 v_octets {
271 value: "non-existing-value"
272 }
273 }
274 }
275 }
276 }
277 operation {
278 source {
279 document_path {
280 type: MEMBER
281 value: "foo"
282 }
283 }
284 operation: ITEM_SET
285 value {
286 type: LITERAL
287 literal {
288 type: V_NULL
289 }
290 }
291 }
292 }
293
294 [ASSERT COMPRESSION]
295 [ASSERT COMPRESSION]
296 [ASSERT Mysqlx.Sql.StmtExecuteOk]
297
298 #
299 # IV.2
300 send Mysqlx.Crud.Update {
301 collection {
302 name: "coll"
303 schema: "xtest"
304 }
305 data_model: DOCUMENT
306 operation {
307 source {
308 document_path {
309 type: MEMBER
310 value: "foo2"
311 }
312 }
313 operation: ITEM_SET
314 value {
315 type: LITERAL
316 literal {
317 type: V_NULL
318 }
319 }
320 }
321 }
322
323 [ASSERT COMPRESSION]
324 [ASSERT COMPRESSION]
325 [ASSERT Mysqlx.Sql.StmtExecuteOk]
326
327 #
328 # V.1
329 send Mysqlx.Crud.Delete {
330 collection {
331 name: "coll"
332 schema: "xtest"
333 }
334 data_model: DOCUMENT
335 criteria {
336 type: OPERATOR
337 operator {
338 name: "=="
339 param {
340 type: IDENT
341 identifier {
342 document_path {
343 type: MEMBER
344 value: "not_existing_member"
345 }
346 }
347 }
348 param {
349 type: LITERAL
350 literal {
351 type: V_OCTETS
352 v_octets {
353 value: "non-existing-value"
354 }
355 }
356 }
357 }
358 }
359 }
360
361 [ASSERT COMPRESSION]
362 [ASSERT Mysqlx.Sql.StmtExecuteOk]
363
364 #
365 # V.2
366 send Mysqlx.Crud.Delete {
367 collection {
368 name: "coll"
369 schema: "xtest"
370 }
371 data_model: DOCUMENT
372 criteria {
373 type: OPERATOR
374 operator {
375 name: "=="
376 param {
377 type: IDENT
378 identifier {
379 document_path {
380 type: MEMBER
381 value: "prio"
382 }
383 }
384 }
385 param {
386 type: LITERAL
387 literal {
388 type: V_SINT
389 v_signed_int: 1
390 }
391 }
392 }
393 }
394 }
395
396 [ASSERT COMPRESSION]
397 [ASSERT Mysqlx.Sql.StmtExecuteOk]
398
399 #
400 # VI.1
401 send Mysqlx.Prepare.Prepare {
402 stmt_id: 1
403 stmt {
404 type: STMT
405 stmt_execute {
406 stmt: "call out_param_no_select(10, ?)"
407 }
408 }
409 }
410
411 RUN recvok
412 send Mysqlx.Prepare.Execute {
413 stmt_id: 1
414 args {
415 type: SCALAR
416 scalar {
417 type: V_STRING
418 v_string {
419 value: "@my_var"
420 }
421 }
422 }
423 }
424
425 [ASSERT COMPRESSION]
426 [ASSERT COMPRESSION]
427 [ASSERT COMPRESSION]
428 [ASSERT COMPRESSION]
429 [ASSERT COMPRESSION]
430 [ASSERT Mysqlx.Sql.StmtExecuteOk]
431
432 #
433 # VI.2
434 send Mysqlx.Prepare.Prepare {
435 stmt_id: 2
436 stmt {
437 type: STMT
438 stmt_execute {
439 stmt: "SELECT phrase FROM xtbl"
440 }
441 }
442 }
443
444 RUN recvok
445 send Mysqlx.Cursor.Open {
446 cursor_id: 2
447 stmt {
448 type: PREPARE_EXECUTE
449 prepare_execute {
450 stmt_id: 2
451 }
452 }
453 fetch_rows: 1
454 }
455
456 [ASSERT COMPRESSION]
457 [ASSERT COMPRESSION]
458 [ASSERT COMPRESSION]
459 [ASSERT Mysqlx.Sql.StmtExecuteOk]
460 Mysqlx.Ok {
461 msg: "bye!"
462 }
463 ok
464
465 ## B. Execute the test using lz4 compression
466 #
467
468
469 ## Test setup
470
471
472 ## I. Validate that X Plugin sends compressed messages in StmtExecute resultset (GRAPH 2)
473 #
474 # 1. Assert SELECTs empty resultset
475 # 2. Assert SELECTs resultset with one column and one row
476 # 3. Assert SELECTs resultset with one column and multiple rows
477 # 4. Assert SELECTs resultset with multiple columns and multiple rows
478 # 5. Assert SQL that returns multiple resultsets
479 #
480 ## II. Validate that X Plugin sends compressed messages in Crud.Insert resultset (GRAPH 2)
481 #
482 # 1. Assert Crud.Insert resultset for single row insert
483 # 2. Assert Crud.Insert resultset for multiple rows insert
484 #
485 ## III. Validate that X Plugin sends compressed messages in Crud.Find resultset (GRAPH 2)
486 #
487 # 1. Assert Crud.Find empty resultset
488 # 2. Assert Crud.Find resultset with multiple rows
489 #
490 ## IV. Validate that X Plugin sends compressed messages in Crud.Update resultset (GRAPH 2)
491 #
492 # 1. Assert Crud.Update resultset with no hits
493 # 2. Assert Crud.Update resultset with multiple updated rows
494 #
495 ## V. Validate that X Plugin sends compressed messages in Crud.Delete resultset (GRAPH 2)
496 #
497 # 1. Assert Crud.Delete resultset with no hits
498 # 2. Assert Crud.Delete resultset with multiple deleted rows
499 #
500 ## VI. Validate that X Plugin sends compressed messages in PrepStmt resultset (GRAPH 2)
501 #
502 # 1. Assert PrepStmt resultset with out-params
503 # 2. Assert Cursor resultset that was suspended
504
505 # Create table "xtbl" and fill it with data
506 # Create collection "coll" and fill it with data
507
508 #
509 # I.1
510 RUN SELECT phrase FROM xtbl WHERE prio < 0
511 [ASSERT COMPRESSION]
512 [ASSERT COMPRESSION]
513 [ASSERT COMPRESSION]
514 [ASSERT Mysqlx.Sql.StmtExecuteOk]
515
516 #
517 # I.2
518 RUN SELECT phrase FROM xtbl LIMIT 1
519 [ASSERT COMPRESSION]
520 [ASSERT COMPRESSION]
521 [ASSERT COMPRESSION]
522 [ASSERT COMPRESSION]
523 [ASSERT Mysqlx.Sql.StmtExecuteOk]
524
525 #
526 # I.3
527 RUN SELECT phrase FROM xtbl LIMIT 4
528 [ASSERT COMPRESSION]
529 [ASSERT COMPRESSION]
530 [ASSERT COMPRESSION]
531 [ASSERT COMPRESSION]
532 [ASSERT COMPRESSION]
533 [ASSERT COMPRESSION]
534 [ASSERT COMPRESSION]
535 [ASSERT Mysqlx.Sql.StmtExecuteOk]
536
537 #
538 # I.4
539 RUN SELECT phrase, prio FROM xtbl LIMIT 4
540 [ASSERT COMPRESSION]
541 [ASSERT COMPRESSION]
542 [ASSERT COMPRESSION]
543 [ASSERT COMPRESSION]
544 [ASSERT COMPRESSION]
545 [ASSERT COMPRESSION]
546 [ASSERT COMPRESSION]
547 [ASSERT COMPRESSION]
548 [ASSERT Mysqlx.Sql.StmtExecuteOk]
549
550 #
551 # I.5
552 RUN CALL two_resultsets()
553 [ASSERT COMPRESSION]
554 [ASSERT COMPRESSION]
555 [ASSERT COMPRESSION]
556 [ASSERT COMPRESSION]
557 [ASSERT COMPRESSION]
558 [ASSERT COMPRESSION]
559 [ASSERT COMPRESSION]
560 [ASSERT COMPRESSION]
561 [ASSERT Mysqlx.Sql.StmtExecuteOk]
562
563 #
564 # II.1
565 send Mysqlx.Crud.Insert {
566 collection {
567 name: "coll"
568 schema: "xtest"
569 }
570 data_model: DOCUMENT
571 row {
572 field {
573 type: LITERAL
574 literal {
575 type: V_STRING
576 v_string {
577 value: "{\"some_field\":\"ok\"}"
578 }
579 }
580 }
581 }
582 }
583
584 [ASSERT COMPRESSION]
585 [ASSERT COMPRESSION]
586 [ASSERT Mysqlx.Sql.StmtExecuteOk]
587
588 #
589 # II.2
590 send Mysqlx.Crud.Insert {
591 collection {
592 name: "coll"
593 schema: "xtest"
594 }
595 data_model: DOCUMENT
596 row {
597 field {
598 type: LITERAL
599 literal {
600 type: V_STRING
601 v_string {
602 value: "{\"ints\":1}"
603 }
604 }
605 }
606 }
607 row {
608 field {
609 type: LITERAL
610 literal {
611 type: V_STRING
612 v_string {
613 value: "{\"ints\":2}"
614 }
615 }
616 }
617 }
618 row {
619 field {
620 type: LITERAL
621 literal {
622 type: V_STRING
623 v_string {
624 value: "{\"ints\":3}"
625 }
626 }
627 }
628 }
629 row {
630 field {
631 type: LITERAL
632 literal {
633 type: V_STRING
634 v_string {
635 value: "{\"ints\":4}"
636 }
637 }
638 }
639 }
640 }
641
642 [ASSERT COMPRESSION]
643 [ASSERT COMPRESSION]
644 [ASSERT COMPRESSION]
645 [ASSERT Mysqlx.Sql.StmtExecuteOk]
646
647 #
648 # III.1
649 send Mysqlx.Crud.Find {
650 collection {
651 name: "coll"
652 schema: "xtest"
653 }
654 data_model: DOCUMENT
655 criteria {
656 type: OPERATOR
657 operator {
658 name: "=="
659 param {
660 type: IDENT
661 identifier {
662 document_path {
663 type: MEMBER
664 value: "not_existing_member"
665 }
666 }
667 }
668 param {
669 type: LITERAL
670 literal {
671 type: V_OCTETS
672 v_octets {
673 value: "non-existing-value"
674 }
675 }
676 }
677 }
678 }
679 }
680
681 [ASSERT COMPRESSION]
682 [ASSERT COMPRESSION]
683 [ASSERT Mysqlx.Sql.StmtExecuteOk]
684
685 #
686 # III.2
687 send Mysqlx.Crud.Find {
688 collection {
689 name: "coll"
690 schema: "xtest"
691 }
692 data_model: DOCUMENT
693 limit {
694 row_count: 4
695 }
696 }
697
698 [ASSERT COMPRESSION]
699 [ASSERT COMPRESSION]
700 [ASSERT COMPRESSION]
701 [ASSERT COMPRESSION]
702 [ASSERT COMPRESSION]
703 [ASSERT COMPRESSION]
704 [ASSERT Mysqlx.Sql.StmtExecuteOk]
705
706 #
707 # IV.1
708 send Mysqlx.Crud.Update {
709 collection {
710 name: "coll"
711 schema: "xtest"
712 }
713 data_model: DOCUMENT
714 criteria {
715 type: OPERATOR
716 operator {
717 name: "=="
718 param {
719 type: IDENT
720 identifier {
721 document_path {
722 type: MEMBER
723 value: "not_existing_member"
724 }
725 }
726 }
727 param {
728 type: LITERAL
729 literal {
730 type: V_OCTETS
731 v_octets {
732 value: "non-existing-value"
733 }
734 }
735 }
736 }
737 }
738 operation {
739 source {
740 document_path {
741 type: MEMBER
742 value: "foo"
743 }
744 }
745 operation: ITEM_SET
746 value {
747 type: LITERAL
748 literal {
749 type: V_NULL
750 }
751 }
752 }
753 }
754
755 [ASSERT COMPRESSION]
756 [ASSERT COMPRESSION]
757 [ASSERT Mysqlx.Sql.StmtExecuteOk]
758
759 #
760 # IV.2
761 send Mysqlx.Crud.Update {
762 collection {
763 name: "coll"
764 schema: "xtest"
765 }
766 data_model: DOCUMENT
767 operation {
768 source {
769 document_path {
770 type: MEMBER
771 value: "foo2"
772 }
773 }
774 operation: ITEM_SET
775 value {
776 type: LITERAL
777 literal {
778 type: V_NULL
779 }
780 }
781 }
782 }
783
784 [ASSERT COMPRESSION]
785 [ASSERT COMPRESSION]
786 [ASSERT Mysqlx.Sql.StmtExecuteOk]
787
788 #
789 # V.1
790 send Mysqlx.Crud.Delete {
791 collection {
792 name: "coll"
793 schema: "xtest"
794 }
795 data_model: DOCUMENT
796 criteria {
797 type: OPERATOR
798 operator {
799 name: "=="
800 param {
801 type: IDENT
802 identifier {
803 document_path {
804 type: MEMBER
805 value: "not_existing_member"
806 }
807 }
808 }
809 param {
810 type: LITERAL
811 literal {
812 type: V_OCTETS
813 v_octets {
814 value: "non-existing-value"
815 }
816 }
817 }
818 }
819 }
820 }
821
822 [ASSERT COMPRESSION]
823 [ASSERT Mysqlx.Sql.StmtExecuteOk]
824
825 #
826 # V.2
827 send Mysqlx.Crud.Delete {
828 collection {
829 name: "coll"
830 schema: "xtest"
831 }
832 data_model: DOCUMENT
833 criteria {
834 type: OPERATOR
835 operator {
836 name: "=="
837 param {
838 type: IDENT
839 identifier {
840 document_path {
841 type: MEMBER
842 value: "prio"
843 }
844 }
845 }
846 param {
847 type: LITERAL
848 literal {
849 type: V_SINT
850 v_signed_int: 1
851 }
852 }
853 }
854 }
855 }
856
857 [ASSERT COMPRESSION]
858 [ASSERT Mysqlx.Sql.StmtExecuteOk]
859
860 #
861 # VI.1
862 send Mysqlx.Prepare.Prepare {
863 stmt_id: 1
864 stmt {
865 type: STMT
866 stmt_execute {
867 stmt: "call out_param_no_select(10, ?)"
868 }
869 }
870 }
871
872 RUN recvok
873 send Mysqlx.Prepare.Execute {
874 stmt_id: 1
875 args {
876 type: SCALAR
877 scalar {
878 type: V_STRING
879 v_string {
880 value: "@my_var"
881 }
882 }
883 }
884 }
885
886 [ASSERT COMPRESSION]
887 [ASSERT COMPRESSION]
888 [ASSERT COMPRESSION]
889 [ASSERT COMPRESSION]
890 [ASSERT COMPRESSION]
891 [ASSERT Mysqlx.Sql.StmtExecuteOk]
892
893 #
894 # VI.2
895 send Mysqlx.Prepare.Prepare {
896 stmt_id: 2
897 stmt {
898 type: STMT
899 stmt_execute {
900 stmt: "SELECT phrase FROM xtbl"
901 }
902 }
903 }
904
905 RUN recvok
906 send Mysqlx.Cursor.Open {
907 cursor_id: 2
908 stmt {
909 type: PREPARE_EXECUTE
910 prepare_execute {
911 stmt_id: 2
912 }
913 }
914 fetch_rows: 1
915 }
916
917 [ASSERT COMPRESSION]
918 [ASSERT COMPRESSION]
919 [ASSERT COMPRESSION]
920 [ASSERT Mysqlx.Sql.StmtExecuteOk]
921 Mysqlx.Ok {
922 msg: "bye!"
923 }
924 ok
925
926 ## C. Execute the test using zstd compression
927 #
928
929
930 ## Test setup
931
932
933 ## I. Validate that X Plugin sends compressed messages in StmtExecute resultset (GRAPH 2)
934 #
935 # 1. Assert SELECTs empty resultset
936 # 2. Assert SELECTs resultset with one column and one row
937 # 3. Assert SELECTs resultset with one column and multiple rows
938 # 4. Assert SELECTs resultset with multiple columns and multiple rows
939 # 5. Assert SQL that returns multiple resultsets
940 #
941 ## II. Validate that X Plugin sends compressed messages in Crud.Insert resultset (GRAPH 2)
942 #
943 # 1. Assert Crud.Insert resultset for single row insert
944 # 2. Assert Crud.Insert resultset for multiple rows insert
945 #
946 ## III. Validate that X Plugin sends compressed messages in Crud.Find resultset (GRAPH 2)
947 #
948 # 1. Assert Crud.Find empty resultset
949 # 2. Assert Crud.Find resultset with multiple rows
950 #
951 ## IV. Validate that X Plugin sends compressed messages in Crud.Update resultset (GRAPH 2)
952 #
953 # 1. Assert Crud.Update resultset with no hits
954 # 2. Assert Crud.Update resultset with multiple updated rows
955 #
956 ## V. Validate that X Plugin sends compressed messages in Crud.Delete resultset (GRAPH 2)
957 #
958 # 1. Assert Crud.Delete resultset with no hits
959 # 2. Assert Crud.Delete resultset with multiple deleted rows
960 #
961 ## VI. Validate that X Plugin sends compressed messages in PrepStmt resultset (GRAPH 2)
962 #
963 # 1. Assert PrepStmt resultset with out-params
964 # 2. Assert Cursor resultset that was suspended
965
966 # Create table "xtbl" and fill it with data
967 # Create collection "coll" and fill it with data
968
969 #
970 # I.1
971 RUN SELECT phrase FROM xtbl WHERE prio < 0
972 [ASSERT COMPRESSION]
973 [ASSERT COMPRESSION]
974 [ASSERT COMPRESSION]
975 [ASSERT Mysqlx.Sql.StmtExecuteOk]
976
977 #
978 # I.2
979 RUN SELECT phrase FROM xtbl LIMIT 1
980 [ASSERT COMPRESSION]
981 [ASSERT COMPRESSION]
982 [ASSERT COMPRESSION]
983 [ASSERT COMPRESSION]
984 [ASSERT Mysqlx.Sql.StmtExecuteOk]
985
986 #
987 # I.3
988 RUN SELECT phrase FROM xtbl LIMIT 4
989 [ASSERT COMPRESSION]
990 [ASSERT COMPRESSION]
991 [ASSERT COMPRESSION]
992 [ASSERT COMPRESSION]
993 [ASSERT COMPRESSION]
994 [ASSERT COMPRESSION]
995 [ASSERT COMPRESSION]
996 [ASSERT Mysqlx.Sql.StmtExecuteOk]
997
998 #
999 # I.4
1000 RUN SELECT phrase, prio FROM xtbl LIMIT 4
1001 [ASSERT COMPRESSION]
1002 [ASSERT COMPRESSION]
1003 [ASSERT COMPRESSION]
1004 [ASSERT COMPRESSION]
1005 [ASSERT COMPRESSION]
1006 [ASSERT COMPRESSION]
1007 [ASSERT COMPRESSION]
1008 [ASSERT COMPRESSION]
1009 [ASSERT Mysqlx.Sql.StmtExecuteOk]
1010
1011 #
1012 # I.5
1013 RUN CALL two_resultsets()
1014 [ASSERT COMPRESSION]
1015 [ASSERT COMPRESSION]
1016 [ASSERT COMPRESSION]
1017 [ASSERT COMPRESSION]
1018 [ASSERT COMPRESSION]
1019 [ASSERT COMPRESSION]
1020 [ASSERT COMPRESSION]
1021 [ASSERT COMPRESSION]
1022 [ASSERT Mysqlx.Sql.StmtExecuteOk]
1023
1024 #
1025 # II.1
1026 send Mysqlx.Crud.Insert {
1027 collection {
1028 name: "coll"
1029 schema: "xtest"
1030 }
1031 data_model: DOCUMENT
1032 row {
1033 field {
1034 type: LITERAL
1035 literal {
1036 type: V_STRING
1037 v_string {
1038 value: "{\"some_field\":\"ok\"}"
1039 }
1040 }
1041 }
1042 }
1043 }
1044
1045 [ASSERT COMPRESSION]
1046 [ASSERT COMPRESSION]
1047 [ASSERT Mysqlx.Sql.StmtExecuteOk]
1048
1049 #
1050 # II.2
1051 send Mysqlx.Crud.Insert {
1052 collection {
1053 name: "coll"
1054 schema: "xtest"
1055 }
1056 data_model: DOCUMENT
1057 row {
1058 field {
1059 type: LITERAL
1060 literal {
1061 type: V_STRING
1062 v_string {
1063 value: "{\"ints\":1}"
1064 }
1065 }
1066 }
1067 }
1068 row {
1069 field {
1070 type: LITERAL
1071 literal {
1072 type: V_STRING
1073 v_string {
1074 value: "{\"ints\":2}"
1075 }
1076 }
1077 }
1078 }
1079 row {
1080 field {
1081 type: LITERAL
1082 literal {
1083 type: V_STRING
1084 v_string {
1085 value: "{\"ints\":3}"
1086 }
1087 }
1088 }
1089 }
1090 row {
1091 field {
1092 type: LITERAL
1093 literal {
1094 type: V_STRING
1095 v_string {
1096 value: "{\"ints\":4}"
1097 }
1098 }
1099 }
1100 }
1101 }
1102
1103 [ASSERT COMPRESSION]
1104 [ASSERT COMPRESSION]
1105 [ASSERT COMPRESSION]
1106 [ASSERT Mysqlx.Sql.StmtExecuteOk]
1107
1108 #
1109 # III.1
1110 send Mysqlx.Crud.Find {
1111 collection {
1112 name: "coll"
1113 schema: "xtest"
1114 }
1115 data_model: DOCUMENT
1116 criteria {
1117 type: OPERATOR
1118 operator {
1119 name: "=="
1120 param {
1121 type: IDENT
1122 identifier {
1123 document_path {
1124 type: MEMBER
1125 value: "not_existing_member"
1126 }
1127 }
1128 }
1129 param {
1130 type: LITERAL
1131 literal {
1132 type: V_OCTETS
1133 v_octets {
1134 value: "non-existing-value"
1135 }
1136 }
1137 }
1138 }
1139 }
1140 }
1141
1142 [ASSERT COMPRESSION]
1143 [ASSERT COMPRESSION]
1144 [ASSERT Mysqlx.Sql.StmtExecuteOk]
1145
1146 #
1147 # III.2
1148 send Mysqlx.Crud.Find {
1149 collection {
1150 name: "coll"
1151 schema: "xtest"
1152 }
1153 data_model: DOCUMENT
1154 limit {
1155 row_count: 4
1156 }
1157 }
1158
1159 [ASSERT COMPRESSION]
1160 [ASSERT COMPRESSION]
1161 [ASSERT COMPRESSION]
1162 [ASSERT COMPRESSION]
1163 [ASSERT COMPRESSION]
1164 [ASSERT COMPRESSION]
1165 [ASSERT Mysqlx.Sql.StmtExecuteOk]
1166
1167 #
1168 # IV.1
1169 send Mysqlx.Crud.Update {
1170 collection {
1171 name: "coll"
1172 schema: "xtest"
1173 }
1174 data_model: DOCUMENT
1175 criteria {
1176 type: OPERATOR
1177 operator {
1178 name: "=="
1179 param {
1180 type: IDENT
1181 identifier {
1182 document_path {
1183 type: MEMBER
1184 value: "not_existing_member"
1185 }
1186 }
1187 }
1188 param {
1189 type: LITERAL
1190 literal {
1191 type: V_OCTETS
1192 v_octets {
1193 value: "non-existing-value"
1194 }
1195 }
1196 }
1197 }
1198 }
1199 operation {
1200 source {
1201 document_path {
1202 type: MEMBER
1203 value: "foo"
1204 }
1205 }
1206 operation: ITEM_SET
1207 value {
1208 type: LITERAL
1209 literal {
1210 type: V_NULL
1211 }
1212 }
1213 }
1214 }
1215
1216 [ASSERT COMPRESSION]
1217 [ASSERT COMPRESSION]
1218 [ASSERT Mysqlx.Sql.StmtExecuteOk]
1219
1220 #
1221 # IV.2
1222 send Mysqlx.Crud.Update {
1223 collection {
1224 name: "coll"
1225 schema: "xtest"
1226 }
1227 data_model: DOCUMENT
1228 operation {
1229 source {
1230 document_path {
1231 type: MEMBER
1232 value: "foo2"
1233 }
1234 }
1235 operation: ITEM_SET
1236 value {
1237 type: LITERAL
1238 literal {
1239 type: V_NULL
1240 }
1241 }
1242 }
1243 }
1244
1245 [ASSERT COMPRESSION]
1246 [ASSERT COMPRESSION]
1247 [ASSERT Mysqlx.Sql.StmtExecuteOk]
1248
1249 #
1250 # V.1
1251 send Mysqlx.Crud.Delete {
1252 collection {
1253 name: "coll"
1254 schema: "xtest"
1255 }
1256 data_model: DOCUMENT
1257 criteria {
1258 type: OPERATOR
1259 operator {
1260 name: "=="
1261 param {
1262 type: IDENT
1263 identifier {
1264 document_path {
1265 type: MEMBER
1266 value: "not_existing_member"
1267 }
1268 }
1269 }
1270 param {
1271 type: LITERAL
1272 literal {
1273 type: V_OCTETS
1274 v_octets {
1275 value: "non-existing-value"
1276 }
1277 }
1278 }
1279 }
1280 }
1281 }
1282
1283 [ASSERT COMPRESSION]
1284 [ASSERT Mysqlx.Sql.StmtExecuteOk]
1285
1286 #
1287 # V.2
1288 send Mysqlx.Crud.Delete {
1289 collection {
1290 name: "coll"
1291 schema: "xtest"
1292 }
1293 data_model: DOCUMENT
1294 criteria {
1295 type: OPERATOR
1296 operator {
1297 name: "=="
1298 param {
1299 type: IDENT
1300 identifier {
1301 document_path {
1302 type: MEMBER
1303 value: "prio"
1304 }
1305 }
1306 }
1307 param {
1308 type: LITERAL
1309 literal {
1310 type: V_SINT
1311 v_signed_int: 1
1312 }
1313 }
1314 }
1315 }
1316 }
1317
1318 [ASSERT COMPRESSION]
1319 [ASSERT Mysqlx.Sql.StmtExecuteOk]
1320
1321 #
1322 # VI.1
1323 send Mysqlx.Prepare.Prepare {
1324 stmt_id: 1
1325 stmt {
1326 type: STMT
1327 stmt_execute {
1328 stmt: "call out_param_no_select(10, ?)"
1329 }
1330 }
1331 }
1332
1333 RUN recvok
1334 send Mysqlx.Prepare.Execute {
1335 stmt_id: 1
1336 args {
1337 type: SCALAR
1338 scalar {
1339 type: V_STRING
1340 v_string {
1341 value: "@my_var"
1342 }
1343 }
1344 }
1345 }
1346
1347 [ASSERT COMPRESSION]
1348 [ASSERT COMPRESSION]
1349 [ASSERT COMPRESSION]
1350 [ASSERT COMPRESSION]
1351 [ASSERT COMPRESSION]
1352 [ASSERT Mysqlx.Sql.StmtExecuteOk]
1353
1354 #
1355 # VI.2
1356 send Mysqlx.Prepare.Prepare {
1357 stmt_id: 2
1358 stmt {
1359 type: STMT
1360 stmt_execute {
1361 stmt: "SELECT phrase FROM xtbl"
1362 }
1363 }
1364 }
1365
1366 RUN recvok
1367 send Mysqlx.Cursor.Open {
1368 cursor_id: 2
1369 stmt {
1370 type: PREPARE_EXECUTE
1371 prepare_execute {
1372 stmt_id: 2
1373 }
1374 }
1375 fetch_rows: 1
1376 }
1377
1378 [ASSERT COMPRESSION]
1379 [ASSERT COMPRESSION]
1380 [ASSERT COMPRESSION]
1381 [ASSERT Mysqlx.Sql.StmtExecuteOk]
1382 Mysqlx.Ok {
1383 msg: "bye!"
1384 }
1385 ok