MySQL 8.4.2
Source Code Documentation
|
SQL data field and tuple. More...
#include <sys/types.h>
#include <new>
#include "data0data.h"
#include "ha_prototypes.h"
#include "btr0cur.h"
#include "dict0dict.h"
#include "lob0lob.h"
#include "page0page.h"
#include "page0zip.h"
#include "rem0cmp.h"
#include "rem0rec.h"
#include "row0mysql.h"
#include "row0upd.h"
Functions | |
bool | dtuple_coll_eq (const dtuple_t *tuple1, const dtuple_t *tuple2) |
Compare two data tuples. More... | |
void | dtuple_set_n_fields (dtuple_t *tuple, ulint n_fields) |
Sets number of fields used in a tuple. More... | |
static bool | dfield_check_typed_no_assert (const dfield_t *field) |
Checks that a data field is typed. More... | |
static bool | dtuple_check_typed_no_assert (const dtuple_t *tuple) |
Checks that a data tuple is typed. More... | |
bool | dfield_check_typed (const dfield_t *field) |
Checks that a data field is typed. More... | |
bool | dtuple_check_typed (const dtuple_t *tuple) |
Checks that a data tuple is typed. More... | |
bool | dtuple_validate (const dtuple_t *tuple) |
Validates the consistency of a tuple which must be complete, i.e, all fields must have been set. More... | |
void | dfield_print_also_hex (const dfield_t *dfield) |
Pretty prints a dfield value according to its data type. More... | |
static void | dfield_print_raw (FILE *f, const dfield_t *dfield) |
Print a dfield value using ut_print_buf. More... | |
void | dtuple_print (FILE *f, const dtuple_t *tuple) |
The following function prints the contents of a tuple. More... | |
void | dfield_print (std::ostream &o, const dfield_t *field, ulint n) |
Print the contents of a tuple. More... | |
void | dtuple_print (std::ostream &o, const dtuple_t *tuple) |
Print the contents of a tuple. More... | |
big_rec_t * | dtuple_convert_big_rec (dict_index_t *index, upd_t *upd, dtuple_t *entry) |
Moves parts of long fields in entry to the big record vector so that the size of tuple drops below the maximum record size allowed in the database. More... | |
void | dtuple_convert_back_big_rec (dtuple_t *entry, big_rec_t *vector) |
Puts back to entry the data stored in vector. More... | |
bool | is_multi_value_clust_and_sec_equal (const byte *clust_field, uint64_t clust_len, const byte *sec_field, uint64_t sec_len, const dict_col_t *col) |
Compare a multi-value clustered index field with a secondary index field, to see if they are equal. More... | |
Variables | |
byte | data_error |
Dummy variable to catch access to uninitialized fields. More... | |
SQL data field and tuple.
Created 5/30/1994 Heikki Tuuri
bool dfield_check_typed | ( | const dfield_t * | field | ) |
Checks that a data field is typed.
Asserts an error if not.
|
static |
Checks that a data field is typed.
[in] | field | Data field. |
Print the contents of a tuple.
[out] | o | output stream |
[in] | field | array of data fields |
[in] | n | number of data fields |
void dfield_print_also_hex | ( | const dfield_t * | dfield | ) |
Pretty prints a dfield value according to its data type.
Also the hex string is printed if a string contains non-printable characters. in: dfield
|
static |
Print a dfield value using ut_print_buf.
[in,out] | f | Output stream. |
[in] | dfield | Value to print. |
bool dtuple_check_typed | ( | const dtuple_t * | tuple | ) |
Checks that a data tuple is typed.
Asserts an error if not.
|
static |
Checks that a data tuple is typed.
[in] | tuple | Tuple to check. |
Compare two data tuples.
[in] | tuple1 | first data tuple |
[in] | tuple2 | second data tuple |
Puts back to entry the data stored in vector.
Note that to ensure the fields in entry can accommodate the data, vector must have been created from entry with dtuple_convert_big_rec.
[in] | entry | Entry whose data was put to vector. |
[in] | vector | Big rec vector; it is freed in this function |
big_rec_t * dtuple_convert_big_rec | ( | dict_index_t * | index, |
upd_t * | upd, | ||
dtuple_t * | entry | ||
) |
Moves parts of long fields in entry to the big record vector so that the size of tuple drops below the maximum record size allowed in the database.
Moves data only from those fields which are not necessary to determine uniquely the insertion place of the tuple in the index.
[in,out] | index | Index that owns the record. |
[in,out] | upd | Update vector. |
[in,out] | entry | Index entry. |
void dtuple_print | ( | FILE * | f, |
const dtuple_t * | tuple | ||
) |
The following function prints the contents of a tuple.
[in,out] | f | Output stream. |
[in] | tuple | Tuple to print. |
void dtuple_print | ( | std::ostream & | o, |
const dtuple_t * | tuple | ||
) |
Print the contents of a tuple.
[out] | o | output stream |
[in] | tuple | data tuple |
Sets number of fields used in a tuple.
Normally this is set in dtuple_create, but if you want later to set it smaller, you can use this.
[in] | tuple | Tuple. |
[in] | n_fields | Number of fields. |
bool dtuple_validate | ( | const dtuple_t * | tuple | ) |
Validates the consistency of a tuple which must be complete, i.e, all fields must have been set.
bool is_multi_value_clust_and_sec_equal | ( | const byte * | clust_field, |
uint64_t | clust_len, | ||
const byte * | sec_field, | ||
uint64_t | sec_len, | ||
const dict_col_t * | col | ||
) |
Compare a multi-value clustered index field with a secondary index field, to see if they are equal.
If the clustered index field is the array, then equal means it contains the secondary index field
[in] | clust_field | clustered index field |
[in] | clust_len | clustered index field length |
[in] | sec_field | secondary index field |
[in] | sec_len | secondary index field length |
[in] | col | the column tied to this field |
byte data_error |
Dummy variable to catch access to uninitialized fields.
In the debug version, dtuple_create() will make all fields of dtuple_t point to data_error.