Debian Codegraph @

mysql-test/suite/x/t/insert_doc_bad_proj.test

raw
1 ## generated
2 ## Doc: Insert a valid document with a bogus projection
3
4 --source include/xplugin_preamble.inc
5 --source include/xplugin_create_user.inc
6
7 create schema xtest default charset='utf8mb4';
8
9 ## Test starts here
10 --write_file $MYSQL_TMP_DIR/insert_doc_bad_proj.xpl
11 ## Test data
12
13 -->stmtadmin create_collection {"schema":"xtest","name":"mycoll"}
14 -->recvresult
15
16 Mysqlx.Crud.Insert {
17 collection {
18 name: "mycoll"
19 schema: "xtest"
20 }
21 data_model: DOCUMENT
22 projection {
23 name: "whatever"
24 }
25 row {
26 field {
27 type: LITERAL
28 literal {
29 type: V_STRING
30 v_string {
31 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"
32 }
33 }
34 }
35 }
36 }
37
38 ## expect Mysqlx.Error
39 -->recv
40 EOF
41
42 --exec $MYSQLXTEST -ux_root --password='' --file=$MYSQL_TMP_DIR/insert_doc_bad_proj.xpl 2>&1
43
44 ## Cleanup
45 --source ../include/xplugin_cleanup.inc