MySQL 8.0.40
Source Code Documentation
dtuple_t Struct Reference

Structure for an SQL data tuple of fields (logical record) More...

#include <data0data.h>

Public Member Functions

 UT_LIST_NODE_T (dtuple_t) tuple_list
 Data tuples can be linked into a list using this field. More...
 
std::ostream & print (std::ostream &out) const
 Print the tuple to the output stream. More...
 
trx_id_t get_trx_id () const
 Read the trx id from the tuple (DB_TRX_ID) More...
 
void ignore_trailing_default (const dict_index_t *index)
 Ignore at most n trailing default fields if this is a tuple from instant index. More...
 
int compare (const rec_t *rec, const dict_index_t *index, const ulint *offsets, ulint *matched_fields) const
 Compare a data tuple to a physical record. More...
 
int compare (const rec_t *rec, const dict_index_t *index, const ulint *offsets) const
 Compare a data tuple to a physical record. More...
 
size_t get_n_ext () const
 Get number of externally stored fields. More...
 
bool has_ext () const
 Does tuple has externally stored fields. More...
 

Public Attributes

uint16_t info_bits
 info bits of an index record: the default is 0; this field is used if an index record is built from a data tuple More...
 
uint16_t n_fields
 Number of fields in dtuple. More...
 
uint16_t n_fields_cmp
 number of fields which should be used in comparison services of rem0cmp. More...
 
dfield_tfields
 Fields. More...
 
uint16_t n_v_fields
 Number of virtual fields. More...
 
dfield_tv_fields
 Fields on virtual column. More...
 
mem_heap_tm_heap {}
 Memory heap where this tuple is allocated. More...
 
size_t magic_n {MAGIC_N}
 Magic number, used in debug assertions. More...
 

Static Public Attributes

static constexpr size_t MAGIC_N = 614679
 Value of dtuple_t::magic_n. More...
 

Detailed Description

Structure for an SQL data tuple of fields (logical record)

Member Function Documentation

◆ compare() [1/2]

int dtuple_t::compare ( const rec_t rec,
const dict_index_t index,
const ulint offsets 
) const
inline

Compare a data tuple to a physical record.

Parameters
[in]recrecord
[in]indexindex
[in]offsetsrec_get_offsets(rec)
Returns
the comparison result of dtuple and rec
Return values
0if dtuple is equal to rec
negativeif dtuple is less than rec
positiveif dtuple is greater than rec

◆ compare() [2/2]

int dtuple_t::compare ( const rec_t rec,
const dict_index_t index,
const ulint offsets,
ulint matched_fields 
) const

Compare a data tuple to a physical record.

Parameters
[in]recrecord
[in]indexindex
[in]offsetsrec_get_offsets(rec)
[in,out]matched_fieldsnumber of completely matched fields
Returns
the comparison result of dtuple and rec
Return values
0if dtuple is equal to rec
negativeif dtuple is less than rec
positiveif dtuple is greater than rec

◆ get_n_ext()

size_t dtuple_t::get_n_ext ( ) const
inline

Get number of externally stored fields.

Return values
numberof externally stored fields.

◆ get_trx_id()

trx_id_t dtuple_t::get_trx_id ( ) const

Read the trx id from the tuple (DB_TRX_ID)

Returns
transaction id of the tuple.

◆ has_ext()

bool dtuple_t::has_ext ( ) const
inline

Does tuple has externally stored fields.

Return values
trueif there is externally stored fields.

◆ ignore_trailing_default()

void dtuple_t::ignore_trailing_default ( const dict_index_t index)

Ignore at most n trailing default fields if this is a tuple from instant index.

Parameters
[in]indexclustered index object for this tuple

◆ print()

std::ostream & dtuple_t::print ( std::ostream &  out) const
inline

Print the tuple to the output stream.

Parameters
[in,out]outStream to output to.
Returns
stream

◆ UT_LIST_NODE_T()

dtuple_t::UT_LIST_NODE_T ( dtuple_t  )

Data tuples can be linked into a list using this field.

Member Data Documentation

◆ fields

dfield_t* dtuple_t::fields

Fields.

◆ info_bits

uint16_t dtuple_t::info_bits

info bits of an index record: the default is 0; this field is used if an index record is built from a data tuple

◆ m_heap

mem_heap_t* dtuple_t::m_heap {}

Memory heap where this tuple is allocated.

◆ MAGIC_N

constexpr size_t dtuple_t::MAGIC_N = 614679
staticconstexpr

Value of dtuple_t::magic_n.

◆ magic_n

size_t dtuple_t::magic_n {MAGIC_N}

Magic number, used in debug assertions.

◆ n_fields

uint16_t dtuple_t::n_fields

Number of fields in dtuple.

◆ n_fields_cmp

uint16_t dtuple_t::n_fields_cmp

number of fields which should be used in comparison services of rem0cmp.

*; the index search is performed by comparing only these fields, others are ignored; the default value in dtuple creation is the same value as n_fields

◆ n_v_fields

uint16_t dtuple_t::n_v_fields

Number of virtual fields.

◆ v_fields

dfield_t* dtuple_t::v_fields

Fields on virtual column.


The documentation for this struct was generated from the following files: