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