| 
 | 1 | + ## Preamble  | 
 | 2 | +--source ../include/xplugin_preamble.inc  | 
 | 3 | + | 
 | 4 | +## TEST STARTS HERE  | 
 | 5 | +--write_file $MYSQL_TMP_DIR/mysqlx-update_itemremove.tmp  | 
 | 6 | +-->stmtadmin create_collection	 {"schema":"test", "name":"coll"}  | 
 | 7 | +-->recvresult  | 
 | 8 | + | 
 | 9 | +## It tests the limits of protobuf, we do not need any data in the collection  | 
 | 10 | + | 
 | 11 | + | 
 | 12 | +-->macro Send_message_with_repeated_nested_objects	%OBJECTS_TO_NEST%  | 
 | 13 | +-->varlet %NESTED_OBJECTS%   | 
 | 14 | + | 
 | 15 | +-->varlet %OBJECTS_TO_REPEAT% %OBJECTS_TO_NEST%  | 
 | 16 | +-->varinc %OBJECTS_TO_REPEAT% -3  | 
 | 17 | + | 
 | 18 | +-->repeat %OBJECTS_TO_REPEAT%	%ITERATION%  | 
 | 19 | +-->varlet %OBJECT_NUMBER% %ITERATION%  | 
 | 20 | +-->varinc %OBJECT_NUMBER% 4  | 
 | 21 | +-->varlet %NESTED_OBJECTS% %NESTED_OBJECTS%  value { type: ARRAY array { value { type: LITERAL literal { type: V_SINT v_signed_int: %OBJECT_NUMBER% } }   | 
 | 22 | +-->endrepeat  | 
 | 23 | + | 
 | 24 | +-->repeat %OBJECTS_TO_REPEAT%  | 
 | 25 | +-->varlet %NESTED_OBJECTS% %NESTED_OBJECTS%  } }   | 
 | 26 | +-->endrepeat  | 
 | 27 | + | 
 | 28 | +-->quiet  | 
 | 29 | +Mysqlx.Crud.Find {  | 
 | 30 | +  collection {  | 
 | 31 | +    name: "coll"  | 
 | 32 | +    schema: "test"  | 
 | 33 | +  }  | 
 | 34 | +  data_model: DOCUMENT  | 
 | 35 | +  criteria {  | 
 | 36 | +    type: OPERATOR  | 
 | 37 | +    operator {  | 
 | 38 | +      name: "=="  | 
 | 39 | +      param {  | 
 | 40 | +        type: IDENT  | 
 | 41 | +        identifier {  | 
 | 42 | +          document_path {  | 
 | 43 | +            type: MEMBER  | 
 | 44 | +            value: "ARR0"  | 
 | 45 | +          }  | 
 | 46 | +        }  | 
 | 47 | +      }  | 
 | 48 | +      param {  | 
 | 49 | +        type: ARRAY  | 
 | 50 | +        array {  | 
 | 51 | +          value {  | 
 | 52 | +            type: LITERAL  | 
 | 53 | +            literal {  | 
 | 54 | +              type: V_SINT  | 
 | 55 | +              v_signed_int: 3  | 
 | 56 | +            }  | 
 | 57 | +          }  | 
 | 58 | +            | 
 | 59 | +          %NESTED_OBJECTS%  | 
 | 60 | +            | 
 | 61 | +            | 
 | 62 | +        }  | 
 | 63 | +          | 
 | 64 | +      }  | 
 | 65 | +    }  | 
 | 66 | +  }  | 
 | 67 | +}  | 
 | 68 | +-->noquiet  | 
 | 69 | +-->endmacro  | 
 | 70 | + | 
 | 71 | +## Current recursion limit is set to 100  | 
 | 72 | +## each repeated message in bellow macro contains two messages  | 
 | 73 | +## (it increases the current depth by 2)  | 
 | 74 | +-->newsession test_different_messages	root  | 
 | 75 | +-->echo Try to use value greater than the default limit 50 /2 => 25  | 
 | 76 | +-->callmacro Send_message_with_repeated_nested_objects	25  | 
 | 77 | +-->recvresult  | 
 | 78 | + | 
 | 79 | +-->echo Try to use value equal than the X Protocol limit 100 /2 => 50  | 
 | 80 | +-->callmacro Send_message_with_repeated_nested_objects	50  | 
 | 81 | +-->recvresult  | 
 | 82 | + | 
 | 83 | +-->echo Try to use value greater than the X Protocol limit 102 /2 => 51  | 
 | 84 | +-->callmacro Send_message_with_repeated_nested_objects	51  | 
 | 85 | +-->expecterror 5000  | 
 | 86 | +-->recvresult  | 
 | 87 | +-->closesession abort  | 
 | 88 | + | 
 | 89 | +EOF  | 
 | 90 | + | 
 | 91 | +--exec $MYSQLXTEST -u root  --file=$MYSQL_TMP_DIR/mysqlx-update_itemremove.tmp 2>&1  | 
 | 92 | + | 
 | 93 | +## Postamble  | 
 | 94 | +--remove_file $MYSQL_TMP_DIR/mysqlx-update_itemremove.tmp  | 
 | 95 | + | 
 | 96 | +uninstall plugin mysqlx;  | 
 | 97 | + | 
 | 98 | +DROP TABLE IF EXISTS coll;  | 
0 commit comments