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/admin_create_index_string_mysqlx.test |
## generated --source ../include/xplugin_preamble.inc ## Test starts here CREATE SCHEMA xtest DEFAULT CHARSET 'utf8mb4'; --let $xtest_file= $MYSQL_TMP_DIR/admin_create_index_string_mysqlx.tmp --write_file $xtest_file -->quiet ## Test data -->stmtadmin create_collection {"schema":"xtest", "name":"books1"} -->recvresult -->macro Insert %COLL% %VALUE% %ERROR% Mysqlx.Crud.Insert { collection { name: "%COLL%" schema: "xtest" } data_model: DOCUMENT row { field { type: LITERAL literal { type: V_STRING v_string { value: %VALUE% } } } } } -->expecterror %ERROR% -->recvresult -->endmacro -->macro Create_index %INDEX% %UNIQUE% %DOCUMENT_PATH% %TYPE% %REQUIRED% %ERROR% -->stmtadmin create_collection_index {"schema":"xtest", "collection":"books1", "name": %INDEX%, "unique": %UNIQUE%, "constraint":{"member": %DOCUMENT_PATH%, "type": %TYPE%,"required": %REQUIRED%}} -->expecterror %ERROR% -->recvresult -->endmacro -->callmacro Create_index "isbn" true "$.isbn" "TEXT(13)" false ER_SUCCESS -->callmacro Insert books1 '{"_id": "one", "name": "The Bla", "isbn" : "9780262527804", "pages":30}' ER_SUCCESS -->callmacro Insert books1 '{"_id": "two", "name": "The Bla II", "isbn" : "9780262527805"}' ER_SUCCESS -->callmacro Insert books1 '{"_id": "three", "name": "The Bla III"}' ER_SUCCESS -->callmacro Create_index "pages" true "$.pages" "INT" true ER_X_DOC_REQUIRED_FIELD_MISSING -->callmacro Create_index "name" true "$.name" "TEXT(80)" true ER_SUCCESS -->callmacro Create_index "another name" true "$.name" "TEXT(80)" true ER_SUCCESS -->callmacro Insert books1 '{"_id": "four", "isbn": "9780262527809"}' ER_X_DOC_ID_MISSING -->callmacro Create_index "datetime`;drop table" false "$.data.datetime" "DATETIME" false ER_SUCCESS -->callmacro Create_index "_id" false "$.data.datetime" "DATETIME" false ER_SUCCESS -->callmacro Create_index "aaa" true "$.da\ta.da\tetime" "DATETIME" false ER_X_CMD_ARGUMENT_VALUE -->callmacro Create_index "" false "$.data.datetime" "DATETIME" false ER_X_CMD_ARGUMENT_VALUE -->callmacro Create_index "aaa" false "$.data.datetime" "text(20);drop table" false ER_X_CMD_ARGUMENT_VALUE -->callmacro Create_index "aaa" false "$.data.datetime" "varchar(20)" false ER_X_CMD_ARGUMENT_VALUE -->callmacro Create_index "aaa" false "$.data!datetime" "INT" false ER_INVALID_JSON_PATH -->callmacro Create_index "aaa" false "$.data' foo" "INT" false ER_X_CMD_ARGUMENT_VALUE -->callmacro Create_index "aaa" false "data.datetime" "INT" false ER_X_CMD_ARGUMENT_VALUE -->stmtadmin create_collection {"schema":"xtest", "name":"books0"} -->recvresult -->callmacro Insert books0 '{"_id": "one", "name": "The Bla", "isbn" : "9780262527804", "pages":30}' ER_SUCCESS -->callmacro Insert books0 '{"_id": "two", "name": "The Bla Bla", "isbn" : "1280262527804", "pages":50}' ER_SUCCESS -->stmtadmin create_collection_index {"schema":"xtest", "collection":"books0", "name":"mix", "unique":true, "constraint":[{"member":"$.isbn", "type":"TEXT(80)", "required":false}, {"member":"$.pages", "type":"INT", "required":false}]} -->recvresult -->stmtsql show create table xtest.books0 -->recvresult EOF --exec $MYSQLXTEST -uroot --password='' --file=$xtest_file 2>&1 --remove_file $xtest_file ## Postamble DROP SCHEMA IF EXISTS xtest; UNINSTALL PLUGIN mysqlx;