1
/******************************************************
6
Created 4/20/1996 Heikki Tuuri
7
*******************************************************/
13
/*************************************************************************
14
Reads the trx id field from a clustered index record. */
19
/* out: value of the field */
20
const rec_t* rec, /* in: record */
21
dict_index_t* index, /* in: clustered index */
22
const ulint* offsets)/* in: rec_get_offsets(rec, index) */
26
ut_ad(dict_index_is_clust(index));
27
ut_ad(rec_offs_validate(rec, index, offsets));
29
offset = index->trx_id_offset;
32
offset = row_get_trx_id_offset(rec, index, offsets);
35
return(trx_read_trx_id(rec + offset));
38
/*************************************************************************
39
Reads the roll pointer field from a clustered index record. */
44
/* out: value of the field */
45
const rec_t* rec, /* in: record */
46
dict_index_t* index, /* in: clustered index */
47
const ulint* offsets)/* in: rec_get_offsets(rec, index) */
51
ut_ad(dict_index_is_clust(index));
52
ut_ad(rec_offs_validate(rec, index, offsets));
54
offset = index->trx_id_offset;
57
offset = row_get_trx_id_offset(rec, index, offsets);
60
return(trx_read_roll_ptr(rec + offset + DATA_TRX_ID_LEN));
63
/***********************************************************************
64
Builds from a secondary index record a row reference with which we can
65
search the clustered index record. */
68
row_build_row_ref_fast(
69
/*===================*/
70
dtuple_t* ref, /* in/out: typed data tuple where the
72
const ulint* map, /* in: array of field numbers in rec
73
telling how ref should be built from
75
const rec_t* rec, /* in: record in the index; must be
76
preserved while ref is used, as we do
77
not copy field values to heap */
78
const ulint* offsets)/* in: array returned by rec_get_offsets() */
87
ut_ad(rec_offs_validate(rec, NULL, offsets));
88
ut_ad(!rec_offs_any_extern(offsets));
89
ref_len = dtuple_get_n_fields(ref);
91
for (i = 0; i < ref_len; i++) {
92
dfield = dtuple_get_nth_field(ref, i);
94
field_no = *(map + i);
96
if (field_no != ULINT_UNDEFINED) {
98
field = rec_get_nth_field(rec, offsets,
100
dfield_set_data(dfield, field, len);