Debian Codegraph @

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

raw
1 CREATE SCHEMA xtest;
2
3 Insert: doc with _id (literal)
4 ------------------------------
5
6 command ok
7
8 0 rows affected
9
10 1 rows affected
11 Got expected error (code 0)
12 doc
13 {"_id": "1", "one": 1}
14 0 rows affected
15
16 Insert: doc without _id (literal)
17 ---------------------------------
18
19 command ok
20
21 0 rows affected
22
23 1 rows affected
24 auto-generated id(s): 0000XXXXXXXX0000000000000001
25 Got expected error (code 0)
26 doc
27 {"_id": "0000XXXXXXXX0000000000000001", "two": 2}
28 0 rows affected
29
30 Insert: doc with _id (object)
31 -----------------------------
32
33 command ok
34
35 0 rows affected
36
37 1 rows affected
38 Got expected error (code 0)
39 doc
40 {"_id": "1", "one": 1}
41 0 rows affected
42
43 Insert: doc without _id (object)
44 --------------------------------
45
46 command ok
47
48 0 rows affected
49
50 1 rows affected
51 auto-generated id(s): 0000XXXXXXXX0000000000000002
52 Got expected error (code 0)
53 doc
54 {"_id": "0000XXXXXXXX0000000000000002", "two": 2}
55 0 rows affected
56
57 Insert: doc with _id (placeholder)
58 ----------------------------------
59
60 command ok
61
62 0 rows affected
63
64 1 rows affected
65 Got expected error (code 0)
66 doc
67 {"_id": "1", "one": 1}
68 0 rows affected
69
70 Insert: doc without _id (placeholder)
71 -------------------------------------
72
73 command ok
74
75 0 rows affected
76
77 1 rows affected
78 auto-generated id(s): 0000XXXXXXXX0000000000000003
79 Got expected error (code 0)
80 doc
81 {"_id": "0000XXXXXXXX0000000000000003", "two": 2}
82 0 rows affected
83
84 Insert: 2 doc without _id (literal)
85 -----------------------------------
86
87 command ok
88
89 0 rows affected
90
91 2 rows affected
92 auto-generated id(s): 0000XXXXXXXX0000000000000004,0000XXXXXXXX0000000000000005
93 Records: 2 Duplicates: 0 Warnings: 0
94 Got expected error (code 0)
95 doc
96 {"_id": "0000XXXXXXXX0000000000000004", "two": 2}
97 {"_id": "0000XXXXXXXX0000000000000005", "three": 3}
98 0 rows affected
99
100 Insert: 2 doc without _id (literal/object)
101 ------------------------------------------
102
103 command ok
104
105 0 rows affected
106
107 2 rows affected
108 auto-generated id(s): 0000XXXXXXXX0000000000000006,0000XXXXXXXX0000000000000007
109 Records: 2 Duplicates: 0 Warnings: 0
110 Got expected error (code 0)
111 doc
112 {"_id": "0000XXXXXXXX0000000000000006", "three": 3}
113 {"_id": "0000XXXXXXXX0000000000000007", "two": 2}
114 0 rows affected
115
116 Insert: 2 doc with/without _id (literal)
117 ----------------------------------------
118
119 command ok
120
121 0 rows affected
122
123 2 rows affected
124 auto-generated id(s): 0000XXXXXXXX0000000000000008
125 Records: 2 Duplicates: 0 Warnings: 0
126 Got expected error (code 0)
127 doc
128 {"_id": "0000XXXXXXXX0000000000000008", "three": 3}
129 {"_id": "1", "one": 1}
130 0 rows affected
131
132 Insert: 2 doc with/without _id (object)
133 ---------------------------------------
134
135 command ok
136
137 0 rows affected
138
139 2 rows affected
140 auto-generated id(s): 0000XXXXXXXX0000000000000009
141 Records: 2 Duplicates: 0 Warnings: 0
142 Got expected error (code 0)
143 doc
144 {"_id": "0000XXXXXXXX0000000000000009", "two": 2}
145 {"_id": "1", "one": 1}
146 0 rows affected
147
148 Insert: bad doc (literal) no insert
149 -----------------------------------
150
151 command ok
152
153 0 rows affected
154 Got expected error: Invalid JSON text: "not a JSON text, may need CAST" at position 0 in value for column 'coll.doc'. (code 3140)
155 doc
156 0 rows affected
157
158 Insert: 2 doc (literal) one bad, no insert
159 ------------------------------------------
160
161 command ok
162
163 0 rows affected
164 Got expected error: Invalid JSON text: "not a JSON text, may need CAST" at position 0 in value for column 'coll.doc'. (code 3140)
165 doc
166 0 rows affected
167
168 Insert: change of "unique_prefix"
169 ---------------------------------
170
171 0 rows affected
172
173 command ok
174
175 0 rows affected
176
177 2 rows affected
178 auto-generated id(s): 00ffXXXXXXXX000000000000000a,00ffXXXXXXXX000000000000000b
179 Records: 2 Duplicates: 0 Warnings: 0
180 Got expected error (code 0)
181 doc
182 {"_id": "00ffXXXXXXXX000000000000000a", "two": 2}
183 {"_id": "00ffXXXXXXXX000000000000000b", "three": 3}
184 0 rows affected
185
186 Insert: change of "auto_increment_increment"
187 --------------------------------------------
188
189 0 rows affected
190
191 command ok
192
193 0 rows affected
194
195 2 rows affected
196 auto-generated id(s): 00ffXXXXXXXX0000000000000101,00ffXXXXXXXX0000000000000201
197 Records: 2 Duplicates: 0 Warnings: 0
198 Got expected error (code 0)
199 doc
200 {"_id": "00ffXXXXXXXX0000000000000101", "two": 2}
201 {"_id": "00ffXXXXXXXX0000000000000201", "three": 3}
202 0 rows affected
203
204 Insert: change of "auto_increment_offset"
205 -----------------------------------------
206
207 0 rows affected
208
209 command ok
210
211 0 rows affected
212
213 2 rows affected
214 auto-generated id(s): 00ffXXXXXXXX0000000000000280,00ffXXXXXXXX0000000000000380
215 Records: 2 Duplicates: 0 Warnings: 0
216 Got expected error (code 0)
217 doc
218 {"_id": "00ffXXXXXXXX0000000000000280", "two": 2}
219 {"_id": "00ffXXXXXXXX0000000000000380", "three": 3}
220 0 rows affected
221
222 Insert: reset of "unique_prefix", "auto_increment_increment" and "auto_increment_offset"
223 ----------------------------------------------------------------------------------------
224
225 0 rows affected
226
227 0 rows affected
228
229 0 rows affected
230
231 command ok
232
233 0 rows affected
234
235 2 rows affected
236 auto-generated id(s): 0000XXXXXXXX0000000000000381,0000XXXXXXXX0000000000000382
237 Records: 2 Duplicates: 0 Warnings: 0
238 Got expected error (code 0)
239 doc
240 {"_id": "0000XXXXXXXX0000000000000381", "two": 2}
241 {"_id": "0000XXXXXXXX0000000000000382", "three": 3}
242 0 rows affected
243
244 Notice: insert doc with _id
245 ---------------------------
246
247 command ok
248
249 0 rows affected
250 Mysqlx.Notice.Frame {
251 type: 3
252 scope: LOCAL
253 payload: "Mysqlx.Notice.SessionStateChanged { param: ROWS_AFFECTED\nvalue {\n type: V_UINT\n v_unsigned_int: 1\n}\n }"
254 }
255
256 Mysqlx.Sql.StmtExecuteOk {
257 }
258
259
260 Notice: insert doc without _id
261 ------------------------------
262
263 command ok
264
265 0 rows affected
266 Mysqlx.Notice.Frame {
267 type: 3
268 scope: LOCAL
269 payload: "Mysqlx.Notice.SessionStateChanged { param: ROWS_AFFECTED\nvalue {\n type: V_UINT\n v_unsigned_int: 1\n}\n }"
270 }
271
272 Mysqlx.Notice.Frame {
273 type: 3
274 scope: LOCAL
275 payload: "Mysqlx.Notice.SessionStateChanged { param: GENERATED_DOCUMENT_IDS\nvalue {\n type: V_OCTETS\n v_octets {\n value: \"0000XXXXXXXX0000000000000383\"\n }\n}\n }"
276 }
277
278 Mysqlx.Sql.StmtExecuteOk {
279 }
280
281
282 Notice: insert 2 doc with/without _id
283 -------------------------------------
284
285 command ok
286
287 0 rows affected
288 Mysqlx.Notice.Frame {
289 type: 3
290 scope: LOCAL
291 payload: "Mysqlx.Notice.SessionStateChanged { param: PRODUCED_MESSAGE\nvalue {\n type: V_STRING\n v_string {\n value: \"Records: 2 Duplicates: 0 Warnings: 0\"\n }\n}\n }"
292 }
293
294 Mysqlx.Notice.Frame {
295 type: 3
296 scope: LOCAL
297 payload: "Mysqlx.Notice.SessionStateChanged { param: ROWS_AFFECTED\nvalue {\n type: V_UINT\n v_unsigned_int: 2\n}\n }"
298 }
299
300 Mysqlx.Notice.Frame {
301 type: 3
302 scope: LOCAL
303 payload: "Mysqlx.Notice.SessionStateChanged { param: GENERATED_DOCUMENT_IDS\nvalue {\n type: V_OCTETS\n v_octets {\n value: \"0000XXXXXXXX0000000000000384\"\n }\n}\n }"
304 }
305
306 Mysqlx.Sql.StmtExecuteOk {
307 }
308
309
310 Notice: insert 2 doc without _id
311 --------------------------------
312
313 command ok
314
315 0 rows affected
316 Mysqlx.Notice.Frame {
317 type: 3
318 scope: LOCAL
319 payload: "Mysqlx.Notice.SessionStateChanged { param: PRODUCED_MESSAGE\nvalue {\n type: V_STRING\n v_string {\n value: \"Records: 2 Duplicates: 0 Warnings: 0\"\n }\n}\n }"
320 }
321
322 Mysqlx.Notice.Frame {
323 type: 3
324 scope: LOCAL
325 payload: "Mysqlx.Notice.SessionStateChanged { param: ROWS_AFFECTED\nvalue {\n type: V_UINT\n v_unsigned_int: 2\n}\n }"
326 }
327
328 Mysqlx.Notice.Frame {
329 type: 3
330 scope: LOCAL
331 payload: "Mysqlx.Notice.SessionStateChanged { param: GENERATED_DOCUMENT_IDS\nvalue {\n type: V_OCTETS\n v_octets {\n value: \"0000XXXXXXXX0000000000000385\"\n }\n}\nvalue {\n type: V_OCTETS\n v_octets {\n value: \"0000XXXXXXXX0000000000000386\"\n }\n}\n }"
332 }
333
334 Mysqlx.Sql.StmtExecuteOk {
335 }
336
337
338 Notice: insert bad doc
339 ----------------------
340
341 command ok
342
343 0 rows affected
344 Mysqlx.Error {
345 severity: ERROR
346 code: 3140
347 msg: "Invalid JSON text: \"not a JSON text, may need CAST\" at position 0 in value for column \'coll.doc\'."
348 sql_state: "22032"
349 }
350
351 Mysqlx.Ok {
352 msg: "bye!"
353 }
354 ok
355 set global mysqlx_document_id_unique_prefix = DEFAULT;