Debian Codegraph @

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