MySQL 9.1.0
Source Code Documentation
|
Record manager. More...
#include <stddef.h>
#include "dict0dict.h"
#include "mem0mem.h"
#include "rem/rec.h"
#include "rem0lrec.h"
#include "rem0rec.h"
Functions | |
static void | rec_init_offsets_new (const rec_t *rec, const dict_index_t *index, ulint *offsets) |
NOTE: The functions in this file should only use functions from other files in library. More... | |
static void | rec_init_offset_old_1byte (const rec_t *rec, const dict_index_t *index, ulint *offsets, row_version_t row_version) |
Initialize offsets for record in REDUNDNT format when each field offsets is stored in 1 byte. More... | |
static void | rec_init_offset_old_2byte (const rec_t *rec, const dict_index_t *index, ulint *offsets, row_version_t row_version) |
Initialize offsets for record in REDUNDNT format when each field offsets is stored in 2 byte. More... | |
static void | rec_init_offsets_old (const rec_t *rec, const dict_index_t *index, ulint *offsets) |
Initialize offset for each field in an old style record. More... | |
void | rec_init_offsets (const rec_t *rec, const dict_index_t *index, ulint *offsets) |
The following function determines the offsets to each field in the record. More... | |
ulint * | rec_get_offsets (const rec_t *rec, const dict_index_t *index, ulint *offsets, ulint n_fields, ut::Location location, mem_heap_t **heap) |
The following function determines the offsets to each field in the record. More... | |
void | rec_get_offsets_reverse (const byte *extra, const dict_index_t *index, ulint node_ptr, ulint *offsets) |
The following function determines the offsets to each field in the record. More... | |
bool | rec_offs_cmp (ulint *offsets1, ulint *offsets2) |
Check if the given two record offsets are identical. More... | |
std::ostream & | rec_offs_print (std::ostream &out, const ulint *offsets) |
Print the record offsets. More... | |
Record manager.
Created 5/30/1994 Heikki Tuuri
ulint * rec_get_offsets | ( | const rec_t * | rec, |
const dict_index_t * | index, | ||
ulint * | offsets, | ||
ulint | n_fields, | ||
ut::Location | location, | ||
mem_heap_t ** | heap | ||
) |
The following function determines the offsets to each field in the record.
It can reuse a previously allocated array. Note that after instant ADD COLUMN, if this is a record from clustered index, fields in the record may be less than the fields defined in the clustered index. So the offsets size is allocated according to the clustered index fields.
[in] | rec | physical record |
[in] | index | record descriptor |
[in,out] | offsets | array consisting of offsets[0] allocated elements, or an array from rec_get_offsets(), or NULL |
[in] | n_fields | maximum number of initialized fields (ULINT_UNDEFINED is all fields) |
[in] | location | location where called |
[in,out] | heap | memory heap |
void rec_get_offsets_reverse | ( | const byte * | extra, |
const dict_index_t * | index, | ||
ulint | node_ptr, | ||
ulint * | offsets | ||
) |
The following function determines the offsets to each field in the record.
It can reuse a previously allocated array.
extra | in: the extra bytes of a compact record in reverse order, excluding the fixed-size REC_N_NEW_EXTRA_BYTES |
index | in: record descriptor |
node_ptr | in: nonzero=node pointer, 0=leaf node |
offsets | in/out: array consisting of offsets[0] allocated elements |
|
static |
Initialize offsets for record in REDUNDNT format when each field offsets is stored in 1 byte.
[in] | rec | physical record |
[in] | index | record descriptor |
[in,out] | offsets | array of offsets |
[in] | row_version | row version in record |
|
static |
Initialize offsets for record in REDUNDNT format when each field offsets is stored in 2 byte.
[in] | rec | physical record |
[in] | index | record descriptor |
[in,out] | offsets | array of offsets |
[in] | row_version | row version in record |
void rec_init_offsets | ( | const rec_t * | rec, |
const dict_index_t * | index, | ||
ulint * | offsets | ||
) |
The following function determines the offsets to each field in the record.
The offsets are written to a previously allocated array of ulint, where rec_offs_n_fields(offsets) has been initialized to the number of fields in the record. The rest of the array will be initialized by this function.
[in] | rec | physical record |
[in] | index | record descriptor |
[in,out] | offsets | array of offsets |
|
static |
NOTE: The functions in this file should only use functions from other files in library.
The code in this file is used to make a library for external tools. Initialize offset for each field in a new style record.
[in] | rec | physical record |
[in] | index | record descriptor |
[in,out] | offsets | array of offsets |
|
static |
Initialize offset for each field in an old style record.
[in] | rec | physical record |
[in] | index | record descriptor |
[in,out] | offsets | array of offsets |
Check if the given two record offsets are identical.
[in] | offsets1 | field offsets of a record |
[in] | offsets2 | field offsets of a record |
std::ostream & rec_offs_print | ( | std::ostream & | out, |
const ulint * | offsets | ||
) |
Print the record offsets.
[in] | out | the output stream to which offsets are printed. |
[in] | offsets | the field offsets of the record. |