Debian Codegraph @

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