MySQL 5.6.14 Source Code Document
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
row_prebuilt_t Struct Reference

#include <row0mysql.h>

Collaboration diagram for row_prebuilt_t:

Public Attributes

ulint magic_n
dict_table_ttable
dict_index_tindex
trx_ttrx
unsigned sql_stat_start:1
unsigned mysql_has_locked:1
unsigned clust_index_was_generated:1
unsigned index_usable:1
unsigned read_just_key:1
unsigned used_in_HANDLER:1
unsigned template_type:2
unsigned n_template:10
unsigned null_bitmap_len:10
unsigned need_to_access_clustered:1
unsigned templ_contains_blob:1
mysql_row_templ_tmysql_template
mem_heap_theap
ins_node_tins_node
byte * ins_upd_rec_buff
const byte * default_rec
ulint hint_need_to_fetch_extra_cols
upd_node_tupd_node
trx_id_t trx_id
que_fork_tins_graph
que_fork_tupd_graph
btr_pcur_t pcur
btr_pcur_t clust_pcur
que_fork_tsel_graph
dtuple_tsearch_tuple
byte row_id [DATA_ROW_ID_LEN]
doc_id_t fts_doc_id
dtuple_tclust_ref
ulint select_lock_type
ulint stored_select_lock_type
ulint row_read_type
ulint new_rec_locks
ulint mysql_prefix_len
ulint mysql_row_len
ulint n_rows_fetched
ulint fetch_direction
byte * fetch_cache [MYSQL_FETCH_CACHE_SIZE]
ibool keep_other_fields_on_keyread
ulint fetch_cache_first
ulint n_fetch_cached
mem_heap_tblob_heap
mem_heap_told_vers_heap
bool in_fts_query
ulonglong autoinc_last_value
ulonglong autoinc_increment
ulonglong autoinc_offset
dberr_t autoinc_error
void * idx_cond
ulint idx_cond_n_cols
ulint magic_n2
unsigned innodb_api:1
const rec_t * innodb_api_rec

Detailed Description

A struct for (sometimes lazily) prebuilt structures in an Innobase table

handle used within MySQL; these are used to save CPU time.

Definition at line 658 of file row0mysql.h.

Member Data Documentation

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

Definition at line 855 of file row0mysql.h.

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

Definition at line 848 of file row0mysql.h.

ulonglong row_prebuilt_t::autoinc_last_value

last value of AUTO-INC interval

Definition at line 847 of file row0mysql.h.

ulonglong row_prebuilt_t::autoinc_offset

The offset passed to get_auto_increment() by MySQL. Required to calculate the next value

Definition at line 852 of file row0mysql.h.

mem_heap_t* row_prebuilt_t::blob_heap

in SELECTS BLOB fields are copied to this heap

Definition at line 840 of file row0mysql.h.

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

Definition at line 676 of file row0mysql.h.

btr_pcur_t row_prebuilt_t::clust_pcur

persistent cursor used in some selects and updates

Definition at line 752 of file row0mysql.h.

dtuple_t* row_prebuilt_t::clust_ref

prebuilt dtuple used in sel/upd/del

Definition at line 768 of file row0mysql.h.

const byte* row_prebuilt_t::default_rec

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

Definition at line 730 of file row0mysql.h.

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

Definition at line 823 of file row0mysql.h.

ulint row_prebuilt_t::fetch_cache_first

position of the first not yet fetched row in fetch_cache

Definition at line 836 of file row0mysql.h.

ulint row_prebuilt_t::fetch_direction

ROW_SEL_NEXT or ROW_SEL_PREV

Definition at line 821 of file row0mysql.h.

mem_heap_t* row_prebuilt_t::heap

memory heap from which these auxiliary structures are allocated when needed

Definition at line 721 of file row0mysql.h.

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

Definition at line 733 of file row0mysql.h.

void* row_prebuilt_t::idx_cond

In ICP, pointer to a ha_innobase, passed to innobase_index_cond(). NULL if index condition pushdown is not used.

Definition at line 861 of file row0mysql.h.

ulint row_prebuilt_t::idx_cond_n_cols

Number of fields in idx_cond_cols. 0 if and only if idx_cond == NULL.

Definition at line 865 of file row0mysql.h.

bool row_prebuilt_t::in_fts_query

Whether we are in a FTS query

Definition at line 844 of file row0mysql.h.

dict_index_t* row_prebuilt_t::index

current index for a search, if any

Definition at line 664 of file row0mysql.h.

unsigned row_prebuilt_t::index_usable

caches the value of row_merge_is_index_usable(trx,index)

Definition at line 682 of file row0mysql.h.

unsigned row_prebuilt_t::innodb_api

whether this is a InnoDB API query

Definition at line 871 of file row0mysql.h.

const rec_t* row_prebuilt_t::innodb_api_rec

InnoDB API search result

Definition at line 873 of file row0mysql.h.

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.

Definition at line 745 of file row0mysql.h.

ins_node_t* row_prebuilt_t::ins_node

Innobase SQL insert node used to perform inserts to the table

Definition at line 724 of file row0mysql.h.

byte* row_prebuilt_t::ins_upd_rec_buff

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

Definition at line 727 of file row0mysql.h.

ibool 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.

Definition at line 832 of file row0mysql.h.

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

Definition at line 659 of file row0mysql.h.

ulint row_prebuilt_t::magic_n2

this should be the same as magic_n

Definition at line 868 of file row0mysql.h.

unsigned row_prebuilt_t::mysql_has_locked

this is set TRUE when MySQL calls external_lock on this handle with a lock flag, and set FALSE when with the F_UNLOCK flag

Definition at line 671 of file row0mysql.h.

ulint row_prebuilt_t::mysql_prefix_len

byte offset of the end of the last requested column

Definition at line 815 of file row0mysql.h.

ulint row_prebuilt_t::mysql_row_len

length in bytes of a row in the MySQL format

Definition at line 817 of file row0mysql.h.

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'

Definition at line 717 of file row0mysql.h.

ulint row_prebuilt_t::n_fetch_cached

number of not yet fetched rows in fetch_cache

Definition at line 838 of file row0mysql.h.

ulint row_prebuilt_t::n_rows_fetched

number of rows fetched after positioning the current cursor

Definition at line 819 of file row0mysql.h.

unsigned row_prebuilt_t::n_template

number of elements in the template

Definition at line 701 of file row0mysql.h.

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

Definition at line 706 of file row0mysql.h.

ulint row_prebuilt_t::new_rec_locks

normally 0; if srv_locks_unsafe_for_binlog is TRUE or 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_unlock_for_mysql() when releasing the lock under the cursor if we determine after retrieving the row that it does not need to be locked ('mini-rollback')

Definition at line 801 of file row0mysql.h.

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

Definition at line 703 of file row0mysql.h.

mem_heap_t* row_prebuilt_t::old_vers_heap

memory heap where a previous version is built in consistent read

Definition at line 842 of file row0mysql.h.

btr_pcur_t row_prebuilt_t::pcur

persistent cursor used in selects and updates

Definition at line 750 of file row0mysql.h.

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)

Definition at line 684 of file row0mysql.h.

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

Definition at line 758 of file row0mysql.h.

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 innodb_locks_unsafe_for_binlog is 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.

Definition at line 776 of file row0mysql.h.

dtuple_t* row_prebuilt_t::search_tuple

prebuilt dtuple used in selects

Definition at line 756 of file row0mysql.h.

que_fork_t* row_prebuilt_t::sel_graph

dummy query graph used in selects

Definition at line 754 of file row0mysql.h.

ulint row_prebuilt_t::select_lock_type

LOCK_NONE, LOCK_S, or LOCK_X

Definition at line 770 of file row0mysql.h.

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.

Definition at line 667 of file row0mysql.h.

ulint row_prebuilt_t::stored_select_lock_type

this field is used to remember the original select_lock_type that was decided in ha_innodb.cc, ::store_lock(), ::external_lock(), etc.

Definition at line 771 of file row0mysql.h.

dict_table_t* row_prebuilt_t::table

Innobase table handle

Definition at line 663 of file row0mysql.h.

unsigned row_prebuilt_t::templ_contains_blob

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

Definition at line 711 of file row0mysql.h.

unsigned row_prebuilt_t::template_type

ROW_MYSQL_WHOLE_ROW, ROW_MYSQL_REC_FIELDS, ROW_MYSQL_DUMMY_TEMPLATE, or ROW_MYSQL_NO_TEMPLATE

Definition at line 697 of file row0mysql.h.

trx_t* row_prebuilt_t::trx

current transaction handle

Definition at line 666 of file row0mysql.h.

trx_id_t row_prebuilt_t::trx_id

The table->def_trx_id when ins_graph was built

Definition at line 743 of file row0mysql.h.

que_fork_t* row_prebuilt_t::upd_graph

Innobase SQL query graph used in updates or deletes

Definition at line 748 of file row0mysql.h.

upd_node_t* row_prebuilt_t::upd_node

Innobase SQL update node used to perform updates and deletes

Definition at line 741 of file row0mysql.h.

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

Definition at line 690 of file row0mysql.h.


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