1## generated
2## Rel: Attempt to break identifier quoting
3
4--source ../include/xplugin_preamble.inc
5## Test starts here
6--write_file $MYSQL_TMP_DIR/insert_table_escape_identifier.tmp
7## Test data
8-->sql
9drop schema if exists xtest;
10create schema xtest default charset='utf8mb4';
11use xtest;
12create table mycoll (doc JSON, _id VARBINARY(16) GENERATED ALWAYS AS (json_unquote(json_extract(doc, '$._id'))) stored PRIMARY KEY);
13create table mytable (i int NOT NULL, ui int unsigned, vc varchar(100), f float, d double, dt datetime, ts timestamp(5), j json);
14create table ` .'"````\\` (` .'"````\\` int);
15-->endsql
16Mysqlx.Crud.Insert {
17  collection {
18    name: " .\'\"``\\\\"
19    schema: "xtest"
20  }
21  data_model: TABLE
22  projection {
23    name: " .\'\"``\\\\"
24    alias: " .\'\"``\\\\"
25  }
26  row {
27    field {
28      type: LITERAL
29      literal {
30        type: V_SINT
31        v_signed_int: 1
32      }
33    }
34  }
35}
36
37## expect Mysqlx.Sql.StmtExecuteOk
38-->recvresult
39
40## Cleanup
41-->sql
42drop schema if exists xtest;
43-->endsql
44EOF
45
46--exec $MYSQLXTEST -uroot --password='' --file=$MYSQL_TMP_DIR/insert_table_escape_identifier.tmp 2>&1
47--remove_file $MYSQL_TMP_DIR/insert_table_escape_identifier.tmp
48
49## Postamble
50uninstall plugin mysqlx;
51