Debian Codegraph @

mysql-test/suite/x/r/find_doc_proj.result

raw
1 create schema xtest default charset 'utf8mb4';
2
3 command ok
4
5 command ok
6 RUN use xtest
7
8 0 rows affected
9 RUN insert into mycoll (doc) values ('{"_id": "1", "name": "Joe1"}')
10
11 1 rows affected
12 RUN insert into mycoll (doc) values ('{"_id": "2", "name": "Joe2", "last_name": "Smith"}')
13
14 1 rows affected
15 RUN insert into mycoll (doc) values ('{"_id": "3", "name": "Joe2", "last_name": "Shmo"}')
16
17 1 rows affected
18 RUN insert into mycoll (doc) values ('{"_id": "4", "name": "小島", "last_name": "Bla"}')
19
20 1 rows affected
21 RUN insert into funkycoll (doc) values ('{"_id": "1", "I love \\\"\'quotes\'\\\"\\n": "I love \\\"\'quotes\'\\\"\\n"}')
22
23 1 rows affected
24 RUN insert into funkycoll (doc) values ('{"_id": "2", "I love \\\"\'quotes\'\\\"\\n": "\\\",$.array[2]\\\\\\\""}')
25
26 1 rows affected
27 RUN insert into funkycoll (doc) values ('{"_id": "3", "\\\",$.array[2]\\\\\\\"": "I love \\\"\'quotes\'\\\"\\n"}')
28
29 1 rows affected
30 RUN insert into funkycoll (doc) values ('{"_id": "4", "\\\",$.array[2]\\\\\\\"": "\\\",$.array[2]\\\\\\\""}')
31
32 1 rows affected
33 send Mysqlx.Crud.Find {
34 collection {
35 name: "mycoll"
36 schema: "xtest"
37 }
38 data_model: DOCUMENT
39 projection {
40 source {
41 type: IDENT
42 identifier {
43 document_path {
44 type: MEMBER
45 value: "name"
46 }
47 }
48 }
49 alias: "Name"
50 }
51 }
52
53 Mysqlx.Resultset.ColumnMetaData {
54 type: BYTES
55 name: "doc"
56 original_name: ""
57 table: ""
58 original_table: ""
59 schema: ""
60 catalog: "def"
61 collation: 46
62 length: 4294967295
63 content_type: 2
64 }
65
66 Mysqlx.Resultset.Row {
67 field: "{\"Name\": \"Joe1\"}\000"
68 }
69
70 Mysqlx.Resultset.Row {
71 field: "{\"Name\": \"Joe2\"}\000"
72 }
73
74 Mysqlx.Resultset.Row {
75 field: "{\"Name\": \"Joe2\"}\000"
76 }
77
78 Mysqlx.Resultset.Row {
79 field: "{\"Name\": \"\345\260\217\345\263\266\"}\000"
80 }
81
82 Mysqlx.Resultset.FetchDone {
83 }
84
85 Mysqlx.Sql.StmtExecuteOk {
86 }
87
88 send Mysqlx.Crud.Find {
89 collection {
90 name: "funkycoll"
91 schema: "xtest"
92 }
93 data_model: DOCUMENT
94 projection {
95 source {
96 type: IDENT
97 identifier {
98 document_path {
99 type: MEMBER
100 value: "I love \"\'quotes\'\"\n"
101 }
102 }
103 }
104 alias: "key"
105 }
106 projection {
107 source {
108 type: IDENT
109 identifier {
110 document_path {
111 type: MEMBER
112 value: "_id"
113 }
114 }
115 }
116 alias: "\"\'"
117 }
118 }
119
120 Mysqlx.Resultset.ColumnMetaData {
121 type: BYTES
122 name: "doc"
123 original_name: ""
124 table: ""
125 original_table: ""
126 schema: ""
127 catalog: "def"
128 collation: 46
129 length: 4294967295
130 content_type: 2
131 }
132
133 Mysqlx.Resultset.Row {
134 field: "{\"\\\"\'\": \"1\", \"key\": \"I love \\\"\'quotes\'\\\"\\n\"}\000"
135 }
136
137 Mysqlx.Resultset.Row {
138 field: "{\"\\\"\'\": \"2\", \"key\": \"\\\",$.array[2]\\\\\\\"\"}\000"
139 }
140
141 Mysqlx.Resultset.Row {
142 field: "{\"\\\"\'\": \"3\", \"key\": null}\000"
143 }
144
145 Mysqlx.Resultset.Row {
146 field: "{\"\\\"\'\": \"4\", \"key\": null}\000"
147 }
148
149 Mysqlx.Resultset.FetchDone {
150 }
151
152 Mysqlx.Sql.StmtExecuteOk {
153 }
154
155 send Mysqlx.Crud.Find {
156 collection {
157 name: "funkycoll"
158 schema: "xtest"
159 }
160 data_model: DOCUMENT
161 projection {
162 source {
163 type: IDENT
164 identifier {
165 document_path {
166 type: MEMBER
167 value: "I love \"\'quotes\'\"\n\\/\010\014\r\t"
168 }
169 }
170 }
171 alias: "I love \"\'quotes\'\"\n"
172 }
173 projection {
174 source {
175 type: IDENT
176 identifier {
177 document_path {
178 type: MEMBER
179 value: "_id"
180 }
181 }
182 }
183 alias: "\"\'"
184 }
185 limit {
186 row_count: 1
187 offset: 2
188 }
189 }
190
191 Mysqlx.Resultset.ColumnMetaData {
192 type: BYTES
193 name: "doc"
194 original_name: ""
195 table: ""
196 original_table: ""
197 schema: ""
198 catalog: "def"
199 collation: 46
200 length: 4294967295
201 content_type: 2
202 }
203
204 Mysqlx.Resultset.Row {
205 field: "{\"\\\"\'\": \"3\", \"I love \\\"\'quotes\'\\\"\\n\": null}\000"
206 }
207
208 Mysqlx.Resultset.FetchDone {
209 }
210
211 Mysqlx.Sql.StmtExecuteOk {
212 }
213
214 send Mysqlx.Crud.Find {
215 collection {
216 name: "mycoll"
217 schema: "xtest"
218 }
219 data_model: DOCUMENT
220 projection {
221 source {
222 type: IDENT
223 identifier {
224 document_path {
225 type: MEMBER
226 value: "name"
227 }
228 }
229 }
230 alias: "name"
231 }
232 projection {
233 source {
234 type: IDENT
235 identifier {
236 document_path {
237 type: MEMBER
238 value: "last_name"
239 }
240 }
241 }
242 alias: "last_name"
243 }
244 }
245
246 Mysqlx.Resultset.ColumnMetaData {
247 type: BYTES
248 name: "doc"
249 original_name: ""
250 table: ""
251 original_table: ""
252 schema: ""
253 catalog: "def"
254 collation: 46
255 length: 4294967295
256 content_type: 2
257 }
258
259 Mysqlx.Resultset.Row {
260 field: "{\"name\": \"Joe1\", \"last_name\": null}\000"
261 }
262
263 Mysqlx.Resultset.Row {
264 field: "{\"name\": \"Joe2\", \"last_name\": \"Smith\"}\000"
265 }
266
267 Mysqlx.Resultset.Row {
268 field: "{\"name\": \"Joe2\", \"last_name\": \"Shmo\"}\000"
269 }
270
271 Mysqlx.Resultset.Row {
272 field: "{\"name\": \"\345\260\217\345\263\266\", \"last_name\": \"Bla\"}\000"
273 }
274
275 Mysqlx.Resultset.FetchDone {
276 }
277
278 Mysqlx.Sql.StmtExecuteOk {
279 }
280
281 send Mysqlx.Crud.Find {
282 collection {
283 name: "mycoll"
284 schema: "xtest"
285 }
286 data_model: DOCUMENT
287 projection {
288 source {
289 type: OBJECT
290 object {
291 fld {
292 key: "X"
293 value {
294 type: OPERATOR
295 operator {
296 name: "-"
297 param {
298 type: OPERATOR
299 operator {
300 name: "cast"
301 param {
302 type: LITERAL
303 literal {
304 type: V_SINT
305 v_signed_int: 0
306 }
307 }
308 param {
309 type: LITERAL
310 literal {
311 type: V_OCTETS
312 v_octets {
313 value: "UNSIGNED"
314 }
315 }
316 }
317 }
318 }
319 param {
320 type: LITERAL
321 literal {
322 type: V_SINT
323 v_signed_int: 1
324 }
325 }
326 }
327 }
328 }
329 }
330 }
331 }
332 }
333
334 Got expected error: BIGINT UNSIGNED value is out of range in '(cast(0 as unsigned) - 1)' (code 1690)
335 Mysqlx.Ok {
336 msg: "bye!"
337 }
338 ok