MySQL 8.0.39
Source Code Documentation
row_prebuilt_t Struct Reference

A struct for (sometimes lazily) prebuilt structures in an Innobase table handle used within MySQL; these are used to save CPU time. More...

#include <row0mysql.h>

Classes

class  row_is_reading_range_guard_t
 

Public Types

enum  { LOCK_PCUR , LOCK_CLUST_PCUR , LOCK_COUNT }
 

Public Member Functions

bool is_reading_range () const
 
row_is_reading_range_guard_t get_is_reading_range_guard ()
 
lob::undo_vers_tget_lob_undo ()
 
void lob_undo_reset ()
 
bool can_prefetch_records () const
 Can a record buffer or a prefetch cache be utilized for prefetching records in this scan? More...
 
bool allow_duplicates ()
 Determines if the query is REPLACE or ON DUPLICATE KEY UPDATE in which case duplicate values should be allowed (and further processed) instead of causing an error. More...
 
void try_unlock (bool has_latches_on_recs)
 This is an no-op unless trx is using a READ COMMITTED or READ UNCOMMITTED isolation level. More...
 
size_t new_rec_locks_count () const
 Counts how many elements of. More...
 
void init_search_tuples_types ()
 Initializes search_tuple and m_stop_tuple shape so they match the index. More...
 
void clear_search_tuples ()
 Resets both search_tuple and m_stop_tuple. More...
 
void end_stmt ()
 Inside this function perform activity that needs to be done at the end of statement. More...
 
bool skip_concurrency_ticket () const
 
 row_prebuilt_t (row_prebuilt_t const &)=delete
 It is unsafe to copy this struct, and moving it would be non-trivial, because we want to keep in sync with row_is_reading_range_guard_t. More...
 
row_prebuilt_toperator= (row_prebuilt_t const &)=delete
 
row_prebuilt_toperator= (row_prebuilt_t &&)=delete
 
 row_prebuilt_t (row_prebuilt_t &&)=delete
 

Public Attributes

ulint magic_n
 this magic number is set to ROW_PREBUILT_ALLOCATED when created, or ROW_PREBUILT_FREED when the struct has been freed More...
 
dict_table_ttable
 Innobase table handle. More...
 
dict_index_tindex
 current index for a search, if any More...
 
trx_ttrx
 current transaction handle More...
 
unsigned sql_stat_start: 1
 true when we start processing of an SQL statement: we may have to set an intention lock on the table, create a consistent read view etc. More...
 
unsigned clust_index_was_generated: 1
 if the user did not define a primary key in MySQL, then Innobase automatically generated a clustered index where the ordering column is the row id: in this case this flag is set to true More...
 
unsigned index_usable: 1
 caches the value of index->is_usable(trx) More...
 
unsigned read_just_key: 1
 set to 1 when MySQL calls ha_innobase::extra with the argument HA_EXTRA_KEYREAD; it is enough to read just columns defined in the index (i.e., no read of the clustered index record necessary) More...
 
unsigned used_in_HANDLER: 1
 true if we have been using this handle in a MySQL HANDLER low level index cursor command: then we must store the pcur position even in a unique search from a clustered index, because HANDLER allows NEXT and PREV in such a situation More...
 
unsigned template_type: 2
 ROW_MYSQL_WHOLE_ROW, ROW_MYSQL_REC_FIELDS, ROW_MYSQL_DUMMY_TEMPLATE, or ROW_MYSQL_NO_TEMPLATE. More...
 
unsigned n_template: 10
 number of elements in the template More...
 
unsigned null_bitmap_len: 10
 number of bytes in the SQL NULL bitmap at the start of a row in the MySQL format More...
 
unsigned need_to_access_clustered: 1
 if we are fetching columns through a secondary index and at least one column is not in the secondary index, then this is set to true More...
 
unsigned templ_contains_blob: 1
 true if the template contains a column with DATA_LARGE_MTYPE( get_innobase_type_from_mysql_type()) is true; not to be confused with InnoDB externally stored columns (VARCHAR can be off-page too) More...
 
unsigned templ_contains_fixed_point: 1
 true if the template contains a column with DATA_POINT. More...
 
unsigned on_duplicate_key_update: 1
 1 if extra(HA_EXTRA_INSERT_WITH_UPDATE) was requested, which happens when ON DUPLICATE KEY UPDATE clause is present, 0 otherwise More...
 
unsigned replace: 1
 1 if extra(HA_EXTRA_WRITE_CAN_REPLACE) was requested, which happen when REPLACE is done instead of regular INSERT, 0 otherwise More...
 
mysql_row_templ_tmysql_template
 template used to transform rows fast between MySQL and Innobase formats; memory for this template is not allocated from 'heap' More...
 
mem_heap_theap
 memory heap from which these auxiliary structures are allocated when needed More...
 
mem_heap_tcursor_heap
 memory heap from which innodb_api_buf is allocated per session More...
 
ins_node_tins_node
 Innobase SQL insert node used to perform inserts to the table. More...
 
byteins_upd_rec_buff
 buffer for storing data converted to the Innobase format from the MySQL format More...
 
multi_value_datamv_data
 
const bytedefault_rec
 the default values of all columns (a "default row") in MySQL format More...
 
ulint hint_need_to_fetch_extra_cols
 normally this is set to 0; if this is set to ROW_RETRIEVE_PRIMARY_KEY, then we should at least retrieve all columns in the primary key; if this is set to ROW_RETRIEVE_ALL_COLS, then we must retrieve all columns in the key (if read_just_key == 1), or all columns in the table More...
 
upd_node_tupd_node
 Innobase SQL update node used to perform updates and deletes. More...
 
trx_id_t trx_id
 The table->def_trx_id when ins_graph was built. More...
 
que_fork_tins_graph
 Innobase SQL query graph used in inserts. More...
 
que_fork_tupd_graph
 Innobase SQL query graph used in updates or deletes. More...
 
btr_pcur_tpcur
 persistent cursor used in selects and updates More...
 
btr_pcur_tclust_pcur
 persistent cursor used in some selects and updates More...
 
que_fork_tsel_graph
 dummy query graph used in selects More...
 
dtuple_tsearch_tuple
 prebuilt dtuple used in selects More...
 
dtuple_tm_stop_tuple
 prebuilt dtuple used in selects where the end of range is known More...
 
bool m_stop_tuple_found
 Set to true in row_search_mvcc when a row matching exactly the length and value of stop_tuple was found, so that the next iteration of row_search_mvcc knows it can simply return DB_RECORD_NOT_FOUND. More...
 
byte row_id [DATA_ROW_ID_LEN]
 if the clustered index was generated, the row id of the last row fetched is stored here More...
 
doc_id_t fts_doc_id
 
dtuple_tclust_ref
 prebuilt dtuple used in sel/upd/del More...
 
ulint select_lock_type
 LOCK_NONE, LOCK_S, or LOCK_X. More...
 
enum select_mode select_mode
 SELECT_ORDINARY, SELECT_SKIP_LOKCED, or SELECT_NO_WAIT. More...
 
ulint row_read_type
 ROW_READ_WITH_LOCKS if row locks should be the obtained for records under an UPDATE or DELETE cursor. More...
 
ulint mysql_prefix_len
 byte offset of the end of the last requested column More...
 
ulint mysql_row_len
 length in bytes of a row in the MySQL format More...
 
ulint n_rows_fetched
 number of rows fetched after positioning the current cursor
More...
 
ulint fetch_direction
 ROW_SEL_NEXT or ROW_SEL_PREV. More...
 
bytefetch_cache [MYSQL_FETCH_CACHE_SIZE]
 a cache for fetched rows if we fetch many rows from the same cursor: it saves CPU time to fetch them in a batch; we reserve mysql_row_len bytes for each such row; these pointers point 4 bytes past the allocated mem buf start, because there is a 4 byte magic number at the start and at the end More...
 
ulint fetch_cache_first
 position of the first not yet fetched row in fetch_cache More...
 
ulint n_fetch_cached
 number of not yet fetched rows in fetch_cache More...
 
mem_heap_tblob_heap
 in SELECTS BLOB fields are copied to this heap More...
 
mem_heap_told_vers_heap
 memory heap where a previous version is built in consistent read More...
 
std::bitset< LOCK_COUNTnew_rec_lock
 normally false; if session is using READ COMMITTED or READ UNCOMMITTED isolation level, set in row_search_for_mysql() if we set a new record lock on the secondary or clustered index; this is used in row_try_unlock() when releasing the lock under the cursor if we determine after retrieving the row that it does not need to be locked ('mini-rollback') More...
 
bool keep_other_fields_on_keyread
 when using fetch cache with HA_EXTRA_KEYREAD, don't overwrite other fields in mysql row row buffer. More...
 
bool in_fts_query
 Whether we are in a FTS query. More...
 
bool fts_doc_id_in_read_set
 true if table has externally defined FTS_DOC_ID coulmn. More...
 
ulonglong autoinc_last_value
 last value of AUTO-INC interval More...
 
ulonglong autoinc_increment
 The increment step of the auto increment column. More...
 
ulonglong autoinc_offset
 The offset passed to get_auto_increment() by MySQL. More...
 
dberr_t autoinc_error
 The actual error code encountered while trying to init or read the autoinc value from the table. More...
 
bool idx_cond
 True if index condition pushdown is used, false otherwise. More...
 
ulint idx_cond_n_cols
 Number of fields in idx_cond_cols. More...
 
unsigned innodb_api: 1
 whether this is a InnoDB API query More...
 
const rec_tinnodb_api_rec
 InnoDB API search result. More...
 
void * innodb_api_buf
 Buffer holding copy of the physical Innodb API search record. More...
 
ulint innodb_api_rec_size
 Size of the Innodb API record. More...
 
rtr_info_trtr_info
 R-tree Search Info. More...
 
ulint magic_n2
 this should be the same as magic_n More...
 
bool ins_sel_stmt
 if true then ins_sel_statement. More...
 
innodb_session_tsession
 InnoDB session handler. More...
 
bytesrch_key_val1
 buffer used in converting search key values from MySQL format to InnoDB format. More...
 
bytesrch_key_val2
 buffer used in converting search key values from MySQL format to InnoDB format. More...
 
uint srch_key_val_len
 Size of search key. More...
 
bool m_no_prefetch
 Disable prefetch. More...
 
bool no_read_locking
 true, if server has called ha_extra(HA_EXTRA_NO_READ_LOCKING) More...
 
bool no_autoinc_locking
 true, if we were asked to skip AUTOINC locking for the table. More...
 
bool m_read_virtual_key
 Return materialized key for secondary index scan. More...
 
bool m_temp_read_shared
 Whether this is a temporary(intrinsic) table read to keep the position for this MySQL TABLE object. More...
 
bool m_temp_tree_modified
 Whether tree modifying operation happened on a temporary (intrinsic) table index tree. More...
 
TABLEm_mysql_table
 The MySQL table object. More...
 
ha_innobasem_mysql_handler
 The MySQL handler object. More...
 
ulonglong m_fts_limit
 limit value to avoid fts result overflow More...
 
bool m_end_range
 True if exceeded the end_range while filling the prefetch cache. More...
 
lob::undo_vers_t m_lob_undo
 Undo information for LOB mvcc. More...
 

Private Member Functions

void init_tuple_types (dtuple_t *tuple)
 A helper function for init_search_tuples_types() which prepares the shape of the tuple to match the index. More...
 

Private Attributes

bool m_is_reading_range
 Set to true iff we are inside read_range_first() or read_range_next() More...
 

Detailed Description

A struct for (sometimes lazily) prebuilt structures in an Innobase table handle used within MySQL; these are used to save CPU time.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
LOCK_PCUR 
LOCK_CLUST_PCUR 
LOCK_COUNT 

Constructor & Destructor Documentation

◆ row_prebuilt_t() [1/2]

row_prebuilt_t::row_prebuilt_t ( row_prebuilt_t const &  )
delete

It is unsafe to copy this struct, and moving it would be non-trivial, because we want to keep in sync with row_is_reading_range_guard_t.

Therefore it is much safer/easier to just forbid such operations.

◆ row_prebuilt_t() [2/2]

row_prebuilt_t::row_prebuilt_t ( row_prebuilt_t &&  )
delete

Member Function Documentation

◆ allow_duplicates()

bool row_prebuilt_t::allow_duplicates ( )
inline

Determines if the query is REPLACE or ON DUPLICATE KEY UPDATE in which case duplicate values should be allowed (and further processed) instead of causing an error.

Returns
true iff duplicated values should be allowed

◆ can_prefetch_records()

bool row_prebuilt_t::can_prefetch_records ( ) const

Can a record buffer or a prefetch cache be utilized for prefetching records in this scan?

Return values
trueif records can be prefetched
falseif records cannot be prefetched

◆ clear_search_tuples()

void row_prebuilt_t::clear_search_tuples ( )
inline

Resets both search_tuple and m_stop_tuple.

◆ end_stmt()

void row_prebuilt_t::end_stmt ( )

Inside this function perform activity that needs to be done at the end of statement.


◆ get_is_reading_range_guard()

row_is_reading_range_guard_t row_prebuilt_t::get_is_reading_range_guard ( )
inline

◆ get_lob_undo()

lob::undo_vers_t * row_prebuilt_t::get_lob_undo ( )
inline

◆ init_search_tuples_types()

void row_prebuilt_t::init_search_tuples_types ( )
inline

Initializes search_tuple and m_stop_tuple shape so they match the index.

◆ init_tuple_types()

void row_prebuilt_t::init_tuple_types ( dtuple_t tuple)
inlineprivate

A helper function for init_search_tuples_types() which prepares the shape of the tuple to match the index.

Parameters
[in]tuplethis->search_tuple or this->m_stop_tuple

◆ is_reading_range()

bool row_prebuilt_t::is_reading_range ( ) const
inline

◆ lob_undo_reset()

void row_prebuilt_t::lob_undo_reset ( )
inline

◆ new_rec_locks_count()

size_t row_prebuilt_t::new_rec_locks_count ( ) const
inline

Counts how many elements of.

See also
new_rec_lock[] array are set to true.

◆ operator=() [1/2]

row_prebuilt_t & row_prebuilt_t::operator= ( row_prebuilt_t &&  )
delete

◆ operator=() [2/2]

row_prebuilt_t & row_prebuilt_t::operator= ( row_prebuilt_t const &  )
delete

◆ skip_concurrency_ticket()

bool row_prebuilt_t::skip_concurrency_ticket ( ) const
Returns
true iff the operation can skip concurrency ticket.

◆ try_unlock()

void row_prebuilt_t::try_unlock ( bool  has_latches_on_recs)

This is an no-op unless trx is using a READ COMMITTED or READ UNCOMMITTED isolation level.

Before calling this function row_search_for_mysql() must have stored to new_rec_locks[] the information which new record locks really were set. This function removes a newly set index record locks under pcur or clust_pcur. Thus, this implements a 'mini-rollback' that releases the latest index record locks we've just set.

Parameters
[in]has_latches_on_recstrue if called so that we have the latches on the records under pcur and clust_pcur, and we do not need to reposition the cursors.

Member Data Documentation

◆ autoinc_error

dberr_t row_prebuilt_t::autoinc_error

The actual error code encountered while trying to init or read the autoinc value from the table.

We store it here so that we can return it to MySQL

◆ autoinc_increment

ulonglong row_prebuilt_t::autoinc_increment

The increment step of the auto increment column.

Value must be greater than or equal to 1. Required to calculate the next value

◆ autoinc_last_value

ulonglong row_prebuilt_t::autoinc_last_value

last value of AUTO-INC interval

◆ autoinc_offset

ulonglong row_prebuilt_t::autoinc_offset

The offset passed to get_auto_increment() by MySQL.

Required to calculate the next value

◆ blob_heap

mem_heap_t* row_prebuilt_t::blob_heap

in SELECTS BLOB fields are copied to this heap

◆ clust_index_was_generated

unsigned row_prebuilt_t::clust_index_was_generated

if the user did not define a primary key in MySQL, then Innobase automatically generated a clustered index where the ordering column is the row id: in this case this flag is set to true

◆ clust_pcur

btr_pcur_t* row_prebuilt_t::clust_pcur

persistent cursor used in some selects and updates

◆ clust_ref

dtuple_t* row_prebuilt_t::clust_ref

prebuilt dtuple used in sel/upd/del

◆ cursor_heap

mem_heap_t* row_prebuilt_t::cursor_heap

memory heap from which innodb_api_buf is allocated per session

◆ default_rec

const byte* row_prebuilt_t::default_rec

the default values of all columns (a "default row") in MySQL format

◆ fetch_cache

byte* row_prebuilt_t::fetch_cache[MYSQL_FETCH_CACHE_SIZE]

a cache for fetched rows if we fetch many rows from the same cursor: it saves CPU time to fetch them in a batch; we reserve mysql_row_len bytes for each such row; these pointers point 4 bytes past the allocated mem buf start, because there is a 4 byte magic number at the start and at the end

◆ fetch_cache_first

ulint row_prebuilt_t::fetch_cache_first

position of the first not yet fetched row in fetch_cache

◆ fetch_direction

ulint row_prebuilt_t::fetch_direction

ROW_SEL_NEXT or ROW_SEL_PREV.

◆ fts_doc_id

doc_id_t row_prebuilt_t::fts_doc_id

◆ fts_doc_id_in_read_set

bool row_prebuilt_t::fts_doc_id_in_read_set

true if table has externally defined FTS_DOC_ID coulmn.

◆ heap

mem_heap_t* row_prebuilt_t::heap

memory heap from which these auxiliary structures are allocated when needed

◆ hint_need_to_fetch_extra_cols

ulint row_prebuilt_t::hint_need_to_fetch_extra_cols

normally this is set to 0; if this is set to ROW_RETRIEVE_PRIMARY_KEY, then we should at least retrieve all columns in the primary key; if this is set to ROW_RETRIEVE_ALL_COLS, then we must retrieve all columns in the key (if read_just_key == 1), or all columns in the table

◆ idx_cond

bool row_prebuilt_t::idx_cond

True if index condition pushdown is used, false otherwise.

◆ idx_cond_n_cols

ulint row_prebuilt_t::idx_cond_n_cols

Number of fields in idx_cond_cols.

0 if and only if idx_cond == false.

◆ in_fts_query

bool row_prebuilt_t::in_fts_query

Whether we are in a FTS query.

◆ index

dict_index_t* row_prebuilt_t::index

current index for a search, if any

◆ index_usable

unsigned row_prebuilt_t::index_usable

caches the value of index->is_usable(trx)

◆ innodb_api

unsigned row_prebuilt_t::innodb_api

whether this is a InnoDB API query

◆ innodb_api_buf

void* row_prebuilt_t::innodb_api_buf

Buffer holding copy of the physical Innodb API search record.

◆ innodb_api_rec

const rec_t* row_prebuilt_t::innodb_api_rec

InnoDB API search result.

◆ innodb_api_rec_size

ulint row_prebuilt_t::innodb_api_rec_size

Size of the Innodb API record.

◆ ins_graph

que_fork_t* row_prebuilt_t::ins_graph

Innobase SQL query graph used in inserts.

Will be rebuilt on trx_id or n_indexes mismatch.

◆ ins_node

ins_node_t* row_prebuilt_t::ins_node

Innobase SQL insert node used to perform inserts to the table.

◆ ins_sel_stmt

bool row_prebuilt_t::ins_sel_stmt

if true then ins_sel_statement.

◆ ins_upd_rec_buff

byte* row_prebuilt_t::ins_upd_rec_buff

buffer for storing data converted to the Innobase format from the MySQL format

◆ keep_other_fields_on_keyread

bool row_prebuilt_t::keep_other_fields_on_keyread

when using fetch cache with HA_EXTRA_KEYREAD, don't overwrite other fields in mysql row row buffer.

◆ m_end_range

bool row_prebuilt_t::m_end_range

True if exceeded the end_range while filling the prefetch cache.

◆ m_fts_limit

ulonglong row_prebuilt_t::m_fts_limit

limit value to avoid fts result overflow

◆ m_is_reading_range

bool row_prebuilt_t::m_is_reading_range
private

Set to true iff we are inside read_range_first() or read_range_next()

◆ m_lob_undo

lob::undo_vers_t row_prebuilt_t::m_lob_undo

Undo information for LOB mvcc.

◆ m_mysql_handler

ha_innobase* row_prebuilt_t::m_mysql_handler

The MySQL handler object.

◆ m_mysql_table

TABLE* row_prebuilt_t::m_mysql_table

The MySQL table object.

◆ m_no_prefetch

bool row_prebuilt_t::m_no_prefetch

Disable prefetch.

◆ m_read_virtual_key

bool row_prebuilt_t::m_read_virtual_key

Return materialized key for secondary index scan.

◆ m_stop_tuple

dtuple_t* row_prebuilt_t::m_stop_tuple

prebuilt dtuple used in selects where the end of range is known

◆ m_stop_tuple_found

bool row_prebuilt_t::m_stop_tuple_found

Set to true in row_search_mvcc when a row matching exactly the length and value of stop_tuple was found, so that the next iteration of row_search_mvcc knows it can simply return DB_RECORD_NOT_FOUND.

If true, then for sure, at least one such matching row was seen. If false, it might be false negative, as not all control paths lead to setting this field to true in case a matching row is visited.

◆ m_temp_read_shared

bool row_prebuilt_t::m_temp_read_shared

Whether this is a temporary(intrinsic) table read to keep the position for this MySQL TABLE object.

◆ m_temp_tree_modified

bool row_prebuilt_t::m_temp_tree_modified

Whether tree modifying operation happened on a temporary (intrinsic) table index tree.

In this case, it could be split, but no shrink.

◆ magic_n

ulint row_prebuilt_t::magic_n

this magic number is set to ROW_PREBUILT_ALLOCATED when created, or ROW_PREBUILT_FREED when the struct has been freed

◆ magic_n2

ulint row_prebuilt_t::magic_n2

this should be the same as magic_n

◆ mv_data

multi_value_data* row_prebuilt_t::mv_data

◆ mysql_prefix_len

ulint row_prebuilt_t::mysql_prefix_len

byte offset of the end of the last requested column

◆ mysql_row_len

ulint row_prebuilt_t::mysql_row_len

length in bytes of a row in the MySQL format

◆ mysql_template

mysql_row_templ_t* row_prebuilt_t::mysql_template

template used to transform rows fast between MySQL and Innobase formats; memory for this template is not allocated from 'heap'

◆ n_fetch_cached

ulint row_prebuilt_t::n_fetch_cached

number of not yet fetched rows in fetch_cache

◆ n_rows_fetched

ulint row_prebuilt_t::n_rows_fetched

number of rows fetched after positioning the current cursor

◆ n_template

unsigned row_prebuilt_t::n_template

number of elements in the template

◆ need_to_access_clustered

unsigned row_prebuilt_t::need_to_access_clustered

if we are fetching columns through a secondary index and at least one column is not in the secondary index, then this is set to true

◆ new_rec_lock

std::bitset<LOCK_COUNT> row_prebuilt_t::new_rec_lock

normally false; if session is using READ COMMITTED or READ UNCOMMITTED isolation level, set in row_search_for_mysql() if we set a new record lock on the secondary or clustered index; this is used in row_try_unlock() when releasing the lock under the cursor if we determine after retrieving the row that it does not need to be locked ('mini-rollback')

[LOCK_PCUR] corresponds to pcur, the first index we looked up (can be secondary or clustered!)

[LOCK_CLUST_PCUR] corresponds to clust_pcur, which if used at all, is always the clustered index.

The meaning of these booleans is: true = we've created a rec lock, which we might release as we "own" it false = we should not release any lock for this index as we either reused some existing lock, or there is some other reason, we should keep it

◆ no_autoinc_locking

bool row_prebuilt_t::no_autoinc_locking

true, if we were asked to skip AUTOINC locking for the table.

◆ no_read_locking

bool row_prebuilt_t::no_read_locking

true, if server has called ha_extra(HA_EXTRA_NO_READ_LOCKING)

◆ null_bitmap_len

unsigned row_prebuilt_t::null_bitmap_len

number of bytes in the SQL NULL bitmap at the start of a row in the MySQL format

◆ old_vers_heap

mem_heap_t* row_prebuilt_t::old_vers_heap

memory heap where a previous version is built in consistent read

◆ on_duplicate_key_update

unsigned row_prebuilt_t::on_duplicate_key_update

1 if extra(HA_EXTRA_INSERT_WITH_UPDATE) was requested, which happens when ON DUPLICATE KEY UPDATE clause is present, 0 otherwise

◆ pcur

btr_pcur_t* row_prebuilt_t::pcur

persistent cursor used in selects and updates

◆ read_just_key

unsigned row_prebuilt_t::read_just_key

set to 1 when MySQL calls ha_innobase::extra with the argument HA_EXTRA_KEYREAD; it is enough to read just columns defined in the index (i.e., no read of the clustered index record necessary)

◆ replace

unsigned row_prebuilt_t::replace

1 if extra(HA_EXTRA_WRITE_CAN_REPLACE) was requested, which happen when REPLACE is done instead of regular INSERT, 0 otherwise

◆ row_id

byte row_prebuilt_t::row_id[DATA_ROW_ID_LEN]

if the clustered index was generated, the row id of the last row fetched is stored here

◆ row_read_type

ulint row_prebuilt_t::row_read_type

ROW_READ_WITH_LOCKS if row locks should be the obtained for records under an UPDATE or DELETE cursor.

If trx_t::allow_semi_consistent() returns true, this can be set to ROW_READ_TRY_SEMI_CONSISTENT, so that if the row under an UPDATE or DELETE cursor was locked by another transaction, InnoDB will resort to reading the last committed value ('semi-consistent read'). Then, this field will be set to ROW_READ_DID_SEMI_CONSISTENT to indicate that. If the row does not match the WHERE condition, MySQL will invoke handler::unlock_row() to clear the flag back to ROW_READ_TRY_SEMI_CONSISTENT and to simply skip the row. If the row matches, the next call to row_search_for_mysql() will lock the row. This eliminates lock waits in some cases; note that this breaks serializability.

◆ rtr_info

rtr_info_t* row_prebuilt_t::rtr_info

R-tree Search Info.

◆ search_tuple

dtuple_t* row_prebuilt_t::search_tuple

prebuilt dtuple used in selects

◆ sel_graph

que_fork_t* row_prebuilt_t::sel_graph

dummy query graph used in selects

◆ select_lock_type

ulint row_prebuilt_t::select_lock_type

LOCK_NONE, LOCK_S, or LOCK_X.

◆ select_mode

enum select_mode row_prebuilt_t::select_mode

SELECT_ORDINARY, SELECT_SKIP_LOKCED, or SELECT_NO_WAIT.

◆ session

innodb_session_t* row_prebuilt_t::session

InnoDB session handler.

◆ sql_stat_start

unsigned row_prebuilt_t::sql_stat_start

true when we start processing of an SQL statement: we may have to set an intention lock on the table, create a consistent read view etc.

◆ srch_key_val1

byte* row_prebuilt_t::srch_key_val1

buffer used in converting search key values from MySQL format to InnoDB format.

◆ srch_key_val2

byte* row_prebuilt_t::srch_key_val2

buffer used in converting search key values from MySQL format to InnoDB format.

◆ srch_key_val_len

uint row_prebuilt_t::srch_key_val_len

Size of search key.

◆ table

dict_table_t* row_prebuilt_t::table

Innobase table handle.

◆ templ_contains_blob

unsigned row_prebuilt_t::templ_contains_blob

true if the template contains a column with DATA_LARGE_MTYPE( get_innobase_type_from_mysql_type()) is true; not to be confused with InnoDB externally stored columns (VARCHAR can be off-page too)

◆ templ_contains_fixed_point

unsigned row_prebuilt_t::templ_contains_fixed_point

true if the template contains a column with DATA_POINT.

Since InnoDB regards DATA_POINT as non-BLOB type, the templ_contains_blob can't tell us if there is DATA_POINT

◆ template_type

unsigned row_prebuilt_t::template_type

ROW_MYSQL_WHOLE_ROW, ROW_MYSQL_REC_FIELDS, ROW_MYSQL_DUMMY_TEMPLATE, or ROW_MYSQL_NO_TEMPLATE.

◆ trx

trx_t* row_prebuilt_t::trx

current transaction handle

◆ trx_id

trx_id_t row_prebuilt_t::trx_id

The table->def_trx_id when ins_graph was built.

◆ upd_graph

que_fork_t* row_prebuilt_t::upd_graph

Innobase SQL query graph used in updates or deletes.

◆ upd_node

upd_node_t* row_prebuilt_t::upd_node

Innobase SQL update node used to perform updates and deletes.

◆ used_in_HANDLER

unsigned row_prebuilt_t::used_in_HANDLER

true if we have been using this handle in a MySQL HANDLER low level index cursor command: then we must store the pcur position even in a unique search from a clustered index, because HANDLER allows NEXT and PREV in such a situation


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