Debian Codegraph @

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

raw
1 ## Tests for mysqlx status variables.
2
3 ## Preamble
4 --source include/xplugin_preamble.inc
5 --source include/xplugin_create_user.inc
6
7 # Tests
8
9 --write_file $MYSQL_TMP_DIR/xpl_status_vars.xpl
10 -->sql
11 DROP SCHEMA IF EXISTS xtest;
12 CREATE SCHEMA xtest;
13 CREATE TABLE xtest.xtable (xcolumn VARCHAR(20));
14 SHOW STATUS LIKE 'Mysqlx_sessions';
15 SHOW STATUS LIKE 'Mysqlx_crud_insert';
16 -->endsql
17 Mysqlx.Crud.Insert {
18 collection {
19 name: "xtable"
20 schema: "xtest"
21 }
22 data_model: TABLE
23 projection {
24 name: "xcolumn"
25 }
26 row {
27 field {
28 type: LITERAL
29 literal {
30 type: V_STRING
31 v_string {
32 value: "xstring"
33 }
34 }
35 }
36 }
37 }
38 -->recvresult
39 -->sql
40 SHOW STATUS LIKE 'Mysqlx_crud_insert';
41 SHOW STATUS LIKE 'Mysqlx_crud_find';
42 -->endsql
43 Mysqlx.Crud.Find {
44 collection {
45 name: "xtable"
46 schema: "xtest"
47 }
48 data_model: TABLE
49 }
50 -->recvresult
51 -->sql
52 SHOW STATUS LIKE 'Mysqlx_crud_find';
53 SHOW STATUS LIKE 'Mysqlx_crud_update';
54 -->endsql
55 Mysqlx.Crud.Update {
56 collection {
57 name: "xtable"
58 schema: "xtest"
59 }
60 data_model: TABLE
61 criteria {
62 type: OPERATOR
63 operator {
64 name: "=="
65 param {
66 type: IDENT
67 identifier {
68 name: "xcolumn"
69 }
70 }
71 param {
72 type: LITERAL
73 literal {
74 type: V_OCTETS
75 v_octets {value:"xstring"}
76 }
77 }
78 }
79 }
80 operation {
81 source {
82 name: "xcolumn"
83 }
84 operation: SET
85 value {
86 type: LITERAL
87 literal {
88 type: V_STRING
89 v_string {
90 value: "updated_xstring"
91 }
92 }
93 }
94 }
95 }
96 -->recvresult
97 -->sql
98 SHOW STATUS LIKE 'Mysqlx_crud_update';
99 SHOW STATUS LIKE 'Mysqlx_crud_delete';
100 -->endsql
101 Mysqlx.Crud.Delete {
102 collection {
103 name: "xtable"
104 schema: "xtest"
105 }
106 data_model: TABLE
107 criteria {
108 type: OPERATOR
109 operator {
110 name: "=="
111 param {
112 type: IDENT
113 identifier {
114 name: "xcolumn"
115 }
116 }
117 param {
118 type: LITERAL
119 literal {
120 type: V_OCTETS
121 v_octets {value:"updated_xstring"}
122 }
123 }
124 }
125 }
126 }
127 -->recvresult
128 -->sql
129 SHOW STATUS LIKE 'Mysqlx_crud_delete';
130 SHOW STATUS LIKE 'Mysqlx_stmt_execute_%';
131 -->endsql
132 Mysqlx.Sql.StmtExecute {
133 stmt: "SELECT COUNT(*) FROM xtest.xtable"
134 }
135 -->recvresult
136 -->sql
137 SHOW STATUS LIKE 'Mysqlx_stmt_execute_%';
138 DROP SCHEMA IF EXISTS xtest;
139 -->endsql
140 EOF
141
142 --exec $MYSQLXTEST -ux_root --password='' --file=$MYSQL_TMP_DIR/xpl_status_vars.xpl 2>&1
143
144 ## Cleanup
145 --source ../include/xplugin_cleanup.inc