Debian Codegraph @

mysql-test/suite/x/t/crud_doc_criteria_args.test

raw
1 ########### ../t/crud_doc_criteria_args.test #############
2 ### #
3 ### Manipulating on valid rows by criteria with placeholders #
4 ### Test covers #
5 ### - FIND with different operators #
6 ### - UPDATE with different operators #
7 ### - UPDATE (ITEM_SET, ITEM_REPLACE, ITEM_REMOVE, ARRAY_APPEND, #
8 ### ARRAY_INSERT, ITEM_MERGE) #
9 ### - DELETE with different operators #
10 ### #
11 ########################################################################
12 #
13
14 --echo =============================================
15 --echo CRUD DOC CRITERIA ARGS SCENARIOS
16 --echo =============================================
17 --echo
18
19 --echo ================================================================================
20 --echo PREAMBLE
21 --echo ================================================================================
22 ## Preamble
23 --source include/xplugin_preamble.inc
24 --source include/xplugin_create_user.inc
25 ## Test starts here
26 --echo ================================================================================
27 --echo TEST START
28 --echo ================================================================================
29
30 create schema xtest;
31
32 --write_file $MYSQL_TMP_DIR/crud_doc_criteria_args.xpl
33 ## Test data
34 -->stmtadmin create_collection {"schema":"xtest","name":"mycoll"}
35 -->recvresult
36
37 -->sql
38 use xtest;
39 insert into mycoll (doc) values ('{"_id": "1", "name": "Robb", "amount": 125.21}');
40 insert into mycoll (doc) values ('{"_id": "2", "name": "Bran", "amount": 542.75}');
41 insert into mycoll (doc) values ('{"_id": "3", "name": "Arya", "amount": 98.89}');
42 insert into mycoll (doc) values ('{"_id": "4", "name": "Tassadar", "amount": 57.52}');
43 insert into mycoll (doc) values ('{"_id": "5", "name": "Sansa", "amount": null}');
44 select doc FROM xtest.mycoll;
45 -->endsql
46
47 -->echo Find with > Operator and placeholder
48 Mysqlx.Crud.Find {
49 collection {
50 name: "mycoll"
51 schema: "xtest"
52 }
53 data_model: DOCUMENT
54 criteria {
55 type: OPERATOR
56 operator {
57 name: ">"
58 param {
59 type: IDENT identifier {
60 document_path {
61 type: MEMBER
62 value: "amount"
63 }
64 }
65 }
66 param {
67 type: PLACEHOLDER position: 0
68 }
69 }
70 }
71 args {
72 type: V_DOUBLE v_double: 98.89
73 }
74 }
75
76 ## expect Mysqlx.Sql.StmtExecuteOk
77 -->recvresult
78
79 -->echo Find with < Operator and placeholder
80 Mysqlx.Crud.Find {
81 collection {
82 name: "mycoll"
83 schema: "xtest"
84 }
85 data_model: DOCUMENT
86 criteria {
87 type: OPERATOR
88 operator {
89 name: "<"
90 param {
91 type: IDENT identifier {
92 document_path {
93 type: MEMBER
94 value: "amount"
95 }
96 }
97 }
98 param {
99 type: PLACEHOLDER position: 0
100 }
101 }
102 }
103 args {
104 type: V_DOUBLE v_double: 98.89
105 }
106 }
107
108 ## expect Mysqlx.Sql.StmtExecuteOk
109 -->recvresult
110
111 -->echo Find with >= Operator and placeholder
112 Mysqlx.Crud.Find {
113 collection {
114 name: "mycoll"
115 schema: "xtest"
116 }
117 data_model: DOCUMENT
118 criteria {
119 type: OPERATOR
120 operator {
121 name: ">="
122 param {
123 type: IDENT identifier {
124 document_path {
125 type: MEMBER
126 value: "amount"
127 }
128 }
129 }
130 param {
131 type: PLACEHOLDER position: 0
132 }
133 }
134 }
135 args {
136 type: V_DOUBLE v_double: 98.89
137 }
138 }
139
140 ## expect Mysqlx.Sql.StmtExecuteOk
141 -->recvresult
142
143 -->echo Find with <= Operator and placeholder
144 Mysqlx.Crud.Find {
145 collection {
146 name: "mycoll"
147 schema: "xtest"
148 }
149 data_model: DOCUMENT
150 criteria {
151 type: OPERATOR
152 operator {
153 name: "<="
154 param {
155 type: IDENT identifier {
156 document_path {
157 type: MEMBER
158 value: "amount"
159 }
160 }
161 }
162 param {
163 type: PLACEHOLDER position: 0
164 }
165 }
166 }
167 args {
168 type: V_DOUBLE v_double: 98.89
169 }
170 }
171
172 ## expect Mysqlx.Sql.StmtExecuteOk
173 -->recvresult
174
175 -->echo Find with <= Operator, placeholder and Order desc
176 Mysqlx.Crud.Find {
177 collection {
178 name: "mycoll"
179 schema: "xtest"
180 }
181 data_model: DOCUMENT
182 criteria {
183 type: OPERATOR
184 operator {
185 name: "!="
186 param {
187 type: IDENT identifier {
188 document_path {
189 type: MEMBER
190 value: "amount"
191 }
192 }
193 }
194 param {
195 type: PLACEHOLDER position: 0
196 }
197 }
198 }
199 args {
200 type: V_DOUBLE v_double: 0
201 }
202 order {
203 expr {
204 type: IDENT
205 identifier {
206 name: "_id"
207 }
208 }
209 direction: DESC
210 }
211 }
212
213 ## expect Mysqlx.Sql.StmtExecuteOk
214 -->recvresult
215
216 -->echo Find with <= Operator, placeholder and Order asc
217 Mysqlx.Crud.Find {
218 collection {
219 name: "mycoll"
220 schema: "xtest"
221 }
222 data_model: DOCUMENT
223 criteria {
224 type: OPERATOR
225 operator {
226 name: "!="
227 param {
228 type: IDENT identifier {
229 document_path {
230 type: MEMBER
231 value: "amount"
232 }
233 }
234 }
235 param {
236 type: PLACEHOLDER position: 0
237 }
238 }
239 }
240 args {
241 type: V_DOUBLE v_double: 0
242 }
243 order {
244 expr {
245 type: IDENT
246 identifier {
247 name: "_id"
248 }
249 }
250 direction: ASC
251 }
252 }
253
254 ## expect Mysqlx.Sql.StmtExecuteOk
255 -->recvresult
256
257 -->echo Find with == Operator and placeholder
258 Mysqlx.Crud.Find {
259 collection {
260 name: "mycoll"
261 schema: "xtest"
262 }
263 data_model: DOCUMENT
264 criteria {
265 type: OPERATOR
266 operator {
267 name: "=="
268 param {
269 type: IDENT identifier {
270 document_path {
271 type: MEMBER
272 value: "name"
273 }
274 }
275 }
276 param {
277 type: PLACEHOLDER position: 0
278 }
279 }
280 }
281 args {
282 type: V_STRING v_string { value: "Robb" }
283 }
284 }
285
286 ## expect Mysqlx.Sql.StmtExecuteOk
287 -->recvresult
288
289 -->echo Find with != Operator and placeholder
290 Mysqlx.Crud.Find {
291 collection {
292 name: "mycoll"
293 schema: "xtest"
294 }
295 data_model: DOCUMENT
296 criteria {
297 type: OPERATOR
298 operator {
299 name: "!="
300 param {
301 type: IDENT identifier {
302 document_path {
303 type: MEMBER
304 value: "name"
305 }
306 }
307 }
308 param {
309 type: PLACEHOLDER position: 0
310 }
311 }
312 }
313 args {
314 type: V_STRING v_string { value: "Robb" }
315 }
316 }
317
318 ## expect Mysqlx.Sql.StmtExecuteOk
319 -->recvresult
320
321 -->echo Find with in Operator and placeholder
322 Mysqlx.Crud.Find {
323 collection {
324 name: "mycoll"
325 schema: "xtest"
326 }
327 data_model: DOCUMENT
328 criteria {
329 type: OPERATOR
330 operator {
331 name: "in"
332 param {
333 type: IDENT identifier {
334 document_path {
335 type: MEMBER
336 value: "_id"
337 }
338 }
339 }
340 param {
341 type: PLACEHOLDER position: 0
342 }
343 }
344 }
345 args {
346 type: V_STRING v_string { value: "3" }
347 }
348 }
349
350 ## expect Mysqlx.Sql.StmtExecuteOk
351 -->recvresult
352
353 -->echo Find with not_in Operator and placeholder
354 Mysqlx.Crud.Find {
355 collection {
356 name: "mycoll"
357 schema: "xtest"
358 }
359 data_model: DOCUMENT
360 criteria {
361 type: OPERATOR
362 operator {
363 name: "not_in"
364 param {
365 type: IDENT identifier {
366 document_path {
367 type: MEMBER
368 value: "_id"
369 }
370 }
371 }
372 param {
373 type: PLACEHOLDER position: 0
374 }
375 }
376 }
377 args {
378 type: V_STRING v_string { value: "3" }
379 }
380 }
381
382 ## expect Mysqlx.Sql.StmtExecuteOk
383 -->recvresult
384
385 -->echo Update with == operator and placeholder
386 Mysqlx.Crud.Update {
387 collection {
388 name: "mycoll"
389 schema: "xtest"
390 }
391 data_model: DOCUMENT
392 criteria {
393 type: OPERATOR
394 operator {
395 name: "=="
396 param {
397 type: IDENT identifier {
398 document_path {
399 type: MEMBER
400 value: "amount"
401 }
402 }
403 }
404 param {
405 type: PLACEHOLDER position: 0
406 }
407 }
408 }
409 operation {
410 source {
411 document_path {
412 type: MEMBER
413 value: "name"
414 }
415 }
416 operation: ITEM_SET
417 value {
418 type: LITERAL
419 literal {
420 type: V_OCTETS v_octets {value:"Update_=="}
421 }
422 }
423 }
424 args {
425 type: V_DOUBLE v_double: 98.89
426 }
427 }
428
429 ## expect Mysqlx.Sql.StmtExecuteOk
430 -->recvresult
431
432 -->sql
433 select doc FROM xtest.mycoll;
434 -->endsql
435
436 -->echo Update with > operator and placeholder
437 Mysqlx.Crud.Update {
438 collection {
439 name: "mycoll"
440 schema: "xtest"
441 }
442 data_model: DOCUMENT
443 criteria {
444 type: OPERATOR
445 operator {
446 name: ">"
447 param {
448 type: IDENT identifier {
449 document_path {
450 type: MEMBER
451 value: "amount"
452 }
453 }
454 }
455 param {
456 type: PLACEHOLDER position: 0
457 }
458 }
459 }
460 operation {
461 source {
462 document_path {
463 type: MEMBER
464 value: "name"
465 }
466 }
467 operation: ITEM_SET
468 value {
469 type: LITERAL
470 literal {
471 type: V_OCTETS v_octets {value:"Update_>"}
472 }
473 }
474 }
475 args {
476 type: V_DOUBLE v_double: 98.89
477 }
478 }
479
480 ## expect Mysqlx.Sql.StmtExecuteOk
481 -->recvresult
482
483 -->sql
484 select doc FROM xtest.mycoll;
485 -->endsql
486
487 -->echo Update with >= operator and placeholder
488 Mysqlx.Crud.Update {
489 collection {
490 name: "mycoll"
491 schema: "xtest"
492 }
493 data_model: DOCUMENT
494 criteria {
495 type: OPERATOR
496 operator {
497 name: ">="
498 param {
499 type: IDENT identifier {
500 document_path {
501 type: MEMBER
502 value: "amount"
503 }
504 }
505 }
506 param {
507 type: PLACEHOLDER position: 0
508 }
509 }
510 }
511 operation {
512 source {
513 document_path {
514 type: MEMBER
515 value: "name"
516 }
517 }
518 operation: ITEM_SET
519 value {
520 type: LITERAL
521 literal {
522 type: V_OCTETS v_octets {value:"Update_>="}
523 }
524 }
525 }
526 args {
527 type: V_DOUBLE v_double: 98.89
528 }
529 }
530
531 ## expect Mysqlx.Sql.StmtExecuteOk
532 -->recvresult
533
534 -->sql
535 select doc FROM xtest.mycoll;
536 -->endsql
537
538 -->echo Update with <= operator and placeholder
539 Mysqlx.Crud.Update {
540 collection {
541 name: "mycoll"
542 schema: "xtest"
543 }
544 data_model: DOCUMENT
545 criteria {
546 type: OPERATOR
547 operator {
548 name: "<="
549 param {
550 type: IDENT identifier {
551 document_path {
552 type: MEMBER
553 value: "amount"
554 }
555 }
556 }
557 param {
558 type: PLACEHOLDER position: 0
559 }
560 }
561 }
562 operation {
563 source {
564 document_path {
565 type: MEMBER
566 value: "name"
567 }
568 }
569 operation: ITEM_SET
570 value {
571 type: LITERAL
572 literal {
573 type: V_OCTETS v_octets {value:"Update_<="}
574 }
575 }
576 }
577 args {
578 type: V_DOUBLE v_double: 98.89
579 }
580 }
581
582 ## expect Mysqlx.Sql.StmtExecuteOk
583 -->recvresult
584
585 -->sql
586 select doc FROM xtest.mycoll;
587 -->endsql
588
589 -->echo Update with Float operator and placeholder
590 Mysqlx.Crud.Update {
591 collection {
592 name: "mycoll"
593 schema: "xtest"
594 }
595 data_model: DOCUMENT
596 criteria {
597 type: OPERATOR
598 operator {
599 name: "=="
600 param {
601 type: IDENT identifier {
602 document_path {
603 type: MEMBER
604 value: "name"
605 }
606 }
607 }
608 param {
609 type: PLACEHOLDER position: 0
610 }
611 }
612 }
613 operation {
614 source {
615 document_path {
616 type: MEMBER
617 value: "amount"
618 }
619 }
620 operation: ITEM_SET
621 value {
622 type: LITERAL
623 literal {
624 type: V_FLOAT v_float: 256.51
625 }
626 }
627 }
628 args {
629 type: V_STRING v_string { value: "Update_<=" }
630 }
631 }
632
633 ## expect Mysqlx.Sql.StmtExecuteOk
634 -->recvresult
635
636 -->sql
637 select doc FROM xtest.mycoll;
638 -->endsql
639
640 -->echo Update with Double operator and placeholder
641 Mysqlx.Crud.Update {
642 collection {
643 name: "mycoll"
644 schema: "xtest"
645 }
646 data_model: DOCUMENT
647 criteria {
648 type: OPERATOR
649 operator {
650 name: "=="
651 param {
652 type: IDENT identifier {
653 document_path {
654 type: MEMBER
655 value: "name"
656 }
657 }
658 }
659 param {
660 type: PLACEHOLDER position: 0
661 }
662 }
663 }
664 operation {
665 source {
666 document_path {
667 type: MEMBER
668 value: "amount"
669 }
670 }
671 operation: ITEM_SET
672 value {
673 type: LITERAL
674 literal {
675 type: V_DOUBLE v_double: 256.51
676 }
677 }
678 }
679 args {
680 type: V_STRING v_string { value: "Update_>=" }
681 }
682 }
683
684 ## expect Mysqlx.Sql.StmtExecuteOk
685 -->recvresult
686
687 -->sql
688 select doc FROM xtest.mycoll;
689 -->endsql
690
691 -->echo Update with String operator and placeholder
692 Mysqlx.Crud.Update {
693 collection {
694 name: "mycoll"
695 schema: "xtest"
696 }
697 data_model: DOCUMENT
698 criteria {
699 type: OPERATOR
700 operator {
701 name: "=="
702 param {
703 type: IDENT identifier {
704 document_path {
705 type: MEMBER
706 value: "amount"
707 }
708 }
709 }
710 param {
711 type: PLACEHOLDER position: 0
712 }
713 }
714 }
715 operation {
716 source {
717 document_path {
718 type: MEMBER
719 value: "name"
720 }
721 }
722 operation: ITEM_SET
723 value {
724 type: LITERAL
725 literal {
726 type: V_STRING v_string { value: "watermelon" }
727 }
728 }
729 }
730 args {
731 type: V_DOUBLE v_double: 256.51
732 }
733 }
734 ## expect Mysqlx.Sql.StmtExecuteOk
735 -->recvresult
736
737 -->sql
738 select doc FROM xtest.mycoll;
739 -->endsql
740
741 -->echo Update with Null operator and placeholder
742 Mysqlx.Crud.Update {
743 collection {
744 name: "mycoll"
745 schema: "xtest"
746 }
747 data_model: DOCUMENT
748 criteria {
749 type: OPERATOR
750 operator {
751 name: "=="
752 param {
753 type: IDENT identifier {
754 document_path {
755 type: MEMBER
756 value: "name"
757 }
758 }
759 }
760 param {
761 type: PLACEHOLDER position: 0
762 }
763 }
764 }
765 operation {
766 source {
767 document_path {
768 type: MEMBER
769 value: "amount"
770 }
771 }
772 operation: ITEM_SET
773 value {
774 type: LITERAL
775 literal {
776 type: V_NULL
777 }
778 }
779 }
780 args {
781 type: V_STRING v_string { value: "watermelon" }
782 }
783 }
784 ## expect Mysqlx.Sql.StmtExecuteOk
785 -->recvresult
786
787 -->sql
788 select doc FROM xtest.mycoll;
789 -->endsql
790
791 -->echo Update with ITEM_REPLACE operator and placeholder
792 Mysqlx.Crud.Update {
793 collection {
794 name: "mycoll"
795 schema: "xtest"
796 }
797 data_model: DOCUMENT
798 criteria {
799 type: OPERATOR
800 operator {
801 name: "=="
802 param {
803 type: IDENT identifier {
804 document_path {
805 type: MEMBER
806 value: "name"
807 }
808 }
809 }
810 param {
811 type: PLACEHOLDER position: 0
812 }
813 }
814 }
815 operation {
816 source {
817 document_path {
818 type: MEMBER
819 value: "name"
820 }
821 }
822 operation: ITEM_REPLACE
823 value {
824 type: LITERAL
825 literal {
826 type: V_STRING v_string { value: "watermelon_replace" }
827 }
828 }
829 }
830 args {
831 type: V_STRING v_string { value: "watermelon" }
832 }
833 }
834 ## expect Mysqlx.Sql.StmtExecuteOk
835 -->recvresult
836
837 -->sql
838 select doc FROM xtest.mycoll;
839 -->endsql
840
841 -->echo Update with ITEM_REMOVE operator and placeholder
842 Mysqlx.Crud.Update {
843 collection {
844 name: "mycoll"
845 schema: "xtest"
846 }
847 data_model: DOCUMENT
848 criteria {
849 type: OPERATOR
850 operator {
851 name: "=="
852 param {
853 type: IDENT identifier {
854 name: "_id"
855 }
856 }
857 param {
858 type: PLACEHOLDER position: 0
859 }
860 }
861 }
862 operation {
863 source {
864 document_path {
865 type: MEMBER
866 value: "name"
867 }
868 }
869 operation: ITEM_REMOVE
870 }
871 args {
872 type: V_DOUBLE v_double: 3
873 }
874 }
875 ## expect Mysqlx.Sql.StmtExecuteOk
876 -->recvresult
877
878 -->sql
879 select doc FROM xtest.mycoll;
880 -->endsql
881
882 -->echo Update with ARRAY_APPEND operator and placeholder
883 Mysqlx.Crud.Update {
884 collection {
885 name: "mycoll"
886 schema: "xtest"
887 }
888 data_model: DOCUMENT
889 criteria {
890 type: OPERATOR
891 operator {
892 name: "=="
893 param {
894 type: IDENT identifier {
895 name: "_id"
896 }
897 }
898 param {
899 type: PLACEHOLDER position: 0
900 }
901 }
902 }
903 operation {
904 source {
905 document_path {
906 type: MEMBER
907 value: "amount"
908 }
909 }
910 operation: ARRAY_APPEND
911 value {
912 type: LITERAL
913 literal {
914 type: V_STRING
915 v_string {
916 value: "Update_ArrayAppend"
917 }
918 }
919 }
920 }
921 args {
922 type: V_DOUBLE v_double: 3
923 }
924 }
925 ## expect Mysqlx.Sql.StmtExecuteOk
926 -->recvresult
927
928 -->sql
929 select doc FROM xtest.mycoll;
930 -->endsql
931
932 -->echo Update with ITEM_MERGE value and placeholder
933 Mysqlx.Crud.Update {
934 collection {
935 name: "mycoll"
936 schema: "xtest"
937 }
938 data_model: TABLE
939 criteria {
940 type: OPERATOR
941 operator {
942 name: "=="
943 param {
944 type: IDENT
945 identifier {
946 name: "_id"
947 }
948 }
949 param {
950 type: PLACEHOLDER
951 position: 0
952 }
953 }
954 }
955 operation {
956 source {
957 name: 'doc'
958 }
959 operation: ITEM_MERGE
960 value: {
961 type: LITERAL
962 literal {
963 type: V_OCTETS
964 v_octets {value:'{"third":3.0, "fourth": "four"}'}
965 }
966 }
967 }
968 args {
969 type: V_UINT
970 v_unsigned_int: 2
971 }
972 }
973
974 #-- Mysqlx.Sql.StmtExecuteOk
975 -->recvresult
976
977 -->sql
978 select doc FROM xtest.mycoll;
979 insert into mycoll (doc) values ('{"_id": "6", "third": ["two"]}');
980 -->endsql
981
982 -->echo Update with ARRAY_INSERT value and placeholder
983 Mysqlx.Crud.Update {
984 collection {
985 name: "mycoll"
986 schema: "xtest"
987 }
988 data_model: TABLE
989 criteria {
990 type: OPERATOR
991 operator {
992 name: "=="
993 param {
994 type: IDENT
995 identifier {
996 name: "_id"
997 }
998 }
999 param {
1000 type: PLACEHOLDER
1001 position: 0
1002 }
1003 }
1004 }
1005 operation {
1006 source {
1007 name: 'doc'
1008 document_path {type: MEMBER value: 'third'}
1009 document_path {type: ARRAY_INDEX index: 0}
1010 }
1011 operation: ARRAY_INSERT
1012 value: {
1013 type: LITERAL
1014 literal {
1015 type: V_OCTETS
1016 v_octets {value:'two.1'}
1017 }
1018 }
1019 }
1020 args {
1021 type: V_UINT
1022 v_unsigned_int: 6
1023 }
1024 }
1025 #-- Mysqlx.Sql.StmtExecuteOk
1026 -->recvresult
1027
1028 -->sql
1029 select doc FROM xtest.mycoll;
1030 -->endsql
1031
1032 -->echo Delete with == operator and placeholder
1033 Mysqlx.Crud.Delete {
1034 collection {
1035 name: "mycoll"
1036 schema: "xtest"
1037 }
1038 data_model: DOCUMENT
1039 criteria {
1040 type: OPERATOR
1041 operator {
1042 name: "=="
1043 param {
1044 type: IDENT identifier {
1045 name: "_id"
1046 }
1047 }
1048 param {
1049 type: PLACEHOLDER position: 0
1050 }
1051 }
1052 }
1053 args {
1054 type: V_SINT v_signed_int: 2
1055 }
1056 }
1057
1058 ## expect Mysqlx.Sql.StmtExecuteOk
1059 -->recvresult
1060
1061 -->sql
1062 select doc FROM xtest.mycoll;
1063 -->endsql
1064
1065 -->echo Delete with != operator and placeholder
1066 Mysqlx.Crud.Delete {
1067 collection {
1068 name: "mycoll"
1069 schema: "xtest"
1070 }
1071 data_model: DOCUMENT
1072 criteria {
1073 type: OPERATOR
1074 operator {
1075 name: "!="
1076 param {
1077 type: IDENT identifier {
1078 document_path {
1079 type: MEMBER
1080 value: "name"
1081 }
1082 }
1083 }
1084 param {
1085 type: PLACEHOLDER position: 0
1086 }
1087 }
1088 }
1089 args {
1090 type: V_STRING v_string { value: "Update_<=" }
1091 }
1092 }
1093
1094 ## expect Mysqlx.Sql.StmtExecuteOk
1095 -->recvresult
1096
1097 -->sql
1098 select doc FROM xtest.mycoll;
1099 -->endsql
1100
1101 ## Wrong or missing placeholder
1102
1103 Mysqlx.Crud.Find {
1104 collection {
1105 name: "mycoll"
1106 schema: "xtest"
1107 }
1108 data_model: DOCUMENT
1109 criteria {
1110 type: OPERATOR
1111 operator {
1112 name: ">"
1113 param {
1114 type: IDENT identifier {
1115 document_path {
1116 type: MEMBER
1117 value: "name"
1118 }
1119 }
1120 }
1121 param {
1122 type: PLACEHOLDER position: 1
1123 }
1124 }
1125 }
1126 args {
1127 type: V_OCTETS v_octets {value:"Jon"}
1128 }
1129 }
1130
1131 -->expecterror 5154
1132 -->recvresult
1133
1134 Mysqlx.Crud.Find {
1135 collection {
1136 name: "mycoll"
1137 schema: "xtest"
1138 }
1139 data_model: DOCUMENT
1140 criteria {
1141 type: OPERATOR
1142 operator {
1143 name: ">"
1144 param {
1145 type: IDENT identifier {
1146 document_path {
1147 type: MEMBER
1148 value: "name"
1149 }
1150 }
1151 }
1152 param {
1153 type: PLACEHOLDER position: 1
1154 }
1155 }
1156 }
1157 }
1158
1159 -->expecterror 5154
1160 -->recvresult
1161
1162
1163 ## Cleanup
1164 -->echo ================================================================================
1165 -->echo CLEAN UP
1166 -->echo ================================================================================
1167 -->sql
1168 drop schema if exists xtest;
1169 -->endsql
1170 EOF
1171
1172 --exec $MYSQLXTEST -ux_root --password='' --file=$MYSQL_TMP_DIR/crud_doc_criteria_args.xpl 2>&1
1173
1174 ## Cleanup
1175 --source ../include/xplugin_cleanup.inc