48 lines
1.5 KiB
Plaintext
48 lines
1.5 KiB
Plaintext
## generated
|
|
## Doc: Insert a valid document with a bogus projection
|
|
|
|
--source include/xplugin_preamble.inc
|
|
--source include/xplugin_create_user.inc
|
|
|
|
create schema xtest default charset='utf8mb4';
|
|
|
|
## Test starts here
|
|
--write_file $MYSQL_TMP_DIR/insert_doc_bad_proj.tmp
|
|
## Test data
|
|
|
|
-->stmtadmin create_collection {"schema":"xtest","name":"mycoll"}
|
|
-->recvresult
|
|
|
|
Mysqlx.Crud.Insert {
|
|
collection {
|
|
name: "mycoll"
|
|
schema: "xtest"
|
|
}
|
|
data_model: DOCUMENT
|
|
projection {
|
|
name: "whatever"
|
|
}
|
|
row {
|
|
field {
|
|
type: LITERAL
|
|
literal {
|
|
type: V_STRING
|
|
v_string {
|
|
value: "\n{\n \"_id\": \"X999_Y999\",\n \"from\": {\n \"name\": \"Tom Brady\", \"id\": \"X12\"\n },\n \"message\": \"Looking forward to 2010!\",\n \"actions\": [\n {\n \"name\": \"Comment\",\n \"link\": \"http://www.facebook.com/X999/posts/Y999\"\n },\n {\n \"name\": \"Like\",\n \"link\": \"http://www.facebook.com/X999/posts/Y999\"\n }\n ],\n \"type\": \"status\",\n \"created_time\": \"2010-08-02T21:27:44+0000\",\n \"updated_time\": \"2010-08-02T21:27:44+0000\"\n }\n"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
## expect Mysqlx.Error
|
|
-->recv
|
|
EOF
|
|
|
|
--exec $MYSQLXTEST -ux_root --password='' --file=$MYSQL_TMP_DIR/insert_doc_bad_proj.tmp 2>&1
|
|
|
|
## Cleanup
|
|
drop schema if exists xtest;
|
|
--remove_file $MYSQL_TMP_DIR/insert_doc_bad_proj.tmp
|
|
--source include/xplugin_drop_user.inc
|