Debian Codegraph @

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

raw
1 ## generated
2 ## Doc: Insert a valid document without _id
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_noid.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 row {
23 field {
24 type: LITERAL
25 literal {
26 type: V_STRING
27 v_string {
28 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"
29 }
30 }
31 }
32 }
33 }
34
35 -->recvresult
36 EOF
37
38 --replace_regex /([0-9a-f]{4})[0-9a-f]{8}([0-9a-f]{16})/\1XXXXXXXX\2/
39 --exec $MYSQLXTEST -ux_root --password='' --file=$MYSQL_TMP_DIR/insert_doc_noid.xpl 2>&1
40
41 ## Cleanup
42 --source ../include/xplugin_cleanup.inc