MySQL 8.0.40
Source Code Documentation
row_log_t Struct Reference

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

Public Attributes

ddl::Unique_os_file_descriptor file
 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 ulintcol_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...
 
size_t n_old_col
 number of non-virtual column in old table More...
 
size_t 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.

◆ file

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

size_t row_log_t::n_old_col

number of non-virtual column in old table

◆ n_old_vcol

size_t 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: