MySQL  8.0.19
Source Code Documentation
rem0rec.h
Go to the documentation of this file.
1 /*****************************************************************************
2 
3 Copyright (c) 1994, 2019, Oracle and/or its affiliates. All Rights Reserved.
4 
5 This program is free software; you can redistribute it and/or modify it under
6 the terms of the GNU General Public License, version 2.0, as published by the
7 Free Software Foundation.
8 
9 This program is also distributed with certain software (including but not
10 limited to OpenSSL) that is licensed under separate terms, as designated in a
11 particular file or component or in included license documentation. The authors
12 of MySQL hereby grant you an additional permission to link the program and
13 your derivative works with the separately licensed software that they have
14 included with MySQL.
15 
16 This program is distributed in the hope that it will be useful, but WITHOUT
17 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
18 FOR A PARTICULAR PURPOSE. See the GNU General Public License, version 2.0,
19 for more details.
20 
21 You should have received a copy of the GNU General Public License along with
22 this program; if not, write to the Free Software Foundation, Inc.,
23 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
24 
25 *****************************************************************************/
26 
27 /** @file include/rem0rec.h
28  Record manager
29 
30  Created 5/30/1994 Heikki Tuuri
31  *************************************************************************/
32 
33 #ifndef rem0rec_h
34 #define rem0rec_h
35 
36 #include <ostream>
37 #include <sstream>
38 
39 #include "univ.i"
40 
41 #include "data0data.h"
42 #include "mtr0types.h"
43 #include "page0types.h"
44 #include "rem/rec.h"
45 #include "rem0types.h"
46 #include "trx0types.h"
47 
48 /** The following function is used to get the pointer of the next chained record
49  on the same page.
50  @return pointer to the next chained record, or NULL if none */
51 UNIV_INLINE
53  const rec_t *rec, /*!< in: physical record */
54  ulint comp) /*!< in: nonzero=compact page format */
55  MY_ATTRIBUTE((warn_unused_result));
56 /** The following function is used to get the pointer of the next chained record
57  on the same page.
58  @return pointer to the next chained record, or NULL if none */
59 UNIV_INLINE
60 rec_t *rec_get_next_ptr(rec_t *rec, /*!< in: physical record */
61  ulint comp) /*!< in: nonzero=compact page format */
62  MY_ATTRIBUTE((warn_unused_result));
63 /** The following function is used to get the offset of the
64  next chained record on the same page.
65  @return the page offset of the next chained record, or 0 if none */
66 UNIV_INLINE
67 ulint rec_get_next_offs(const rec_t *rec, /*!< in: physical record */
68  ulint comp) /*!< in: nonzero=compact page format */
69  MY_ATTRIBUTE((warn_unused_result));
70 
71 /** The following function is used to set the next record offset field of an
72 old-style record.
73 @param[in] rec old-style physical record
74 @param[in] next offset of the next record */
75 UNIV_INLINE
76 void rec_set_next_offs_old(rec_t *rec, ulint next);
77 
78 /** The following function is used to set the next record offset field of a
79 new-style record. */
80 UNIV_INLINE
81 void rec_set_next_offs_new(rec_t *rec, ulint next);
82 
83 /** The following function is used to get the number of records owned by the
84  previous directory record.
85  @return number of owned records */
86 UNIV_INLINE
88  const rec_t *rec) /*!< in: old-style physical record */
89  MY_ATTRIBUTE((warn_unused_result));
90 
91 /** The following function is used to set the number of owned records.
92 @param[in] rec old-style physical record
93 @param[in] n_owned the number of owned */
94 UNIV_INLINE
95 void rec_set_n_owned_old(rec_t *rec, ulint n_owned);
96 
97 /** The following function is used to get the number of records owned by the
98  previous directory record.
99  @return number of owned records */
100 UNIV_INLINE
101 ulint rec_get_n_owned_new(
102  const rec_t *rec) /*!< in: new-style physical record */
103  MY_ATTRIBUTE((warn_unused_result));
104 
105 /** The following function is used to set the number of owned records.
106 @param[in,out] rec new-style physical record
107 @param[in,out] page_zip compressed page, or NULL
108 @param[in] n_owned the number of owned */
109 UNIV_INLINE
110 void rec_set_n_owned_new(rec_t *rec, page_zip_des_t *page_zip, ulint n_owned);
111 
112 /** The following function is used to set the info bits of a record.
113 @param[in] rec old-style physical record
114 @param[in] bits info bits */
115 UNIV_INLINE
116 void rec_set_info_bits_old(rec_t *rec, ulint bits);
117 
118 /** The following function is used to set the info bits of a record.
119 @param[in,out] rec new-style physical record
120 @param[in] bits info bits */
121 UNIV_INLINE
122 void rec_set_info_bits_new(rec_t *rec, ulint bits);
123 
124 /** The following function is used to set the status bits of a new-style record.
125 @param[in,out] rec physical record
126 @param[in] bits info bits */
127 UNIV_INLINE
128 void rec_set_status(rec_t *rec, ulint bits);
129 
130 /** The following function is used to retrieve the info and status
131  bits of a record. (Only compact records have status bits.)
132  @return info bits */
133 UNIV_INLINE
135  const rec_t *rec, /*!< in: physical record */
136  ulint comp) /*!< in: nonzero=compact page format */
137  MY_ATTRIBUTE((warn_unused_result));
138 
139 /** The following function is used to set the info and status bits of a record.
140 (Only compact records have status bits.)
141 @param[in,out] rec compact physical record
142 @param[in] bits info bits */
143 UNIV_INLINE
144 void rec_set_info_and_status_bits(rec_t *rec, ulint bits);
145 
146 /** The following function tells if record is delete marked.
147  @return nonzero if delete marked */
148 UNIV_INLINE
149 ulint rec_get_deleted_flag(const rec_t *rec, /*!< in: physical record */
150  ulint comp) /*!< in: nonzero=compact page format */
151  MY_ATTRIBUTE((warn_unused_result));
152 
153 /** The following function is used to set the deleted bit.
154 @param[in] rec old-style physical record
155 @param[in] flag nonzero if delete marked */
156 UNIV_INLINE
157 void rec_set_deleted_flag_old(rec_t *rec, ulint flag);
158 
159 /** The following function is used to set the deleted bit.
160 @param[in,out] rec new-style physical record
161 @param[in,out] page_zip compressed page, or NULL
162 @param[in] flag nonzero if delete marked */
163 UNIV_INLINE
164 void rec_set_deleted_flag_new(rec_t *rec, page_zip_des_t *page_zip, ulint flag);
165 
166 /** The following function is used to set the instant bit.
167 @param[in,out] rec new-style physical record
168 @param[in] flag set the bit to this flag */
169 UNIV_INLINE
170 void rec_set_instant_flag_new(rec_t *rec, bool flag);
171 
172 /** The following function tells if a new-style record is a node pointer.
173  @return true if node pointer */
174 UNIV_INLINE
175 bool rec_get_node_ptr_flag(const rec_t *rec) /*!< in: physical record */
176  MY_ATTRIBUTE((warn_unused_result));
177 
178 /** The following function is used to get the order number of an old-style
179 record in the heap of the index page.
180 @param[in] rec physical record
181 @return heap order number */
182 UNIV_INLINE
183 ulint rec_get_heap_no_old(const rec_t *rec) MY_ATTRIBUTE((warn_unused_result));
184 
185 /** The following function is used to set the heap number field in an old-style
186 record.
187 @param[in] rec physical record
188 @param[in] heap_no the heap number */
189 UNIV_INLINE
190 void rec_set_heap_no_old(rec_t *rec, ulint heap_no);
191 
192 /** The following function is used to get the order number of a new-style
193 record in the heap of the index page.
194 @param[in] rec physical record
195 @return heap order number */
196 UNIV_INLINE
197 ulint rec_get_heap_no_new(const rec_t *rec) MY_ATTRIBUTE((warn_unused_result));
198 
199 /** The following function is used to set the heap number field in a new-style
200 record.
201 @param[in,out] rec physical record
202 @param[in] heap_no the heap number */
203 UNIV_INLINE
204 void rec_set_heap_no_new(rec_t *rec, ulint heap_no);
205 
206 /** The following function is used to test whether the data offsets
207  in the record are stored in one-byte or two-byte format.
208  @return true if 1-byte form */
209 UNIV_INLINE
210 ibool rec_get_1byte_offs_flag(const rec_t *rec) /*!< in: physical record */
211  MY_ATTRIBUTE((warn_unused_result));
212 
213 /** The following function is used to set the 1-byte offsets flag.
214 @param[in] rec physical record
215 @param[in] flag TRUE if 1byte form */
216 UNIV_INLINE
217 void rec_set_1byte_offs_flag(rec_t *rec, ibool flag);
218 
219 /** Returns the offset of nth field end if the record is stored in the 1-byte
220  offsets form. If the field is SQL null, the flag is ORed in the returned
221  value.
222  @return offset of the start of the field, SQL null flag ORed */
223 UNIV_INLINE
224 ulint rec_1_get_field_end_info(const rec_t *rec, /*!< in: record */
225  ulint n) /*!< in: field index */
226  MY_ATTRIBUTE((warn_unused_result));
227 
228 /** Returns the offset of nth field end if the record is stored in the 2-byte
229  offsets form. If the field is SQL null, the flag is ORed in the returned
230  value.
231  @return offset of the start of the field, SQL null flag and extern
232  storage flag ORed */
233 UNIV_INLINE
234 ulint rec_2_get_field_end_info(const rec_t *rec, /*!< in: record */
235  ulint n) /*!< in: field index */
236  MY_ATTRIBUTE((warn_unused_result));
237 
238 /** Returns nonzero if the field is stored off-page.
239  @retval 0 if the field is stored in-page
240  @retval REC_2BYTE_EXTERN_MASK if the field is stored externally */
241 UNIV_INLINE
242 ulint rec_2_is_field_extern(const rec_t *rec, /*!< in: record */
243  ulint n) /*!< in: field index */
244  MY_ATTRIBUTE((warn_unused_result));
245 
246 /** Determine how many of the first n columns in a compact
247  physical record are stored externally.
248  @return number of externally stored columns */
250  const rec_t *rec, /*!< in: compact physical record */
251  const dict_index_t *index, /*!< in: record descriptor */
252  ulint n) /*!< in: number of columns to scan */
253  MY_ATTRIBUTE((warn_unused_result));
254 
255 #ifdef UNIV_DEBUG
256 #define rec_get_offsets(rec, index, offsets, n, heap) \
257  rec_get_offsets_func(rec, index, offsets, n, __FILE__, __LINE__, heap)
258 #else /* UNIV_DEBUG */
259 #define rec_get_offsets(rec, index, offsets, n, heap) \
260  rec_get_offsets_func(rec, index, offsets, n, heap)
261 #endif /* UNIV_DEBUG */
262 
263 /** The following function is used to get the offset to the nth
264  data field in an old-style record.
265  @return offset to the field */
266 ulint rec_get_nth_field_offs_old(const rec_t *rec, /*!< in: record */
267  ulint n, /*!< in: index of the field */
268  ulint *len); /*!< out: length of the field;
269  UNIV_SQL_NULL if SQL null */
270 
271 /** Gets the value of the specified field in the record in old style.
272 This is only used for record from instant index, which is clustered
273 index and has some instantly added columns.
274 @param[in] rec physical record
275 @param[in] n index of the field
276 @param[in] index clustered index where the record resides
277 @param[out] len length of the field, UNIV_SQL if SQL null
278 @return value of the field, could be either pointer to rec or default value */
279 UNIV_INLINE
280 const byte *rec_get_nth_field_old_instant(const rec_t *rec, uint16_t n,
281  const dict_index_t *index,
282  ulint *len);
283 
284 #define rec_get_nth_field_old(rec, n, len) \
285  ((rec) + rec_get_nth_field_offs_old(rec, n, len))
286 /** Gets the physical size of an old-style field.
287  Also an SQL null may have a field of size > 0,
288  if the data type is of a fixed size.
289  @return field size in bytes */
290 UNIV_INLINE
291 ulint rec_get_nth_field_size(const rec_t *rec, /*!< in: record */
292  ulint n) /*!< in: index of the field */
293  MY_ATTRIBUTE((warn_unused_result));
294 
295 /** The following function is used to get an offset to the nth data field in a
296 record.
297 @param[in] offsets array returned by rec_get_offsets()
298 @param[in] n index of the field
299 @param[out] len length of the field; UNIV_SQL_NULL if SQL null;
300  UNIV_SQL_ADD_COL_DEFAULT if it's default value and no
301 value inlined
302 @return offset from the origin of rec */
303 UNIV_INLINE
304 ulint rec_get_nth_field_offs(const ulint *offsets, ulint n, ulint *len);
305 
306 #ifdef UNIV_DEBUG
307 /** Gets the value of the specified field in the record.
308 This is used for normal cases, i.e. secondary index or clustered index
309 which must have no instantly added columns. Also note, if it's non-leaf
310 page records, it's OK to always use this functioni.
311 @param[in] rec physical record
312 @param[in] offsets array returned by rec_get_offsets()
313 @param[in] n index of the field
314 @param[out] len length of the field, UNIV_SQL_NULL if SQL null
315 @return value of the field */
316 inline byte *rec_get_nth_field(const rec_t *rec, const ulint *offsets, ulint n,
317  ulint *len) {
318  ulint off = rec_get_nth_field_offs(offsets, n, len);
319  ut_ad(*len != UNIV_SQL_ADD_COL_DEFAULT);
320  return (const_cast<byte *>(rec) + off);
321 }
322 #else /* UNIV_DEBUG */
323 /** Gets the value of the specified field in the record.
324 This is used for normal cases, i.e. secondary index or clustered index
325 which must have no instantly added columns. Also note, if it's non-leaf
326 page records, it's OK to always use this functioni. */
327 #define rec_get_nth_field(rec, offsets, n, len) \
328  ((rec) + rec_get_nth_field_offs(offsets, n, len))
329 #endif /* UNIV_DEBUG */
330 
331 /** Gets the value of the specified field in the record.
332 This is only used when there is possibility that the record comes from the
333 clustered index, which has some instantly added columns.
334 @param[in] rec physical record
335 @param[in] offsets array returned by rec_get_offsets()
336 @param[in] n index of the field
337 @param[in] index clustered index where the record resides, or nullptr
338  if the record doesn't have instantly added columns
339  for sure
340 @param[out] len length of the field, UNIV_SQL_NULL if SQL null
341 @return value of the field, could be either pointer to rec or default value */
342 UNIV_INLINE
343 const byte *rec_get_nth_field_instant(const rec_t *rec, const ulint *offsets,
344  ulint n, const dict_index_t *index,
345  ulint *len);
346 
347 /** Determine if the field is not NULL and not having default value
348 after instant ADD COLUMN
349 @param[in] len length of a field
350 @return true if not NULL and not having default value */
351 UNIV_INLINE
352 bool rec_field_not_null_not_add_col_def(ulint len);
353 
354 /** Determine if the offsets are for a record in the new
355  compact format.
356  @return nonzero if compact format */
357 UNIV_INLINE
358 ulint rec_offs_comp(
359  const ulint *offsets) /*!< in: array returned by rec_get_offsets() */
360  MY_ATTRIBUTE((warn_unused_result));
361 /** Determine if the offsets are for a record containing
362  externally stored columns.
363  @return nonzero if externally stored */
364 UNIV_INLINE
365 ulint rec_offs_any_extern(
366  const ulint *offsets) /*!< in: array returned by rec_get_offsets() */
367  MY_ATTRIBUTE((warn_unused_result));
368 /** Determine if the offsets are for a record containing null BLOB pointers.
369  @return first field containing a null BLOB pointer, or NULL if none found */
370 UNIV_INLINE
371 const byte *rec_offs_any_null_extern(
372  const rec_t *rec, /*!< in: record */
373  const ulint *offsets) /*!< in: rec_get_offsets(rec) */
374  MY_ATTRIBUTE((warn_unused_result));
375 /** Returns nonzero if the extern bit is set in nth field of rec.
376  @return nonzero if externally stored */
377 UNIV_INLINE
378 ulint rec_offs_nth_extern(
379  const ulint *offsets, /*!< in: array returned by rec_get_offsets() */
380  ulint n) /*!< in: nth field */
381  MY_ATTRIBUTE((warn_unused_result));
382 
383 /** Mark the nth field as externally stored.
384 @param[in] offsets array returned by rec_get_offsets()
385 @param[in] n nth field */
386 void rec_offs_make_nth_extern(ulint *offsets, const ulint n);
387 /** Returns nonzero if the SQL NULL bit is set in nth field of rec.
388  @return nonzero if SQL NULL */
389 UNIV_INLINE
391  const ulint *offsets, /*!< in: array returned by rec_get_offsets() */
392  ulint n) /*!< in: nth field */
393  MY_ATTRIBUTE((warn_unused_result));
394 
395 /** Returns nonzero if the default bit is set in nth field of rec.
396 @return nonzero if default bit is set */
397 UNIV_INLINE
398 ulint rec_offs_nth_default(const ulint *offsets, ulint n);
399 
400 /** Gets the physical size of a field.
401  @return length of field */
402 UNIV_INLINE
403 ulint rec_offs_nth_size(
404  const ulint *offsets, /*!< in: array returned by rec_get_offsets() */
405  ulint n) /*!< in: nth field */
406  MY_ATTRIBUTE((warn_unused_result));
407 
408 /** Returns the number of extern bits set in a record.
409  @return number of externally stored fields */
410 UNIV_INLINE
411 ulint rec_offs_n_extern(
412  const ulint *offsets) /*!< in: array returned by rec_get_offsets() */
413  MY_ATTRIBUTE((warn_unused_result));
414 
415 /** This is used to modify the value of an already existing field in a record.
416 The previous value must have exactly the same size as the new value. If len is
417 UNIV_SQL_NULL then the field is treated as an SQL null.
418 For records in ROW_FORMAT=COMPACT (new-style records), len must not be
419 UNIV_SQL_NULL unless the field already is SQL null.
420 @param[in] rec record
421 @param[in] offsets array returned by rec_get_offsets()
422 @param[in] n index number of the field
423 @param[in] len length of the data or UNIV_SQL_NULL.
424  If not SQL null, must have the same length as the
425  previous value.
426  If SQL null, previous value must be SQL null.
427 @param[in] data pointer to the data if not SQL null */
428 UNIV_INLINE
429 void rec_set_nth_field(rec_t *rec, const ulint *offsets, ulint n,
430  const void *data, ulint len);
431 
432 /** The following function returns the data size of an old-style physical
433  record, that is the sum of field lengths. SQL null fields
434  are counted as length 0 fields. The value returned by the function
435  is the distance from record origin to record end in bytes.
436  @return size */
437 UNIV_INLINE
438 ulint rec_get_data_size_old(const rec_t *rec) /*!< in: physical record */
439  MY_ATTRIBUTE((warn_unused_result));
440 #define rec_offs_init(offsets) \
441  rec_offs_set_n_alloc(offsets, (sizeof offsets) / sizeof *offsets)
442 /** The following function returns the data size of a physical
443  record, that is the sum of field lengths. SQL null fields
444  are counted as length 0 fields. The value returned by the function
445  is the distance from record origin to record end in bytes.
446  @return size */
447 UNIV_INLINE
448 ulint rec_offs_data_size(
449  const ulint *offsets) /*!< in: array returned by rec_get_offsets() */
450  MY_ATTRIBUTE((warn_unused_result));
451 /** Returns the total size of record minus data size of record.
452  The value returned by the function is the distance from record
453  start to record origin in bytes.
454  @return size */
455 UNIV_INLINE
456 ulint rec_offs_extra_size(
457  const ulint *offsets) /*!< in: array returned by rec_get_offsets() */
458  MY_ATTRIBUTE((warn_unused_result));
459 /** Returns the total size of a physical record.
460  @return size */
461 UNIV_INLINE
462 ulint rec_offs_size(
463  const ulint *offsets) /*!< in: array returned by rec_get_offsets() */
464  MY_ATTRIBUTE((warn_unused_result));
465 #ifdef UNIV_DEBUG
466 /** Returns a pointer to the start of the record.
467  @return pointer to start */
468 UNIV_INLINE
469 byte *rec_get_start(
470  const rec_t *rec, /*!< in: pointer to record */
471  const ulint *offsets) /*!< in: array returned by rec_get_offsets() */
472  MY_ATTRIBUTE((warn_unused_result));
473 /** Returns a pointer to the end of the record.
474  @return pointer to end */
475 UNIV_INLINE
476 byte *rec_get_end(
477  const rec_t *rec, /*!< in: pointer to record */
478  const ulint *offsets) /*!< in: array returned by rec_get_offsets() */
479  MY_ATTRIBUTE((warn_unused_result));
480 #else /* UNIV_DEBUG */
481 #define rec_get_start(rec, offsets) ((rec)-rec_offs_extra_size(offsets))
482 #define rec_get_end(rec, offsets) ((rec) + rec_offs_data_size(offsets))
483 #endif /* UNIV_DEBUG */
484 
485 /** Copy a physical record to a buffer.
486 @param[in] buf buffer
487 @param[in] rec physical record
488 @param[in] offsets array returned by rec_get_offsets()
489 @return pointer to the origin of the copy */
490 UNIV_INLINE
491 rec_t *rec_copy(void *buf, const rec_t *rec, const ulint *offsets);
492 
493 #ifndef UNIV_HOTBACKUP
494 /** Determines the size of a data tuple prefix in a temporary file.
495  @return total size */
497  const dict_index_t *index, /*!< in: record descriptor */
498  const dfield_t *fields, /*!< in: array of data fields */
499  ulint n_fields, /*!< in: number of data fields */
500  const dtuple_t *v_entry, /*!< in: dtuple contains virtual column
501  data */
502  ulint *extra) /*!< out: extra size */
503  MY_ATTRIBUTE((warn_unused_result));
504 
505 /** Determine the offset to each field in temporary file.
506  @see rec_convert_dtuple_to_temp() */
508  const rec_t *rec, /*!< in: temporary file record */
509  const dict_index_t *index, /*!< in: record descriptor */
510  ulint *offsets); /*!< in/out: array of offsets;
511  in: n=rec_offs_n_fields(offsets) */
512 
513 /** Builds a temporary file record out of a data tuple.
514  @see rec_init_offsets_temp() */
516  rec_t *rec, /*!< out: record */
517  const dict_index_t *index, /*!< in: record descriptor */
518  const dfield_t *fields, /*!< in: array of data fields */
519  ulint n_fields, /*!< in: number of fields */
520  const dtuple_t *v_entry); /*!< in: dtuple contains
521  virtual column data */
522 
523 /** Copies the first n fields of a physical record to a new physical record in
524  a buffer.
525  @return own: copied record */
527  const rec_t *rec, /*!< in: physical record */
528  const dict_index_t *index, /*!< in: record descriptor */
529  ulint n_fields, /*!< in: number of fields
530  to copy */
531  byte **buf, /*!< in/out: memory buffer
532  for the copied prefix,
533  or NULL */
534  size_t *buf_size /*!< in/out: buffer size */
535 );
536 /** Compute a hash value of a prefix of a leaf page record.
537 @param[in] rec leaf page record
538 @param[in] offsets rec_get_offsets(rec)
539 @param[in] n_fields number of complete fields to fold
540 @param[in] n_bytes number of bytes to fold in the last field
541 @param[in] fold fold value of the index identifier
542 @param[in] index index where the record resides
543 @return the folded value */
544 UNIV_INLINE
545 ulint rec_fold(const rec_t *rec, const ulint *offsets, ulint n_fields,
546  ulint n_bytes, ulint fold, const dict_index_t *index)
547  MY_ATTRIBUTE((warn_unused_result));
548 #endif /* !UNIV_HOTBACKUP */
549 /** Builds a physical record out of a data tuple and
550  stores it into the given buffer.
551  @return pointer to the origin of physical record */
553  byte *buf, /*!< in: start address of the
554  physical record */
555  const dict_index_t *index, /*!< in: record descriptor */
556  const dtuple_t *dtuple, /*!< in: data tuple */
557  ulint n_ext) /*!< in: number of
558  externally stored columns */
559  MY_ATTRIBUTE((warn_unused_result));
560 /** Returns the extra size of an old-style physical record if we know its
561  data size and number of fields.
562  @return extra size */
563 UNIV_INLINE
565  ulint data_size, /*!< in: data size */
566  ulint n_fields, /*!< in: number of fields */
567  ulint n_ext) /*!< in: number of externally stored columns */
568  MY_ATTRIBUTE((const));
569 /** Determines the size of a data tuple prefix in ROW_FORMAT=COMPACT.
570  @return total size */
572  const dict_index_t *index, /*!< in: record descriptor */
573  const dfield_t *fields, /*!< in: array of data fields */
574  ulint n_fields, /*!< in: number of data fields */
575  ulint *extra) /*!< out: extra size */
576  MY_ATTRIBUTE((warn_unused_result));
577 /** Determines the size of a data tuple in ROW_FORMAT=COMPACT.
578  @return total size */
580  const dict_index_t *index, /*!< in: record descriptor;
581  dict_table_is_comp() is
582  assumed to hold, even if
583  it does not */
584  ulint status, /*!< in: status bits of the record */
585  const dfield_t *fields, /*!< in: array of data fields */
586  ulint n_fields, /*!< in: number of data fields */
587  ulint *extra); /*!< out: extra size */
588 /** The following function returns the size of a data tuple when converted to
589  a physical record.
590  @return size */
591 UNIV_INLINE
593  const dict_index_t *index, /*!< in: record descriptor */
594  const dtuple_t *dtuple, /*!< in: data tuple */
595  ulint n_ext) /*!< in: number of externally stored columns */
596  MY_ATTRIBUTE((warn_unused_result));
597 #ifndef UNIV_HOTBACKUP
598 /** Copies the first n fields of a physical record to a data tuple.
599  The fields are copied to the memory heap. */
601  dtuple_t *tuple, /*!< out: data tuple */
602  const rec_t *rec, /*!< in: physical record */
603  const dict_index_t *index, /*!< in: record descriptor */
604  ulint n_fields, /*!< in: number of fields
605  to copy */
606  mem_heap_t *heap); /*!< in: memory heap */
607 #endif /* !UNIV_HOTBACKUP */
608 
609 /** Get the length of the number of fields for any new style record.
610 @param[in] n_fields number of fields in the record
611 @return length of specified number of fields */
612 UNIV_INLINE
613 uint8_t rec_get_n_fields_length(ulint n_fields);
614 
615 /** Set the number of fields for one new style leaf page record.
616 This is only needed for table after instant ADD COLUMN.
617 @param[in,out] rec leaf page record
618 @param[in] n_fields number of fields in the record
619 @return the length of the n_fields occupies */
620 UNIV_INLINE
621 uint8_t rec_set_n_fields(rec_t *rec, ulint n_fields);
622 
623 /** Validates the consistency of a physical record.
624  @return true if ok */
625 ibool rec_validate(
626  const rec_t *rec, /*!< in: physical record */
627  const ulint *offsets); /*!< in: array returned by rec_get_offsets() */
628 /** Prints an old-style physical record. */
629 void rec_print_old(FILE *file, /*!< in: file where to print */
630  const rec_t *rec); /*!< in: physical record */
631 #ifndef UNIV_HOTBACKUP
632 /** Prints a spatial index record. */
633 void rec_print_mbr_rec(
634  FILE *file, /*!< in: file where to print */
635  const rec_t *rec, /*!< in: physical record */
636  const ulint *offsets); /*!< in: array returned by rec_get_offsets() */
637 /** Prints a physical record. */
638 void rec_print_new(
639  FILE *file, /*!< in: file where to print */
640  const rec_t *rec, /*!< in: physical record */
641  const ulint *offsets); /*!< in: array returned by rec_get_offsets() */
642 /** Prints a physical record. */
643 void rec_print(FILE *file, /*!< in: file where to print */
644  const rec_t *rec, /*!< in: physical record */
645  const dict_index_t *index); /*!< in: record descriptor */
646 
647 /** Pretty-print a record.
648 @param[in,out] o output stream
649 @param[in] rec physical record
650 @param[in] info rec_get_info_bits(rec)
651 @param[in] offsets rec_get_offsets(rec) */
652 void rec_print(std::ostream &o, const rec_t *rec, ulint info,
653  const ulint *offsets);
654 
655 /** Wrapper for pretty-printing a record */
657  /** Constructor */
659  : m_rec(rec), m_index(index) {}
660 
661  /** Record */
662  const rec_t *m_rec;
663  /** Index */
665 };
666 
667 /** Display a record.
668 @param[in,out] o output stream
669 @param[in] r record to display
670 @return the output stream */
671 std::ostream &operator<<(std::ostream &o, const rec_index_print &r);
672 
673 /** Wrapper for pretty-printing a record */
675  /** Constructor */
676  rec_offsets_print(const rec_t *rec, const ulint *offsets)
677  : m_rec(rec), m_offsets(offsets) {}
678 
679  /** Record */
680  const rec_t *m_rec;
681  /** Offsets to each field */
682  const ulint *m_offsets;
683 };
684 
685 /** Display a record.
686 @param[in,out] o output stream
687 @param[in] r record to display
688 @return the output stream */
689 std::ostream &operator<<(std::ostream &o, const rec_offsets_print &r);
690 
691 #ifdef UNIV_DEBUG
692 /** Pretty-printer of records and tuples */
694  public:
695  /** Construct a pretty-printed record.
696  @param rec record with header
697  @param offsets rec_get_offsets(rec, ...) */
698  rec_printer(const rec_t *rec, const ulint *offsets) : std::ostringstream() {
699  rec_print(*this, rec, rec_get_info_bits(rec, rec_offs_comp(offsets)),
700  offsets);
701  }
702 
703  /** Construct a pretty-printed record.
704  @param rec record, possibly lacking header
705  @param info rec_get_info_bits(rec)
706  @param offsets rec_get_offsets(rec, ...) */
707  rec_printer(const rec_t *rec, ulint info, const ulint *offsets)
708  : std::ostringstream() {
709  rec_print(*this, rec, info, offsets);
710  }
711 
712  /** Construct a pretty-printed tuple.
713  @param tuple data tuple */
714  rec_printer(const dtuple_t *tuple) : std::ostringstream() {
715  dtuple_print(*this, tuple);
716  }
717 
718  /** Construct a pretty-printed tuple.
719  @param field array of data tuple fields
720  @param n number of fields */
721  rec_printer(const dfield_t *field, ulint n) : std::ostringstream() {
722  dfield_print(*this, field, n);
723  }
724 
725  /** Destructor */
726  virtual ~rec_printer() {}
727 
728  private:
729  /** Copy constructor */
730  rec_printer(const rec_printer &other);
731  /** Assignment operator */
732  rec_printer &operator=(const rec_printer &other);
733 };
734 #endif /* UNIV_DEBUG */
735 
736 /** Reads the DB_TRX_ID of a clustered index record.
737  @return the value of DB_TRX_ID */
738 trx_id_t rec_get_trx_id(const rec_t *rec, /*!< in: record */
739  const dict_index_t *index) /*!< in: clustered index */
740  MY_ATTRIBUTE((warn_unused_result));
741 #endif /* UNIV_HOTBACKUP */
742 
743 /* Maximum lengths for the data in a physical record if the offsets
744 are given in one byte (resp. two byte) format. */
745 constexpr ulint REC_1BYTE_OFFS_LIMIT = 0x7FUL;
746 constexpr ulint REC_2BYTE_OFFS_LIMIT = 0x7FFFUL;
747 
748 /* The data size of record must be smaller than this because we reserve
749 two upmost bits in a two byte offset for special purposes */
750 constexpr ulint REC_MAX_DATA_SIZE = 16384;
751 
752 #include "rem0rec.ic"
753 
754 #endif
rec_offs_any_null_extern
const UNIV_INLINE byte * rec_offs_any_null_extern(const rec_t *rec, const ulint *offsets)
Determine if the offsets are for a record containing null BLOB pointers.
rec_offs_nth_default
UNIV_INLINE ulint rec_offs_nth_default(const ulint *offsets, ulint n)
Returns nonzero if the default bit is set in nth field of rec.
rec_get_heap_no_new
UNIV_INLINE ulint rec_get_heap_no_new(const rec_t *rec)
The following function is used to get the order number of a new-style record in the heap of the index...
rec_copy_prefix_to_dtuple
void rec_copy_prefix_to_dtuple(dtuple_t *tuple, const rec_t *rec, const dict_index_t *index, ulint n_fields, mem_heap_t *heap)
Copies the first n fields of a physical record to a data tuple.
Definition: rem0rec.cc:1051
rec_offsets_print::m_offsets
const ulint * m_offsets
Offsets to each field.
Definition: rem0rec.h:682
dtuple_t
Structure for an SQL data tuple of fields (logical record)
Definition: data0data.h:716
rec_offs_any_extern
UNIV_INLINE ulint rec_offs_any_extern(const ulint *offsets)
Determine if the offsets are for a record containing externally stored columns.
rec_get_next_ptr_const
const UNIV_INLINE rec_t * rec_get_next_ptr_const(const rec_t *rec, ulint comp)
The following function is used to get the pointer of the next chained record on the same page.
rec_offs_size
UNIV_INLINE ulint rec_offs_size(const ulint *offsets)
Returns the total size of a physical record.
rec_get_info_bits
UNIV_INLINE ulint rec_get_info_bits(const rec_t *rec, ulint comp)
The following function is used to retrieve the info bits of a record.
Definition: rec.h:274
rec_convert_dtuple_to_rec
rec_t * rec_convert_dtuple_to_rec(byte *buf, const dict_index_t *index, const dtuple_t *dtuple, ulint n_ext)
Builds a physical record out of a data tuple and stores it into the given buffer.
Definition: rem0rec.cc:959
operator<<
std::ostream & operator<<(std::ostream &o, const rec_index_print &r)
Display a record.
Definition: rem0rec.cc:1690
rec_get_n_owned_old
UNIV_INLINE ulint rec_get_n_owned_old(const rec_t *rec)
The following function is used to get the number of records owned by the previous directory record.
dtuple_print
void dtuple_print(FILE *f, const dtuple_t *tuple)
The following function prints the contents of a tuple.
Definition: data0data.cc:367
dfield_print
void dfield_print(std::ostream &o, const dfield_t *field, ulint n)
Print the contents of a tuple.
Definition: data0data.cc:384
trx_id_t
ib_id_t trx_id_t
Transaction identifier (DB_TRX_ID, DATA_TRX_ID)
Definition: trx0types.h:148
page0types.h
rec_get_converted_extra_size
UNIV_INLINE ulint rec_get_converted_extra_size(ulint data_size, ulint n_fields, ulint n_ext)
Returns the extra size of an old-style physical record if we know its data size and number of fields.
ut_ad
#define ut_ad(EXPR)
Debug assertion.
Definition: ut0dbg.h:65
rec_validate
ibool rec_validate(const rec_t *rec, const ulint *offsets)
Validates the consistency of a physical record.
Definition: rem0rec.cc:1289
rec_set_instant_flag_new
UNIV_INLINE void rec_set_instant_flag_new(rec_t *rec, bool flag)
The following function is used to set the instant bit.
dict_index_t
Data structure for an index.
Definition: dict0mem.h:869
REC_1BYTE_OFFS_LIMIT
constexpr ulint REC_1BYTE_OFFS_LIMIT
Definition: rem0rec.h:745
rec_copy_prefix_to_buf
rec_t * rec_copy_prefix_to_buf(const rec_t *rec, const dict_index_t *index, ulint n_fields, byte **buf, size_t *buf_size)
Copies the first n fields of a physical record to a new physical record in a buffer.
Definition: rem0rec.cc:1127
rec_get_next_offs
UNIV_INLINE ulint rec_get_next_offs(const rec_t *rec, ulint comp)
The following function is used to get the offset of the next chained record on the same page.
rec_offs_extra_size
UNIV_INLINE ulint rec_offs_extra_size(const ulint *offsets)
Returns the total size of record minus data size of record.
rec_printer::rec_printer
rec_printer(const dfield_t *field, ulint n)
Construct a pretty-printed tuple.
Definition: rem0rec.h:721
rec_printer::rec_printer
rec_printer(const rec_t *rec, const ulint *offsets)
Construct a pretty-printed record.
Definition: rem0rec.h:698
rec_get_nth_field_instant
const UNIV_INLINE byte * rec_get_nth_field_instant(const rec_t *rec, const ulint *offsets, ulint n, const dict_index_t *index, ulint *len)
Gets the value of the specified field in the record.
rec_set_status
UNIV_INLINE void rec_set_status(rec_t *rec, ulint bits)
The following function is used to set the status bits of a new-style record.
qep_row::extra
Part of traditional "extra" column or related hierarchical property.
Definition: opt_explain_format.h:261
rec_get_nth_field_old_instant
const UNIV_INLINE byte * rec_get_nth_field_old_instant(const rec_t *rec, uint16_t n, const dict_index_t *index, ulint *len)
Gets the value of the specified field in the record in old style.
rec_set_next_offs_old
UNIV_INLINE void rec_set_next_offs_old(rec_t *rec, ulint next)
The following function is used to set the next record offset field of an old-style record.
rec_get_data_size_old
UNIV_INLINE ulint rec_get_data_size_old(const rec_t *rec)
The following function returns the data size of an old-style physical record, that is the sum of fiel...
rec_set_n_fields
UNIV_INLINE uint8_t rec_set_n_fields(rec_t *rec, ulint n_fields)
Set the number of fields for one new style leaf page record.
rec_set_deleted_flag_new
UNIV_INLINE void rec_set_deleted_flag_new(rec_t *rec, page_zip_des_t *page_zip, ulint flag)
The following function is used to set the deleted bit.
rec_set_1byte_offs_flag
UNIV_INLINE void rec_set_1byte_offs_flag(rec_t *rec, ibool flag)
The following function is used to set the 1-byte offsets flag.
rec_offs_data_size
UNIV_INLINE ulint rec_offs_data_size(const ulint *offsets)
The following function returns the data size of a physical record, that is the sum of field lengths.
rec_get_nth_field_offs_old
ulint rec_get_nth_field_offs_old(const rec_t *rec, ulint n, ulint *len)
The following function is used to get the offset to the nth data field in an old-style record.
Definition: rem0rec.cc:246
rec_get_converted_size_comp
ulint rec_get_converted_size_comp(const dict_index_t *index, ulint status, const dfield_t *fields, ulint n_fields, ulint *extra)
Determines the size of a data tuple in ROW_FORMAT=COMPACT.
Definition: rem0rec.cc:496
rec_get_deleted_flag
UNIV_INLINE ulint rec_get_deleted_flag(const rec_t *rec, ulint comp)
The following function tells if record is delete marked.
rec_offs_nth_extern
UNIV_INLINE ulint rec_offs_nth_extern(const ulint *offsets, ulint n)
Returns nonzero if the extern bit is set in nth field of rec.
rec_get_nth_field_size
UNIV_INLINE ulint rec_get_nth_field_size(const rec_t *rec, ulint n)
Gets the physical size of an old-style field.
rec_field_not_null_not_add_col_def
UNIV_INLINE bool rec_field_not_null_not_add_col_def(ulint len)
Determine if the field is not NULL and not having default value after instant ADD COLUMN.
rec_set_heap_no_new
UNIV_INLINE void rec_set_heap_no_new(rec_t *rec, ulint heap_no)
The following function is used to set the heap number field in a new-style record.
rec_2_is_field_extern
UNIV_INLINE ulint rec_2_is_field_extern(const rec_t *rec, ulint n)
Returns nonzero if the field is stored off-page.
rec_get_n_owned_new
UNIV_INLINE ulint rec_get_n_owned_new(const rec_t *rec)
The following function is used to get the number of records owned by the previous directory record.
rec_t
byte rec_t
Definition: rem0types.h:39
mem_block_info_t
The info structure stored at the beginning of a heap block.
Definition: mem0mem.h:337
page_zip_des_t
Compressed page descriptor.
Definition: page0types.h:182
rec_offsets_print::rec_offsets_print
rec_offsets_print(const rec_t *rec, const ulint *offsets)
Constructor.
Definition: rem0rec.h:676
rec_get_nth_field
byte * rec_get_nth_field(const rec_t *rec, const ulint *offsets, ulint n, ulint *len)
Gets the value of the specified field in the record.
Definition: rem0rec.h:316
rec_set_heap_no_old
UNIV_INLINE void rec_set_heap_no_old(rec_t *rec, ulint heap_no)
The following function is used to set the heap number field in an old-style record.
rec_index_print::m_rec
const rec_t * m_rec
Record.
Definition: rem0rec.h:662
status
static STATUS status
Definition: mysql.cc:197
rec_get_info_and_status_bits
UNIV_INLINE ulint rec_get_info_and_status_bits(const rec_t *rec, ulint comp)
The following function is used to retrieve the info and status bits of a record.
REC_2BYTE_OFFS_LIMIT
constexpr ulint REC_2BYTE_OFFS_LIMIT
Definition: rem0rec.h:746
rec_get_converted_size_temp
ulint rec_get_converted_size_temp(const dict_index_t *index, const dfield_t *fields, ulint n_fields, const dtuple_t *v_entry, ulint *extra)
Determines the size of a data tuple prefix in a temporary file.
Definition: rem0rec.cc:1012
rec_set_nth_field
UNIV_INLINE void rec_set_nth_field(rec_t *rec, const ulint *offsets, ulint n, const void *data, ulint len)
This is used to modify the value of an already existing field in a record.
rec_printer
Pretty-printer of records and tuples.
Definition: rem0rec.h:693
rec_get_end
UNIV_INLINE byte * rec_get_end(const rec_t *rec, const ulint *offsets)
Returns a pointer to the end of the record.
rec_get_converted_size
UNIV_INLINE ulint rec_get_converted_size(const dict_index_t *index, const dtuple_t *dtuple, ulint n_ext)
The following function returns the size of a data tuple when converted to a physical record.
rec_get_converted_size_comp_prefix
ulint rec_get_converted_size_comp_prefix(const dict_index_t *index, const dfield_t *fields, ulint n_fields, ulint *extra)
Determines the size of a data tuple prefix in ROW_FORMAT=COMPACT.
Definition: rem0rec.cc:483
rec_print_old
void rec_print_old(FILE *file, const rec_t *rec)
Prints an old-style physical record.
Definition: rem0rec.cc:1355
r
const mysql_service_registry_t * r
Definition: pfs_example_plugin_employee.cc:85
rec_copy
UNIV_INLINE rec_t * rec_copy(void *buf, const rec_t *rec, const ulint *offsets)
Copy a physical record to a buffer.
rec_offs_make_nth_extern
void rec_offs_make_nth_extern(ulint *offsets, const ulint n)
Mark the nth field as externally stored.
Definition: rem0rec.cc:1751
rec_printer::rec_printer
rec_printer(const dtuple_t *tuple)
Construct a pretty-printed tuple.
Definition: rem0rec.h:714
REC_MAX_DATA_SIZE
constexpr ulint REC_MAX_DATA_SIZE
Definition: rem0rec.h:750
rec_get_n_extern_new
ulint rec_get_n_extern_new(const rec_t *rec, const dict_index_t *index, ulint n)
Determine how many of the first n columns in a compact physical record are stored externally.
Definition: rem0rec.cc:171
rec_offs_comp
UNIV_INLINE ulint rec_offs_comp(const ulint *offsets)
Determine if the offsets are for a record in the new compact format.
rec_get_heap_no_old
UNIV_INLINE ulint rec_get_heap_no_old(const rec_t *rec)
The following function is used to get the order number of an old-style record in the heap of the inde...
rec_get_start
UNIV_INLINE byte * rec_get_start(const rec_t *rec, const ulint *offsets)
Returns a pointer to the start of the record.
rec_set_info_bits_old
UNIV_INLINE void rec_set_info_bits_old(rec_t *rec, ulint bits)
The following function is used to set the info bits of a record.
rec_init_offsets_temp
void rec_init_offsets_temp(const rec_t *rec, const dict_index_t *index, ulint *offsets)
Determine the offset to each field in temporary file.
Definition: rem0rec.cc:1026
rec_offs_nth_sql_null
UNIV_INLINE ulint rec_offs_nth_sql_null(const ulint *offsets, ulint n)
Returns nonzero if the SQL NULL bit is set in nth field of rec.
trx0types.h
rec_get_next_ptr
UNIV_INLINE rec_t * rec_get_next_ptr(rec_t *rec, ulint comp)
The following function is used to get the pointer of the next chained record on the same page.
rec_get_nth_field_offs
UNIV_INLINE ulint rec_get_nth_field_offs(const ulint *offsets, ulint n, ulint *len)
The following function is used to get an offset to the nth data field in a record.
rec_convert_dtuple_to_temp
void rec_convert_dtuple_to_temp(rec_t *rec, const dict_index_t *index, const dfield_t *fields, ulint n_fields, const dtuple_t *v_entry)
Builds a temporary file record out of a data tuple.
Definition: rem0rec.cc:1037
rec_set_n_owned_new
UNIV_INLINE void rec_set_n_owned_new(rec_t *rec, page_zip_des_t *page_zip, ulint n_owned)
The following function is used to set the number of owned records.
rec_print_new
void rec_print_new(FILE *file, const rec_t *rec, const ulint *offsets)
Prints a physical record.
Definition: rem0rec.cc:1579
rec_offs_n_extern
UNIV_INLINE ulint rec_offs_n_extern(const ulint *offsets)
Returns the number of extern bits set in a record.
consts::FILE
const std::string FILE("FILE")
ut::ostringstream
std::basic_ostringstream< char, std::char_traits< char >, ut_allocator< char > > ostringstream
Specialization of basic_ostringstream which uses ut_allocator.
Definition: ut0new.h:1275
rec_1_get_field_end_info
UNIV_INLINE ulint rec_1_get_field_end_info(const rec_t *rec, ulint n)
Returns the offset of nth field end if the record is stored in the 1-byte offsets form.
Definition: rec.h:852
rec_2_get_field_end_info
UNIV_INLINE ulint rec_2_get_field_end_info(const rec_t *rec, ulint n)
Returns the offset of nth field end if the record is stored in the 2-byte offsets form.
Definition: rec.h:867
rec_offs_nth_size
UNIV_INLINE ulint rec_offs_nth_size(const ulint *offsets, ulint n)
Gets the physical size of a field.
rec_printer::operator=
rec_printer & operator=(const rec_printer &other)
Assignment operator.
rec_get_trx_id
trx_id_t rec_get_trx_id(const rec_t *rec, const dict_index_t *index)
Reads the DB_TRX_ID of a clustered index record.
Definition: rem0rec.cc:1712
rec_offsets_print
Wrapper for pretty-printing a record.
Definition: rem0rec.h:674
rec_index_print::rec_index_print
rec_index_print(const rec_t *rec, const dict_index_t *index)
Constructor.
Definition: rem0rec.h:658
std
Definition: varlen_sort.h:182
rec_set_next_offs_new
UNIV_INLINE void rec_set_next_offs_new(rec_t *rec, ulint next)
The following function is used to set the next record offset field of a new-style record.
rec_index_print::m_index
const dict_index_t * m_index
Index.
Definition: rem0rec.h:664
rec_print
void rec_print(FILE *file, const rec_t *rec, const dict_index_t *index)
Prints a physical record.
Definition: rem0rec.cc:1612
rec_offsets_print::m_rec
const rec_t * m_rec
Record.
Definition: rem0rec.h:680
rec_get_n_fields_length
UNIV_INLINE uint8_t rec_get_n_fields_length(ulint n_fields)
Get the length of the number of fields for any new style record.
rec_set_info_and_status_bits
UNIV_INLINE void rec_set_info_and_status_bits(rec_t *rec, ulint bits)
The following function is used to set the info and status bits of a record.
rec_set_n_owned_old
UNIV_INLINE void rec_set_n_owned_old(rec_t *rec, ulint n_owned)
The following function is used to set the number of owned records.
rec_print_mbr_rec
void rec_print_mbr_rec(FILE *file, const rec_t *rec, const ulint *offsets)
Prints a spatial index record.
Definition: rem0rec.cc:1514
rec_printer::rec_printer
rec_printer(const rec_t *rec, ulint info, const ulint *offsets)
Construct a pretty-printed record.
Definition: rem0rec.h:707
rec_set_deleted_flag_old
UNIV_INLINE void rec_set_deleted_flag_old(rec_t *rec, ulint flag)
The following function is used to set the deleted bit.
data0data.h
n
int n
Definition: xcom_base.c:425
rec_fold
UNIV_INLINE ulint rec_fold(const rec_t *rec, const ulint *offsets, ulint n_fields, ulint n_bytes, ulint fold, const dict_index_t *index)
Compute a hash value of a prefix of a leaf page record.
dfield_t
Structure for an SQL data field.
Definition: data0data.h:644
rec_get_node_ptr_flag
UNIV_INLINE bool rec_get_node_ptr_flag(const rec_t *rec)
The following function tells if a new-style record is a node pointer.
rec_printer::~rec_printer
virtual ~rec_printer()
Destructor.
Definition: rem0rec.h:726
rec_get_1byte_offs_flag
UNIV_INLINE ibool rec_get_1byte_offs_flag(const rec_t *rec)
The following function is used to test whether the data offsets in the record are stored in one-byte ...
Definition: rec.h:837
info
Log info(cout, "NOTE")
rec_index_print
Wrapper for pretty-printing a record.
Definition: rem0rec.h:656
index
char * index(const char *, int c)
Definition: mysql.cc:2875
mtr0types.h
rec.h
flag
static int flag
Definition: hp_test1.cc:39
rec_set_info_bits_new
UNIV_INLINE void rec_set_info_bits_new(rec_t *rec, ulint bits)
The following function is used to set the info bits of a record.
rem0types.h