Debian Codegraph @

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

raw
1 CREATE SCHEMA xtest;
2
3 Update by ARRAY_APPEND
4 ======================
5
6 1 rows affected
7 Rows matched: 1 Changed: 1 Warnings: 0
8 Got expected error (code 0)
9
10 Update by ARRAY_INSERT
11 ======================
12
13 1 rows affected
14 Rows matched: 1 Changed: 1 Warnings: 0
15 Got expected error (code 0)
16
17 Update by ARRAY_INSERT (invalid path)
18 =====================================
19 Got expected error: A path expression is not a path to a cell in an array. (code 3165)
20
21 Update by ITEM_REPLACE
22 ======================
23
24 1 rows affected
25 Rows matched: 1 Changed: 1 Warnings: 0
26 Got expected error (code 0)
27
28 Update by ITEM_REPLACE non-existing member
29 ==========================================
30
31 0 rows affected
32 Rows matched: 1 Changed: 0 Warnings: 0
33 Got expected error (code 0)
34
35 ITEM_SET to NULL
36 ================
37
38 1 rows affected
39 Rows matched: 1 Changed: 1 Warnings: 0
40 Got expected error (code 0)
41
42 Update by ITEM_SET twice
43 ========================
44
45 1 rows affected
46 Rows matched: 1 Changed: 1 Warnings: 0
47 Got expected error (code 0)
48
49 Update by ITEM_SET non-existing member
50 ======================================
51
52 1 rows affected
53 Rows matched: 1 Changed: 1 Warnings: 0
54 Got expected error (code 0)
55
56 Update a valid document by _id (from field)
57 ===========================================
58
59 1 rows affected
60 Rows matched: 1 Changed: 1 Warnings: 0
61 Got expected error (code 0)
62
63 Update document with illegal _id change
64 =======================================
65 Got expected error: Forbidden update operation on '$._id' member (code 5053)
66
67 Update non-existing document
68 ============================
69
70 0 rows affected
71 Rows matched: 0 Changed: 0 Warnings: 0
72 Got expected error (code 0)
73
74 Update multiple documents
75 =========================
76 doc
77 {"_id": "1", "name": "banana", "price": 1.2}
78 {"_id": "2", "name": "apple", "price": 0.25}
79 {"_id": "3", "name": "tomato", "price": 1.8}
80 {"_id": "4", "name": "mango", "price": 3.14}
81 {"_id": "5", "name": "mango", "price": 0.9, "origin": ["mexico", "philippines"]}
82 command ok
83
84 4 rows affected
85 Rows matched: 4 Changed: 4 Warnings: 0
86 Got expected error (code 0)
87 doc
88 {"_id": "1", "name": "lemon", "price": 1.2}
89 {"_id": "2", "name": "lemon", "price": 0.25}
90 {"_id": "3", "name": "lemon", "price": 1.8}
91 {"_id": "4", "name": "lemon", "price": 3.14}
92 {"_id": "5", "name": "mango", "price": 0.9, "origin": ["mexico", "philippines"]}
93 command ok
94
95 Update on an invalid schema (bad)
96 =================================
97
98 1 rows affected
99 Got expected error: Table 'ytest.coll' doesn't exist (code 1146)
100
101 0 rows affected
102
103 Update on an invalid collection (bad)
104 =====================================
105 Got expected error: Table 'xtest.no_coll' doesn't exist (code 1146)
106
107 Update member with column (bad)
108 ===============================
109 Got expected error: Invalid column name to update (code 5052)
110
111 Update member with table name (bad)
112 ===================================
113 Got expected error: Invalid column name to update (code 5052)
114
115 Update member with schema name (bad)
116 ====================================
117 Got expected error: Invalid column name to update (code 5052)
118
119 Update by SET (not allowed)
120 ===========================
121 Got expected error: Invalid type of update operation for document (code 5051)
122
123 Update by ITEM_REMOVE
124 =====================
125
126 1 rows affected
127 Rows matched: 1 Changed: 1 Warnings: 0
128 Got expected error (code 0)
129
130 Multiple chained operations
131 ===========================
132
133 1 rows affected
134 Rows matched: 1 Changed: 1 Warnings: 0
135 Got expected error (code 0)
136
137 Merge with another document
138 ===========================
139
140 1 rows affected
141 Rows matched: 1 Changed: 1 Warnings: 0
142 Got expected error (code 0)
143
144 Merge with another document containing _id
145 ==========================================
146
147 1 rows affected
148 Rows matched: 1 Changed: 1 Warnings: 0
149 Got expected error (code 0)
150
151 Merge with another document containing _id (differ root)
152 ========================================================
153
154 1 rows affected
155 Rows matched: 1 Changed: 1 Warnings: 0
156 Got expected error (code 0)
157
158 Set item and merge with another document
159 ========================================
160
161 1 rows affected
162 Rows matched: 1 Changed: 1 Warnings: 0
163 Got expected error (code 0)
164
165 Merge with another document and set item
166 ========================================
167
168 1 rows affected
169 Rows matched: 1 Changed: 1 Warnings: 0
170 Got expected error (code 0)
171
172 Merge with NULL
173 ===============
174 Got expected error: Document is missing a required field (code 5115)
175
176 Merge with non-document
177 =======================
178 Got expected error: Document is missing a required field (code 5115)
179
180 Merge with two documents
181 ========================
182 doc
183 {"_id": "1", "name": "banana", "price": 1.2}
184 command ok
185
186 1 rows affected
187 Rows matched: 1 Changed: 1 Warnings: 0
188 Got expected error (code 0)
189
190 Merge with numeric literal
191 ==========================
192 Got expected error: Invalid data for update operation on document collection table (code 5050)
193
194 Replace entire document (by empty source)
195 =========================================
196
197 1 rows affected
198 Rows matched: 1 Changed: 1 Warnings: 0
199 Got expected error (code 0)
200
201 Replace entire document (by member)
202 ===================================
203
204 1 rows affected
205 Rows matched: 1 Changed: 1 Warnings: 0
206 Got expected error (code 0)
207
208 Replace entire document, no _id (by member)
209 ===========================================
210
211 1 rows affected
212 Rows matched: 1 Changed: 1 Warnings: 0
213 Got expected error (code 0)
214
215 Replace entire document by NULL
216 ===============================
217 Got expected error: Document is missing a required field (code 5115)
218
219 Set entire document (by empty source)
220 =====================================
221
222 1 rows affected
223 Rows matched: 1 Changed: 1 Warnings: 0
224 Got expected error (code 0)
225
226 Set entire document (by member)
227 ===============================
228
229 1 rows affected
230 Rows matched: 1 Changed: 1 Warnings: 0
231 Got expected error (code 0)
232
233 Set entire document, no _id (by member)
234 =======================================
235 doc
236 {"_id": "1", "name": "banana", "price": 1.2}
237 command ok
238
239 1 rows affected
240 Rows matched: 1 Changed: 1 Warnings: 0
241 Got expected error (code 0)
242
243 Set entire document to NULL
244 ===========================
245 Got expected error: Document is missing a required field (code 5115)
246
247 Merge literal to member
248 =======================
249 Got expected error: Unexpected source for ITEM_MERGE operation (code 5050)
250
251 Merge document to sub-document
252 ==============================
253 Got expected error: Unexpected source for ITEM_MERGE operation (code 5050)
254
255 Merge document to member
256 ========================
257 Got expected error: Unexpected source for ITEM_MERGE operation (code 5050)
258
259 Merge document to member of array
260 =================================
261 Got expected error: Unexpected source for ITEM_MERGE operation (code 5050)
262 Mysqlx.Ok {
263 msg: "bye!"
264 }
265 ok