MySQL 8.0.40
Source Code Documentation
|
Functions | |
static void | dump_metadata_dict_table (const dict_table_t *table) |
Dumps metadata of table. More... | |
void | validate_rec_offset (const dict_index_t *index, const ulint *offsets, ulint n, ut::Location L) |
Validates offset and field number. More... | |
const byte * | rec_get_nth_field_old (const dict_index_t *index, const rec_t *rec, ulint n, ulint *len) |
ulint | rec_get_nth_field_size (const dict_index_t *index, const rec_t *rec, ulint n) |
Gets the physical size of an old-style field. More... | |
ulint | rec_get_nth_field_offs_old (const dict_index_t *index, 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. More... | |
void | rec_offs_make_nth_extern (dict_index_t *index, ulint *offsets, ulint n) |
Mark the nth field as externally stored. More... | |
ulint | rec_offs_nth_sql_null (const dict_index_t *index, const ulint *offsets, ulint n) |
Returns nonzero if the SQL NULL bit is set in nth field of rec. More... | |
ulint | rec_offs_nth_default (const dict_index_t *index, const ulint *offsets, ulint n) |
Returns nonzero if the default bit is set in nth field of rec. More... | |
ulint | rec_offs_nth_size (const dict_index_t *index, const ulint *offsets, ulint n) |
Gets the physical size of a field. More... | |
void | rec_set_nth_field (const dict_index_t *index, 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. More... | |
ulint | rec_2_is_field_extern (const dict_index_t *index, const rec_t *rec, ulint n) |
Returns nonzero if the field is stored off-page. More... | |
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 field lengths. More... | |
|
static |
Dumps metadata of table.
[in] | table | InnoDB table object |
ulint rec_2_is_field_extern | ( | const dict_index_t * | index, |
const rec_t * | rec, | ||
ulint | n | ||
) |
Returns nonzero if the field is stored off-page.
[in] | index | index |
[in] | rec | record |
[in] | n | field index |
0 | if the field is stored in-page |
REC_2BYTE_EXTERN_MASK | if the field is stored externally |
The following function returns the data size of an old-style physical record, that is the sum of field lengths.
SQL null fields are counted as length 0 fields. The value returned by the function is the distance from record origin to record end in bytes.
ulint rec_get_nth_field_offs_old | ( | const dict_index_t * | index, |
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.
[in] | index | record descriptor |
[in] | rec | record |
[in] | n | index of the field |
[in] | len | length of the field;UNIV_SQL_NULL if SQL null |
const byte * rec_get_nth_field_old | ( | const dict_index_t * | index, |
const rec_t * | rec, | ||
ulint | n, | ||
ulint * | len | ||
) |
ulint rec_get_nth_field_size | ( | const dict_index_t * | index, |
const rec_t * | rec, | ||
ulint | n | ||
) |
Gets the physical size of an old-style field.
Also an SQL null may have a field of size > 0, if the data type is of a fixed size.
[in] | index | record descriptor |
[in] | rec | record |
[in] | n | index of the field |
void rec_offs_make_nth_extern | ( | dict_index_t * | index, |
ulint * | offsets, | ||
ulint | n | ||
) |
Mark the nth field as externally stored.
[in] | index | record descriptor |
[in] | offsets | array returned by rec_get_offsets() |
[in] | n | nth field |
ulint rec_offs_nth_default | ( | const dict_index_t * | index, |
const ulint * | offsets, | ||
ulint | n | ||
) |
Returns nonzero if the default bit is set in nth field of rec.
[in] | index | record descriptor |
[in] | offsets | array returned by rec_get_offsets() |
[in] | n | nth field |
ulint rec_offs_nth_size | ( | const dict_index_t * | index, |
const ulint * | offsets, | ||
ulint | n | ||
) |
Gets the physical size of a field.
[in] | index | record descriptor |
[in] | offsets | array returned by rec_get_offsets() |
[in] | n | nth field |
ulint rec_offs_nth_sql_null | ( | const dict_index_t * | index, |
const ulint * | offsets, | ||
ulint | n | ||
) |
Returns nonzero if the SQL NULL bit is set in nth field of rec.
[in] | index | record descriptor |
[in] | offsets | array returned by rec_get_offsets() |
[in] | n | nth field |
void rec_set_nth_field | ( | const dict_index_t * | index, |
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.
The previous value must have exactly the same size as the new value. If len is UNIV_SQL_NULL then the field is treated as an SQL null. For records in ROW_FORMAT=COMPACT (new-style records), len must not be UNIV_SQL_NULL unless the field already is SQL null.
[in] | index | record descriptor |
[in] | rec | record |
[in] | offsets | array returned by rec_get_offsets() |
[in] | n | index number of the field |
[in] | len | length of the data or UNIV_SQL_NULL. If not SQL null, must have the same length as the previous value. If SQL null, previous value must be SQL null. |
[in] | data | pointer to the data if not SQL null |
void validate_rec_offset | ( | const dict_index_t * | index, |
const ulint * | offsets, | ||
ulint | n, | ||
ut::Location | L | ||
) |
Validates offset and field number.
[in] | index | record descriptor |
[in] | offsets | array returned by rec_get_offsets() |
[in] | n | nth field |
[in] | L | Line number of calling satement |