144
127
in rec or update */
145
128
dict_index_t* index, /* in: index */
146
129
const ulint* offsets,/* in: rec_get_offsets(rec, index) */
147
const upd_t* update);/* in: update vector */
130
upd_t* update);/* in: update vector */
148
131
/***************************************************************
149
132
Replaces the new column values stored in the update vector to the record
150
given. No field size changes are allowed. */
133
given. No field size changes are allowed. This function is used only for
153
137
row_upd_rec_in_place(
154
138
/*=================*/
155
139
rec_t* rec, /* in/out: record where replaced */
156
dict_index_t* index, /* in: the index the record belongs to */
157
140
const ulint* offsets,/* in: array returned by rec_get_offsets() */
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 */
141
upd_t* update);/* in: update vector */
161
142
/*******************************************************************
162
143
Builds an update vector from those fields which in a secondary index entry
163
144
differ from a record that has the equal ordering fields. NOTE: we compare
164
145
the fields as binary strings! */
167
148
row_upd_build_sec_rec_difference_binary(
168
149
/*====================================*/
169
150
/* out, own: update vector of differing
171
152
dict_index_t* index, /* in: index */
172
const dtuple_t* entry, /* in: entry to insert */
173
const rec_t* rec, /* in: secondary index record */
153
dtuple_t* entry, /* in: entry to insert */
154
rec_t* rec, /* in: secondary index record */
174
155
trx_t* trx, /* in: transaction */
175
156
mem_heap_t* heap); /* in: memory heap from which allocated */
176
157
/*******************************************************************
177
158
Builds an update vector from those fields, excluding the roll ptr and
178
159
trx id fields, which in an index entry differ from a record that has
179
160
the equal ordering fields. NOTE: we compare the fields as binary strings! */
182
163
row_upd_build_difference_binary(
183
164
/*============================*/
184
165
/* out, own: update vector of differing
185
166
fields, excluding roll ptr and trx id */
186
167
dict_index_t* index, /* in: clustered index */
187
const dtuple_t* entry, /* in: entry to insert */
188
const rec_t* rec, /* in: clustered index record */
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 */
189
173
trx_t* trx, /* in: transaction */
190
174
mem_heap_t* heap); /* in: memory heap from which allocated */
191
175
/***************************************************************
192
176
Replaces the new column values stored in the update vector to the index entry
196
180
row_upd_index_replace_new_col_vals_index_pos(
197
181
/*=========================================*/
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) */
182
dtuple_t* entry, /* in/out: index entry where replaced */
202
183
dict_index_t* index, /* in: index; NOTE that this may also be a
203
184
non-clustered index */
204
const upd_t* update, /* in: an update vector built for the index so
185
upd_t* update, /* in: an update vector built for the index so
205
186
that the field number in an upd_field is the
206
187
index position */
207
188
ibool order_only,
208
189
/* in: if TRUE, limit the replacement to
209
190
ordering fields of index; note that this
210
191
does not work for non-clustered indexes. */
211
mem_heap_t* heap) /* in: memory heap for allocating and
212
copying the new values */
213
__attribute__((nonnull));
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 */
214
195
/***************************************************************
215
196
Replaces the new column values stored in the update vector to the index entry
219
200
row_upd_index_replace_new_col_vals(
220
201
/*===============================*/
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) */
202
dtuple_t* entry, /* in/out: index entry where replaced */
225
203
dict_index_t* index, /* in: index; NOTE that this may also be a
226
204
non-clustered index */
227
const upd_t* update, /* in: an update vector built for the
205
upd_t* update, /* in: an update vector built for the
228
206
CLUSTERED index so that the field number in
229
207
an upd_field is the clustered index position */
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 */
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 */
250
211
/***************************************************************
251
212
Checks if an update vector changes an ordering field of an index record.
252
213
This function is fast if the update vector is short or the number of ordering
253
214
fields in the index is small. Otherwise, this can be quadratic.
254
215
NOTE: we compare the fields as binary strings! */
257
218
row_upd_changes_ord_field_binary(
258
219
/*=============================*/