MySQL  8.0.21
Source Code Documentation
row_log_t Struct Reference

Buffer for logging modifications during online index creation. More...

Public Attributes

int fd
 file descriptor More...
 
ib_mutex_t mutex
 mutex protecting error, max_trx and tail More...
 
page_no_mapblobs
 map of page numbers of off-page columns that have been freed during table-rebuilding ALTER TABLE (row_log_table_*); protected by index->lock X-latch only More...
 
dict_table_ttable
 table that is being rebuilt, or NULL when this is a secondary index that is being created online More...
 
bool same_pk
 whether the definition of the PRIMARY KEY has remained the same More...
 
const dtuple_tadd_cols
 default values of added columns, or NULL More...
 
const ulint * col_map
 mapping of old column numbers to new ones, or NULL if !table More...
 
dberr_t error
 error that occurred during online table rebuild More...
 
trx_id_t max_trx
 biggest observed trx_id in row_log_online_op(); protected by mutex and index->lock S-latch, or by index->lock X-latch only More...
 
row_log_buf_t tail
 writer context; protected by mutex and index->lock S-latch, or by index->lock X-latch only More...
 
row_log_buf_t head
 reader context; protected by MDL only; modifiable by row_log_apply_ops() More...
 
ulint n_old_col
 number of non-virtual column in old table More...
 
ulint n_old_vcol
 number of virtual column in old table More...
 
const char * path
 where to create temporary file during log operation More...
 

Detailed Description

Buffer for logging modifications during online index creation.

All modifications to an index that is being created will be logged by row_log_online_op() to this buffer.

All modifications to a table that is being rebuilt will be logged by row_log_table_delete(), row_log_table_update(), row_log_table_insert() to this buffer.

When head.blocks == tail.blocks, the reader will access tail.block directly. When also head.bytes == tail.bytes, both counts will be reset to 0 and the file will be truncated.

Member Data Documentation

◆ add_cols

const dtuple_t* row_log_t::add_cols

default values of added columns, or NULL

◆ blobs

page_no_map* row_log_t::blobs

map of page numbers of off-page columns that have been freed during table-rebuilding ALTER TABLE (row_log_table_*); protected by index->lock X-latch only

◆ col_map

const ulint* row_log_t::col_map

mapping of old column numbers to new ones, or NULL if !table

◆ error

dberr_t row_log_t::error

error that occurred during online table rebuild

◆ fd

int row_log_t::fd

file descriptor

◆ head

row_log_buf_t row_log_t::head

reader context; protected by MDL only; modifiable by row_log_apply_ops()

◆ max_trx

trx_id_t row_log_t::max_trx

biggest observed trx_id in row_log_online_op(); protected by mutex and index->lock S-latch, or by index->lock X-latch only

◆ mutex

ib_mutex_t row_log_t::mutex

mutex protecting error, max_trx and tail

◆ n_old_col

ulint row_log_t::n_old_col

number of non-virtual column in old table

◆ n_old_vcol

ulint row_log_t::n_old_vcol

number of virtual column in old table

◆ path

const char* row_log_t::path

where to create temporary file during log operation

◆ same_pk

bool row_log_t::same_pk

whether the definition of the PRIMARY KEY has remained the same

◆ table

dict_table_t* row_log_t::table

table that is being rebuilt, or NULL when this is a secondary index that is being created online

◆ tail

row_log_buf_t row_log_t::tail

writer context; protected by mutex and index->lock S-latch, or by index->lock X-latch only


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