127
144
in rec or update */
128
145
dict_index_t* index, /* in: index */
129
146
const ulint* offsets,/* in: rec_get_offsets(rec, index) */
130
upd_t* update);/* in: update vector */
147
const upd_t* update);/* in: update vector */
131
148
/***************************************************************
132
149
Replaces the new column values stored in the update vector to the record
133
given. No field size changes are allowed. This function is used only for
150
given. No field size changes are allowed. */
137
153
row_upd_rec_in_place(
138
154
/*=================*/
139
155
rec_t* rec, /* in/out: record where replaced */
156
dict_index_t* index, /* in: the index the record belongs to */
140
157
const ulint* offsets,/* in: array returned by rec_get_offsets() */
141
upd_t* update);/* in: update vector */
158
const upd_t* update, /* in: update vector */
159
page_zip_des_t* page_zip);/* in: compressed page with enough space
160
available, or NULL */
142
161
/*******************************************************************
143
162
Builds an update vector from those fields which in a secondary index entry
144
163
differ from a record that has the equal ordering fields. NOTE: we compare
145
164
the fields as binary strings! */
148
167
row_upd_build_sec_rec_difference_binary(
149
168
/*====================================*/
150
169
/* out, own: update vector of differing
152
171
dict_index_t* index, /* in: index */
153
dtuple_t* entry, /* in: entry to insert */
154
rec_t* rec, /* in: secondary index record */
172
const dtuple_t* entry, /* in: entry to insert */
173
const rec_t* rec, /* in: secondary index record */
155
174
trx_t* trx, /* in: transaction */
156
175
mem_heap_t* heap); /* in: memory heap from which allocated */
157
176
/*******************************************************************
158
177
Builds an update vector from those fields, excluding the roll ptr and
159
178
trx id fields, which in an index entry differ from a record that has
160
179
the equal ordering fields. NOTE: we compare the fields as binary strings! */
163
182
row_upd_build_difference_binary(
164
183
/*============================*/
165
184
/* out, own: update vector of differing
166
185
fields, excluding roll ptr and trx id */
167
186
dict_index_t* index, /* in: clustered index */
168
dtuple_t* entry, /* in: entry to insert */
169
ulint* ext_vec,/* in: array containing field numbers of
170
externally stored fields in entry, or NULL */
171
ulint n_ext_vec,/* in: number of fields in ext_vec */
172
rec_t* rec, /* in: clustered index record */
187
const dtuple_t* entry, /* in: entry to insert */
188
const rec_t* rec, /* in: clustered index record */
173
189
trx_t* trx, /* in: transaction */
174
190
mem_heap_t* heap); /* in: memory heap from which allocated */
175
191
/***************************************************************
176
192
Replaces the new column values stored in the update vector to the index entry
180
196
row_upd_index_replace_new_col_vals_index_pos(
181
197
/*=========================================*/
182
dtuple_t* entry, /* in/out: index entry where replaced */
198
dtuple_t* entry, /* in/out: index entry where replaced;
199
the clustered index record must be
200
covered by a lock or a page latch to
201
prevent deletion (rollback or purge) */
183
202
dict_index_t* index, /* in: index; NOTE that this may also be a
184
203
non-clustered index */
185
upd_t* update, /* in: an update vector built for the index so
204
const upd_t* update, /* in: an update vector built for the index so
186
205
that the field number in an upd_field is the
187
206
index position */
188
207
ibool order_only,
189
208
/* in: if TRUE, limit the replacement to
190
209
ordering fields of index; note that this
191
210
does not work for non-clustered indexes. */
192
mem_heap_t* heap); /* in: memory heap to which we allocate and
193
copy the new values, set this as NULL if you
194
do not want allocation */
211
mem_heap_t* heap) /* in: memory heap for allocating and
212
copying the new values */
213
__attribute__((nonnull));
195
214
/***************************************************************
196
215
Replaces the new column values stored in the update vector to the index entry
200
219
row_upd_index_replace_new_col_vals(
201
220
/*===============================*/
202
dtuple_t* entry, /* in/out: index entry where replaced */
221
dtuple_t* entry, /* in/out: index entry where replaced;
222
the clustered index record must be
223
covered by a lock or a page latch to
224
prevent deletion (rollback or purge) */
203
225
dict_index_t* index, /* in: index; NOTE that this may also be a
204
226
non-clustered index */
205
upd_t* update, /* in: an update vector built for the
227
const upd_t* update, /* in: an update vector built for the
206
228
CLUSTERED index so that the field number in
207
229
an upd_field is the clustered index position */
208
mem_heap_t* heap); /* in: memory heap to which we allocate and
209
copy the new values, set this as NULL if you
210
do not want allocation */
230
mem_heap_t* heap) /* in: memory heap for allocating and
231
copying the new values */
232
__attribute__((nonnull));
233
/***************************************************************
234
Replaces the new column values stored in the update vector. */
239
dtuple_t* row, /* in/out: row where replaced,
241
the clustered index record must be
242
covered by a lock or a page latch to
243
prevent deletion (rollback or purge) */
244
row_ext_t** ext, /* out, own: NULL, or externally
245
stored column prefixes */
246
const dict_index_t* index, /* in: clustered index */
247
const upd_t* update, /* in: an update vector built for the
249
mem_heap_t* heap); /* in: memory heap */
211
250
/***************************************************************
212
251
Checks if an update vector changes an ordering field of an index record.
213
252
This function is fast if the update vector is short or the number of ordering
214
253
fields in the index is small. Otherwise, this can be quadratic.
215
254
NOTE: we compare the fields as binary strings! */
218
257
row_upd_changes_ord_field_binary(
219
258
/*=============================*/