Current Path : /home/usr.opt/mysql57/mysql-test/suite/x/t/ |
FreeBSD hs32.drive.ne.jp 9.1-RELEASE FreeBSD 9.1-RELEASE #1: Wed Jan 14 12:18:08 JST 2015 root@hs32.drive.ne.jp:/sys/amd64/compile/hs32 amd64 |
Current File : //home/usr.opt/mysql57/mysql-test/suite/x/t/message_protobuf_nested.test |
## Preamble --source ../include/xplugin_preamble.inc ## TEST STARTS HERE --write_file $MYSQL_TMP_DIR/mysqlx-update_itemremove.tmp -->stmtadmin create_collection {"schema":"test", "name":"coll"} -->recvresult ## It tests the limits of protobuf, we do not need any data in the collection # # Number of protobuf object should be calculated from following equation # NUMBER_OF_OBJECTS = 2 * NUMBER_OF_OBJECTS_TO_NEST # -->macro Send_crud_find_with_repeated_nested_objects %OBJECTS_TO_NEST% -->varlet %NESTED_OBJECTS% -->varlet %OBJECTS_TO_REPEAT% %OBJECTS_TO_NEST% -->varinc %OBJECTS_TO_REPEAT% -3 -->repeat %OBJECTS_TO_REPEAT% %ITERATION% -->varlet %OBJECT_NUMBER% %ITERATION% -->varinc %OBJECT_NUMBER% 4 -->varlet %NESTED_OBJECTS% %NESTED_OBJECTS% value { type: ARRAY array { value { type: LITERAL literal { type: V_SINT v_signed_int: %OBJECT_NUMBER% } } -->endrepeat -->repeat %OBJECTS_TO_REPEAT% -->varlet %NESTED_OBJECTS% %NESTED_OBJECTS% } } -->endrepeat -->quiet Mysqlx.Crud.Find { collection { name: "coll" schema: "test" } data_model: DOCUMENT criteria { type: OPERATOR operator { name: "==" param { type: IDENT identifier { document_path { type: MEMBER value: "ARR0" } } } param { type: ARRAY array { value { type: LITERAL literal { type: V_SINT v_signed_int: 3 } } %NESTED_OBJECTS% } } } } } -->noquiet -->endmacro ## Current recursion limit is set to 100 ## each repeated message in bellow macro contains two messages ## (it increases the current depth by 2) -->newsession test_different_messages1 root -->echo Try to send number of objects less then X Protocol limit, 50 (2 * 25) -->callmacro Send_crud_find_with_repeated_nested_objects 25 -->recvresult -->echo Try to send number of objects equal to the X Protocol limit, 100 (2 * 50) -->callmacro Send_crud_find_with_repeated_nested_objects 50 -->recvresult -->echo Try to send number of object more than the X Protocol limit 101 (2 * 51) -->callmacro Send_crud_find_with_repeated_nested_objects 51 -->expecterror 5000 -->recvresult # # After error 5000, connection is disconnected by the X Plugin, abort the client connection # it is in invalid state -->closesession abort EOF --exec $MYSQLXTEST -u root --file=$MYSQL_TMP_DIR/mysqlx-update_itemremove.tmp 2>&1 ## Postamble --remove_file $MYSQL_TMP_DIR/mysqlx-update_itemremove.tmp uninstall plugin mysqlx; DROP TABLE IF EXISTS coll;