![]() |
MySQL 8.0.43
Source Code Documentation
|
Record manager. More...
#include "rem0rec.h"#include "rem0lrec.h"#include <sys/types.h>#include "data0data.h"#include "fts0fts.h"#include "gis0geo.h"#include "mach0data.h"#include "mtr0log.h"#include "mtr0mtr.h"#include "page0page.h"#include "trx0sys.h"#include "my_dbug.h"Functions | |
| static bool | rec_validate_old (const rec_t *rec) |
| Validates the consistency of an old-style physical record. More... | |
| 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. More... | |
| bool | is_store_version (const dict_index_t *index, size_t n_tuple_fields) |
| For a given clustered index, version is to be stored on physical record. More... | |
| static size_t | get_nullable_fields_for_rec (const dict_index_t *index, const size_t n_fields, uint8_t &rec_version) |
| static ulint | rec_get_converted_size_comp_prefix_low (const dict_index_t *index, const dfield_t *fields, ulint n_fields, const dtuple_t *v_entry, ulint *extra, ulint *status, bool temp, uint8_t rec_version) |
| Determines the size of a data tuple prefix in ROW_FORMAT=COMPACT. More... | |
| 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. More... | |
| 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. More... | |
| static rec_t * | rec_convert_dtuple_to_rec_old (byte *buf, const dict_index_t *index, const dtuple_t *dtuple) |
| Builds an old-style physical record out of a data tuple and stores it beginning from the start of the given buffer. More... | |
| size_t | get_extra_bytes_for_temp_redundant (const dict_index_t *index, bool valid_version) |
| static Rec_instant_state | rec_convert_dtuple_to_rec_comp (rec_t *rec, const dict_index_t *index, const dfield_t *fields, ulint n_fields, const dtuple_t *v_entry, ulint status, bool temp, uint8_t rec_version) |
| Builds a ROW_FORMAT=COMPACT record out of a data tuple. More... | |
| static rec_t * | rec_convert_dtuple_to_rec_new (byte *buf, const dict_index_t *index, const dtuple_t *dtuple) |
| Builds a new-style physical record out of a data tuple and stores it beginning from the start of the given buffer. More... | |
| rec_t * | rec_convert_dtuple_to_rec (byte *buf, const dict_index_t *index, const dtuple_t *dtuple) |
| Builds a physical record out of a data tuple and stores it beginning from the start of the given buffer. More... | |
| ulint | rec_get_serialize_size (const dict_index_t *index, const dfield_t *fields, ulint n_fields, const dtuple_t *v_entry, ulint *extra, uint8_t rec_version) |
| Determines the size of a data tuple prefix in ROW_FORMAT=COMPACT. More... | |
| void | rec_deserialize_init_offsets (const rec_t *rec, const dict_index_t *index, ulint *offsets) |
| Determine the offset to each field in temporary file. More... | |
| void | rec_serialize_dtuple (rec_t *rec, const dict_index_t *index, const dfield_t *fields, ulint n_fields, const dtuple_t *v_entry, uint8_t rec_version) |
| Builds a temporary file record out of a data tuple. More... | |
| 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. More... | |
| static rec_t * | rec_copy_prefix_to_buf_old (const rec_t *rec, ulint n_fields, ulint area_end, byte **buf, size_t *buf_size) |
| Copies the first n fields of an old-style physical record to a new physical record in a buffer. More... | |
| 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. More... | |
| bool | rec_validate (const rec_t *rec, const ulint *offsets) |
| Validates the consistency of a physical record. More... | |
| void | rec_print_old (FILE *file, const rec_t *rec) |
| Prints an old-style physical record. More... | |
| static void | rec_print_comp (FILE *file, const rec_t *rec, const ulint *offsets) |
| Prints a physical record in ROW_FORMAT=COMPACT. More... | |
| static void | rec_print_mbr_old (FILE *file, const rec_t *rec) |
| Prints an old-style spatial index record. More... | |
| void | rec_print_mbr_rec (FILE *file, const rec_t *rec, const ulint *offsets) |
| Prints a spatial index record. More... | |
| void | rec_print_new (FILE *file, const rec_t *rec, const ulint *offsets) |
| Prints a physical record. More... | |
| void | rec_print (FILE *file, const rec_t *rec, const dict_index_t *index) |
| Prints a physical record. More... | |
| void | rec_print (std::ostream &o, const rec_t *rec, ulint info, const ulint *offsets) |
| Pretty-print a record. More... | |
| std::ostream & | operator<< (std::ostream &o, const rec_index_print &r) |
| Display a record. More... | |
| std::ostream & | operator<< (std::ostream &o, const rec_offsets_print &r) |
| Display a record. More... | |
| 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. More... | |
Record manager.
Created 5/30/1994 Heikki Tuuri
| size_t get_extra_bytes_for_temp_redundant | ( | const dict_index_t * | index, |
| bool | valid_version | ||
| ) |
|
static |
| bool is_store_version | ( | const dict_index_t * | index, |
| size_t | n_tuple_fields | ||
| ) |
For a given clustered index, version is to be stored on physical record.
| [in] | index | clustered index |
| [in] | n_tuple_fields | number of fields in tuple |
| std::ostream & operator<< | ( | std::ostream & | o, |
| const rec_index_print & | r | ||
| ) |
Display a record.
| [in,out] | o | output stream |
| [in] | r | record to display |
| std::ostream & operator<< | ( | std::ostream & | o, |
| const rec_offsets_print & | r | ||
| ) |
Display a record.
| [in,out] | o | output stream |
| [in] | r | record to display |
| rec_t * rec_convert_dtuple_to_rec | ( | byte * | buf, |
| const dict_index_t * | index, | ||
| const dtuple_t * | dtuple | ||
| ) |
Builds a physical record out of a data tuple and stores it beginning from the start of the given buffer.
Builds a physical record out of a data tuple and stores it into the given buffer.
| buf | in: start address of the physical record |
| index | in: record descriptor |
| dtuple | in: data tuple |
|
inlinestatic |
Builds a ROW_FORMAT=COMPACT record out of a data tuple.
| [in,out] | rec | origin of record |
| [in] | index | record descriptor |
| [in] | fields | array of data fields |
| [in] | n_fields | number of data fields |
| [in] | v_entry | dtuple contains virtual column data |
| [in] | status | status bits of the record |
| [in] | temp | whether to use the format for temporary files in index creation |
| [in] | rec_version | rec version (could be 0 also) |
|
static |
Builds a new-style physical record out of a data tuple and stores it beginning from the start of the given buffer.
| [in] | buf | start address of the physical record |
| [in] | index | record descriptor |
| [in] | dtuple | data tuple |
|
static |
Builds an old-style physical record out of a data tuple and stores it beginning from the start of the given buffer.
| [in] | buf | start address of the physical record |
| [in] | index | record descriptor |
| [in] | dtuple | data tuple |
| 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.
| [in] | rec | physical record |
| [in] | index | record descriptor |
| [in] | n_fields | number of fields to copy |
| [in,out] | buf | memory buffer for the copied prefix, or NULL |
| [in,out] | buf_size | buffer size |
|
static |
Copies the first n fields of an old-style physical record to a new physical record in a buffer.
| [in] | rec | physical record |
| [in] | n_fields | number of fields to copy |
| [in] | area_end | end of the prefix data |
| [in,out] | buf | memory buffer for the copied prefix, or NULL |
| [in,out] | buf_size | buffer size |
| 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.
The fields are copied to the memory heap.
| tuple | out: data tuple |
| rec | in: physical record |
| index | in: record descriptor |
| n_fields | in: number of fields to copy |
| heap | in: memory heap |
| void rec_deserialize_init_offsets | ( | const rec_t * | rec, |
| const dict_index_t * | index, | ||
| ulint * | offsets | ||
| ) |
Determine the offset to each field in temporary file.
| rec | in: temporary file record |
| index | in: record descriptor |
| offsets | in/out: array of offsets; in: n=rec_offs_n_fields(offsets) |
| 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.
| index | in: record descriptor; dict_table_is_comp() is assumed to hold, even if it does not |
| status | in: status bits of the record |
| fields | in: array of data fields |
| n_fields | in: number of data fields |
| extra | out: extra size |
| 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.
| index | in: record descriptor |
| fields | in: array of data fields |
| n_fields | in: number of data fields |
| extra | out: extra size |
|
inlinestatic |
Determines the size of a data tuple prefix in ROW_FORMAT=COMPACT.
| [in] | index | record descriptor, dict_table_is_comp() is assumed to hold, even if it does not |
| [in] | fields | array of data fields |
| [in] | n_fields | number of data fields |
| [in] | v_entry | dtuple contains virtual column data |
| [out] | extra | extra size |
| [in] | status | status bits of the record, can be nullptr if unnecessary |
| [in] | temp | whether this is a temporary file record |
| [in] | rec_version | rec version if INSTANT |
| 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.
| rec | in: compact physical record |
| index | in: record descriptor |
| n | in: number of columns to scan |
| ulint rec_get_serialize_size | ( | const dict_index_t * | index, |
| const dfield_t * | fields, | ||
| ulint | n_fields, | ||
| const dtuple_t * | v_entry, | ||
| ulint * | extra, | ||
| uint8_t | rec_version | ||
| ) |
Determines the size of a data tuple prefix in ROW_FORMAT=COMPACT.
Determines the size of a data tuple prefix in a temporary file.
| 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.
| rec | in: record |
| index | in: clustered index |
| void rec_print | ( | FILE * | file, |
| const rec_t * | rec, | ||
| const dict_index_t * | index | ||
| ) |
Prints a physical record.
| [in] | file | File where to print |
| [in] | rec | Physical record |
| [in] | index | Record descriptor |
Pretty-print a record.
| [in,out] | o | output stream |
| [in] | rec | physical record |
| [in] | info | rec_get_info_bits(rec) |
| [in] | offsets | rec_get_offsets(rec) |
Prints a physical record in ROW_FORMAT=COMPACT.
Ignores the record header.
| file | in: file where to print |
| rec | in: physical record |
| offsets | in: array returned by rec_get_offsets() |
|
static |
Prints an old-style spatial index record.
| file | in: file where to print |
| rec | in: physical record |
Prints a spatial index record.
| [in] | file | File where to print |
| [in] | rec | Physical record |
| [in] | offsets | Array returned by rec_get_offsets() |
Prints a physical record.
| [in] | file | file where to print |
| [in] | rec | physical record |
| [in] | offsets | array returned by rec_get_offsets() |
| file | in: file where to print |
| rec | in: physical record |
| offsets | in: array returned by rec_get_offsets() |
| void rec_print_old | ( | FILE * | file, |
| const rec_t * | rec | ||
| ) |
Prints an old-style physical record.
| [in] | file | File where to print |
| [in] | rec | Physical record |
| void rec_serialize_dtuple | ( | rec_t * | rec, |
| const dict_index_t * | index, | ||
| const dfield_t * | fields, | ||
| ulint | n_fields, | ||
| const dtuple_t * | v_entry, | ||
| uint8_t | rec_version | ||
| ) |
Builds a temporary file record out of a data tuple.
| [out] | rec | record |
| [in] | index | record descriptor |
| [in] | fields | array of data fields |
| [in] | n_fields | number of fields |
| [in] | v_entry | dtuple contains virtual column data |
| [in] | rec_version | rec version |
Validates the consistency of a physical record.
| [in] | rec | physical record |
| [in] | offsets | array returned by rec_get_offsets() |
|
static |
Validates the consistency of an old-style physical record.
| [in] | rec | physical record |