Commit be434f6d authored by Marko Mäkelä's avatar Marko Mäkelä

Remove rec_get_nth_def_field()

The function had only one caller.
parent c4434dbb
......@@ -822,31 +822,6 @@ inline bool rec_is_delete_marked(const rec_t* rec, ulint comp)
== REC_INFO_DELETED_FLAG;
}
/** Get the nth field from an index.
@param[in] rec index record
@param[in] index index
@param[in] offsets rec_get_offsets(rec, index)
@param[in] n field number
@param[out] len length of the field in bytes, or UNIV_SQL_NULL
@return a read-only copy of the index field */
inline
const byte*
rec_get_nth_def_field(
const rec_t* rec,
const dict_index_t* index,
const ulint* offsets,
ulint n,
ulint* len)
{
ut_ad(rec_offs_validate(rec, index, offsets));
if (rec_offs_n_fields(offsets) > n
&& !rec_offs_nth_default(offsets, n)) {
return rec_get_nth_field(rec, offsets, n, len);
}
return index->instant_field_value(n - 1, len);
}
/** Get the nth field from an index.
@param[in] rec index record
@param[in] index index
......
......@@ -1122,9 +1122,17 @@ trx_undo_page_report_modify(
if (rec_is_alter_metadata(rec, index)) {
ut_ad(update->is_alter_metadata());
field = rec_get_nth_def_field(
rec, index, offsets, pos,
&flen);
field = rec_offs_n_fields(offsets)
> pos
&& !rec_offs_nth_default(
offsets, pos)
? rec_get_nth_field(
rec, offsets,
pos, &flen)
: index->instant_field_value(
pos - 1, &flen);
if (pos == index->first_user_field()) {
ut_ad(rec_offs_nth_extern(
offsets, pos));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment