@@ -137,25 +137,27 @@ rec_validate_old(
137137 rec_t * rec ); /* in: physical record */
138138
139139/**********************************************************
140- The following function determines the offsets to each field
141- in the record. The offsets are written to an array of
142- ulint[n+2], with [0] being the number of fields (n), [1] being the
143- extra size (if REC_OFFS_COMPACT is set, the record is in the new
144- format), and [2]..[n+1] being the offsets past the end of
145- fields 0..n, or to the beginning of fields 1..n+1. When the
146- high-order bit of the offset at [n+1] is set (REC_OFFS_SQL_NULL),
147- the field n is NULL. When the second high-order bit of the offset
148- at [n+1] is set (REC_OFFS_EXTERNAL), the field n is being stored
149- externally. */
140+ The following function determines the offsets to each field in the
141+ record. The offsets are written to a previously allocated array of
142+ ulint, where rec_offs_n_fields(offsets) has been initialized to the
143+ number of fields in the record. The rest of the array will be
144+ initialized by this function. rec_offs_base(offsets)[0] will be set
145+ to the extra size (if REC_OFFS_COMPACT is set, the record is in the
146+ new format), and rec_offs_base(offsets)[1..n_fields] will be set to
147+ offsets past the end of fields 0..n_fields, or to the beginning of
148+ fields 1..n_fields+1. When the high-order bit of the offset at [i+1]
149+ is set (REC_OFFS_SQL_NULL), the field i is NULL. When the second
150+ high-order bit of the offset at [i+1] is set (REC_OFFS_EXTERNAL), the
151+ field i is being stored externally. */
150152static
151153void
152154rec_init_offsets (
153155/*=============*/
154156 /* out: the offsets */
155157 rec_t * rec , /* in: physical record */
156158 dict_index_t * index , /* in: record descriptor */
157- ulint * offsets )/* in: /out: ulint[n+2] ;
158- n=rec_offs_n_fields(offsets) */
159+ ulint * offsets )/* in/out: array of offsets ;
160+ in: n=rec_offs_n_fields(offsets) */
159161{
160162 ulint n_fields = rec_offs_n_fields (offsets );
161163 ulint i = 0 ;
0 commit comments