MySQL 9.1.0
Source Code Documentation
|
Modification log for online index creation and online table rebuild. More...
#include "row0log.h"
#include "my_config.h"
#include <fcntl.h>
#include <algorithm>
#include <map>
#include "data0data.h"
#include "ddl0ddl.h"
#include "handler0alter.h"
#include "lob0lob.h"
#include "log0chkp.h"
#include "que0que.h"
#include "row0ext.h"
#include "row0ins.h"
#include "row0mysql.h"
#include "row0row.h"
#include "row0upd.h"
#include "srv0mon.h"
#include "trx0rec.h"
#include "ut0new.h"
#include "ut0stage.h"
#include "my_dbug.h"
Classes | |
struct | row_log_buf_t |
Log block for modifications during online ALTER TABLE. More... | |
class | row_log_table_blob_t |
Tracks BLOB allocation during online ALTER TABLE. More... | |
struct | row_log_t |
Buffer for logging modifications during online index creation. More... | |
Typedefs | |
typedef std::map< page_no_t, row_log_table_blob_t, std::less< page_no_t >, ut::allocator< std::pair< const page_no_t, row_log_table_blob_t > > > | page_no_map |
Map of off-page column page numbers to 0 or log byte offsets. More... | |
Enumerations | |
enum | row_tab_op { ROW_T_INSERT = 0x41 , ROW_T_UPDATE , ROW_T_DELETE } |
Table row modification operations during online table rebuild. More... | |
enum | row_op { ROW_OP_INSERT = 0x61 , ROW_OP_DELETE } |
Index record modification operations during online index creation. More... | |
Functions | |
static bool | row_log_tmpfile (row_log_t *log) |
Create the file or online log if it does not exist. More... | |
static bool | row_log_block_allocate (row_log_buf_t &log_buf) |
Allocate the memory for the log buffer. More... | |
static void | row_log_block_free (row_log_buf_t &log_buf) |
Free the log buffer. More... | |
void | row_log_online_op (dict_index_t *index, const dtuple_t *tuple, trx_id_t trx_id) |
Logs an operation to a secondary index that is (or was) being created. More... | |
dberr_t | row_log_table_get_error (const dict_index_t *index) |
Gets the error status of the online index rebuild log. More... | |
static byte * | row_log_table_open (row_log_t *log, ulint size, ulint *avail) |
Starts logging an operation to a table that is being rebuilt. More... | |
static void | row_log_table_close_func (row_log_t *log, const byte *b, ulint size, ulint avail) |
Stops logging an operation to a table that is being rebuilt. More... | |
static void | row_log_table_close (row_log_t *log, const byte *b, ulint size, ulint avail) |
bool | row_log_col_is_indexed (const dict_index_t *index, ulint v_no) |
Check whether a virtual column is indexed in the new table being created during alter table. More... | |
void | row_log_table_delete (const rec_t *rec, const dtuple_t *ventry, dict_index_t *index, const ulint *offsets, const byte *sys) |
Logs a delete operation to a table that is being rebuilt. More... | |
static void | row_log_table_low_redundant (const rec_t *rec, const dtuple_t *ventry, const dtuple_t *o_ventry, dict_index_t *index, bool insert, const dtuple_t *old_pk, const dict_index_t *new_index) |
Logs an insert or update to a table that is being rebuilt. More... | |
static void | row_log_table_low (const rec_t *rec, const dtuple_t *ventry, const dtuple_t *o_ventry, dict_index_t *index, const ulint *offsets, bool insert, const dtuple_t *old_pk) |
Logs an insert or update to a table that is being rebuilt. More... | |
void | row_log_table_update (const rec_t *rec, dict_index_t *index, const ulint *offsets, const dtuple_t *old_pk, const dtuple_t *new_v_row, const dtuple_t *old_v_row) |
Logs an update to a table that is being rebuilt. More... | |
static const dict_col_t * | row_log_table_get_pk_old_col (const dict_table_t *table, const ulint *col_map, ulint col_no) |
Gets the old table column of a PRIMARY KEY column. More... | |
static dberr_t | row_log_table_get_pk_col (dict_index_t *index, const dict_field_t *ifield, dfield_t *dfield, mem_heap_t *heap, const rec_t *rec, const ulint *offsets, ulint i, const page_size_t &page_size, ulint max_len) |
Maps an old table column of a PRIMARY KEY column. More... | |
const dtuple_t * | row_log_table_get_pk (const rec_t *rec, dict_index_t *index, const ulint *offsets, byte *sys, mem_heap_t **heap) |
Constructs the old PRIMARY KEY and DB_TRX_ID,DB_ROLL_PTR of a table that is being rebuilt. More... | |
void | row_log_table_insert (const rec_t *rec, const dtuple_t *ventry, dict_index_t *index, const ulint *offsets) |
Logs an insert to a table that is being rebuilt. More... | |
void | row_log_table_blob_free (dict_index_t *index, page_no_t page_no) |
Notes that a BLOB is being freed during online ALTER TABLE. More... | |
void | row_log_table_blob_alloc (dict_index_t *index, page_no_t page_no) |
Notes that a BLOB is being allocated during online ALTER TABLE. More... | |
static const dtuple_t * | row_log_table_apply_convert_mrec (const ddl::mrec_t *mrec, dict_index_t *index, const ulint *offsets, const row_log_t *log, mem_heap_t *heap, dberr_t *error) |
Converts a log record to a table row. More... | |
static dberr_t | apply_insert_multi_value (uint32_t flags, dict_index_t *index, mem_heap_t *offsets_heap, mem_heap_t *heap, dtuple_t *entry, trx_id_t trx_id, que_thr_t *thr) |
Tries to insert an entry into a secondary index, which is created for multi-value field. More... | |
static dberr_t | row_log_table_apply_insert_low (que_thr_t *thr, const dtuple_t *row, trx_id_t trx_id, mem_heap_t *offsets_heap, mem_heap_t *heap, ddl::Dup *dup) |
Replays an insert operation on a table that was rebuilt. More... | |
static dberr_t | row_log_table_apply_insert (que_thr_t *thr, const ddl::mrec_t *mrec, const ulint *offsets, mem_heap_t *offsets_heap, mem_heap_t *heap, ddl::Dup *dup, trx_id_t trx_id) |
Replays an insert operation on a table that was rebuilt. More... | |
static dberr_t | row_log_table_delete_sec (dict_index_t *index, const dtuple_t *entry, btr_pcur_t *pcur) |
Delete a record from a secondary index. More... | |
static dberr_t | apply_delete_multi_value (const dtuple_t *row, row_ext_t *ext, dict_index_t *index, btr_pcur_t *pcur, mem_heap_t *heap) |
Deletes a record from a multi-value index. More... | |
static dberr_t | row_log_table_apply_delete_low (btr_pcur_t *pcur, const dtuple_t *ventry, const ulint *offsets, mem_heap_t *heap, mtr_t *mtr) |
Deletes a record from a table that is being rebuilt. More... | |
static dberr_t | row_log_table_apply_delete (ulint trx_id_col, const ddl::mrec_t *mrec, const ulint *moffsets, mem_heap_t *offsets_heap, mem_heap_t *heap, const row_log_t *log) |
Replays a delete operation on a table that was rebuilt. More... | |
static dberr_t | apply_update_multi_value (dict_index_t *index, uint32_t n_index, const dtuple_t *old_row, row_ext_t *old_ext, const dtuple_t *new_row, bool non_mv_upd, trx_id_t trx_id, que_thr_t *thr, mem_heap_t *offsets_heap, mem_heap_t *heap) |
Replays an update operation on the multi-value index. More... | |
static dberr_t | row_log_table_apply_update (que_thr_t *thr, ulint new_trx_id_col, const ddl::mrec_t *mrec, const ulint *offsets, mem_heap_t *offsets_heap, mem_heap_t *heap, ddl::Dup *dup, trx_id_t trx_id, const dtuple_t *old_pk) |
Replays an update operation on a table that was rebuilt. More... | |
static const ddl::mrec_t * | row_log_table_apply_op (que_thr_t *thr, ulint trx_id_col, ulint new_trx_id_col, ddl::Dup *dup, dberr_t *error, mem_heap_t *offsets_heap, mem_heap_t *heap, const ddl::mrec_t *mrec, const ddl::mrec_t *mrec_end, ulint *offsets) |
Applies an operation to a table that was rebuilt. More... | |
ulint | row_log_progress_inc_per_block () |
Estimate how much an ALTER TABLE progress should be incremented per one block of log applied. More... | |
ulint | row_log_estimate_work (const dict_index_t *index) |
Estimate how much work is to be done by the log apply phase of an ALTER TABLE for this index. More... | |
static dberr_t | row_log_table_apply_ops (que_thr_t *thr, ddl::Dup *dup, Alter_stage *stage) |
Applies operations to a table was rebuilt. More... | |
dberr_t | row_log_table_apply (que_thr_t *thr, dict_table_t *old_table, struct TABLE *table, Alter_stage *stage) |
Apply the row_log_table log to a table upon completing rebuild. More... | |
bool | row_log_allocate (dict_index_t *index, dict_table_t *table, bool same_pk, const dtuple_t *add_cols, const ulint *col_map, const char *path) |
Allocate the row log for an index and flag the index for online creation. More... | |
void | row_log_free (row_log_t *&log) |
Free the row log for an index that was being created online. More... | |
trx_id_t | row_log_get_max_trx (dict_index_t *index) |
Get the latest transaction ID that has invoked row_log_online_op() during online creation. More... | |
static void | row_log_apply_op_low (dict_index_t *index, ddl::Dup *dup, dberr_t *error, mem_heap_t *offsets_heap, bool has_index_lock, enum row_op op, trx_id_t trx_id, const dtuple_t *entry) |
Applies an operation to a secondary index that was being created. More... | |
static const ddl::mrec_t * | row_log_apply_op (dict_index_t *index, ddl::Dup *dup, dberr_t *error, mem_heap_t *offsets_heap, mem_heap_t *heap, bool has_index_lock, const ddl::mrec_t *mrec, const ddl::mrec_t *mrec_end, ulint *offsets) |
Applies an operation to a secondary index that was being created. More... | |
static dberr_t | row_log_apply_ops (const trx_t *trx, dict_index_t *index, ddl::Dup *dup, Alter_stage *stage) |
Applies operations to a secondary index that was being created. More... | |
dberr_t | row_log_apply (const trx_t *trx, dict_index_t *index, struct TABLE *table, Alter_stage *stage) |
Apply the row log to the index upon completing index creation. More... | |
Variables | |
constexpr uint32_t | ROW_LOG_HEADER_SIZE = 2 |
Size of the modification log entry header, in bytes. More... | |
Modification log for online index creation and online table rebuild.
Created 2011-05-26 Marko Makela
typedef std::map< page_no_t, row_log_table_blob_t, std::less<page_no_t>, ut::allocator<std::pair<const page_no_t, row_log_table_blob_t> > > page_no_map |
Map of off-page column page numbers to 0 or log byte offsets.
If there is no mapping for a page number, it is safe to access. If a page number maps to 0, it is an off-page column that has been freed. If a page number maps to a nonzero number, the number is a byte offset into the index->online_log, indicating that the page is safe to access when applying log records starting from that offset.
enum row_op |
enum row_tab_op |
|
inlinestatic |
Deletes a record from a multi-value index.
[in] | row | row to delete |
[in] | ext | external data |
[in] | index | multi-value index |
[in,out] | pcur | B-tree cursor |
[in,out] | heap | memory heap |
|
static |
Tries to insert an entry into a secondary index, which is created for multi-value field.
For each value to be inserted, if a record with exactly the same fields is found, the other record is necessarily marked deleted. It is then unmarked. Otherwise, the entry is just inserted to the index.
[in] | flags | undo logging and locking flags |
[in] | index | secondary index |
[in,out] | offsets_heap | memory heap that can be emptied |
[in,out] | heap | memory heap |
[in,out] | entry | index entry to insert |
[in] | trx_id | PAGE_MAX_TRX_ID during row_log_table_apply(), or trx_id when undo log is disabled during alter copy operation or 0 |
[in] | thr | query thread |
DB_SUCCESS | on success |
DB_LOCK_WAIT | on lock wait when !(flags & BTR_NO_LOCKING_FLAG) |
DB_FAIL | if retry with BTR_MODIFY_TREE is needed |
|
static |
Replays an update operation on the multi-value index.
[in] | index | multi-value index |
[in] | n_index | the sequence of the index |
[in] | old_row | old row of the update |
[in] | old_ext | old external data of the update |
[in] | new_row | new row of the update |
[in] | non_mv_upd | true if any non-multi-value field on the index gets updated too |
[in] | trx_id | transaction id of the update |
[in] | thr | query graph |
[in,out] | offsets_heap | memory heap that can be emptied |
[in,out] | heap | memory heap |
bool row_log_allocate | ( | dict_index_t * | index, |
dict_table_t * | table, | ||
bool | same_pk, | ||
const dtuple_t * | add_cols, | ||
const ulint * | col_map, | ||
const char * | path | ||
) |
Allocate the row log for an index and flag the index for online creation.
[in] | index | Index. |
[in] | table | New table being rebuilt, or NULL when creating a secondary index. |
[in] | same_pk | Whether the definition of the PRIMARY KEY has remained the same. |
[in] | add_cols | Default values of added columns, or nullptr. |
[in] | col_map | Mapping of old column numbers to new ones, or nullptr if !table. |
[in] | path | Where to create temporary file. |
true | if success, false if not |
dberr_t row_log_apply | ( | const trx_t * | trx, |
dict_index_t * | index, | ||
struct TABLE * | table, | ||
Alter_stage * | stage | ||
) |
Apply the row log to the index upon completing index creation.
[in] | trx | transaction (for checking if the operation was interrupted) |
[in,out] | index | secondary index |
[in,out] | table | MySQL table (for reporting duplicates) |
[in,out] | stage | performance schema accounting object, used by ALTER TABLE. stage->begin_phase_log_index() will be called initially and then stage->inc() will be called for each block of log that is applied. |
|
static |
Applies an operation to a secondary index that was being created.
index | in/out: index |
dup | in/out: for reporting duplicate key errors |
error | out: DB_SUCCESS or error code |
offsets_heap | in/out: memory heap for allocating offsets; can be emptied |
heap | in/out: memory heap for allocating data tuples |
has_index_lock | in: true if holding index->lock in exclusive mode |
mrec | in: merge record |
mrec_end | in: end of buffer |
offsets | in/out: work area for rec_deserialize_init_offsets() |
|
static |
Applies an operation to a secondary index that was being created.
index | in/out: index |
dup | in/out: for reporting duplicate key errors |
error | out: DB_SUCCESS or error code |
offsets_heap | in/out: memory heap for allocating offsets; can be emptied |
has_index_lock | in: true if holding index->lock in exclusive mode |
op | in: operation being applied |
trx_id | in: transaction identifier |
entry | in: row |
|
static |
Applies operations to a secondary index that was being created.
[in] | trx | transaction (for checking if the operation was interrupted) |
[in,out] | index | index |
[in,out] | dup | for reporting duplicate key errors |
[in,out] | stage | performance schema accounting object, used by ALTER TABLE. If not NULL, then stage->inc() will be called for each block of log that is applied. |
|
static |
Allocate the memory for the log buffer.
[in,out] | log_buf | Buffer used for log operation |
|
static |
Free the log buffer.
[in,out] | log_buf | Buffer used for log operation |
bool row_log_col_is_indexed | ( | const dict_index_t * | index, |
ulint | v_no | ||
) |
Check whether a virtual column is indexed in the new table being created during alter table.
[in] | index | cluster index |
[in] | v_no | virtual column number |
ulint row_log_estimate_work | ( | const dict_index_t * | index | ) |
Estimate how much work is to be done by the log apply phase of an ALTER TABLE for this index.
[in] | index | index whose log to assess |
void row_log_free | ( | row_log_t *& | log | ) |
Free the row log for an index that was being created online.
in,own: row log
log | in,own: row log |
trx_id_t row_log_get_max_trx | ( | dict_index_t * | index | ) |
Get the latest transaction ID that has invoked row_log_online_op() during online creation.
index | in: index, must be locked |
void row_log_online_op | ( | dict_index_t * | index, |
const dtuple_t * | tuple, | ||
trx_id_t | trx_id | ||
) |
Logs an operation to a secondary index that is (or was) being created.
index | in/out: index, S or X latched |
tuple | in: index tuple |
trx_id | in: transaction ID for insert, or 0 for delete |
|
inline |
Estimate how much an ALTER TABLE progress should be incremented per one block of log applied.
For the other phases of ALTER TABLE we increment the progress with 1 per page processed.
dberr_t row_log_table_apply | ( | que_thr_t * | thr, |
dict_table_t * | old_table, | ||
struct TABLE * | table, | ||
Alter_stage * | stage | ||
) |
Apply the row_log_table log to a table upon completing rebuild.
[in] | thr | query graph |
[in] | old_table | old table |
[in,out] | table | MySQL table (for reporting duplicates) |
[in,out] | stage | performance schema accounting object, used by ALTER TABLE. stage->begin_phase_log_table() will be called initially and then stage->inc() will be called for each block of log that is applied. |
|
static |
Converts a log record to a table row.
mrec | in: merge record |
index | in: index of mrec |
offsets | in: offsets of mrec |
log | in: rebuild context |
heap | in/out: memory heap |
error | out: DB_SUCCESS or DB_MISSING_HISTORY or reason of failure |
|
static |
Replays a delete operation on a table that was rebuilt.
trx_id_col | in: position of DB_TRX_ID in the new clustered index |
mrec | in: merge record |
moffsets | in: offsets of mrec |
offsets_heap | in/out: memory heap that can be emptied |
heap | in/out: memory heap |
log | in: online log |
|
static |
Deletes a record from a table that is being rebuilt.
pcur | in/out: B-tree cursor, will be trashed |
ventry | in: dtuple holding virtual column info |
offsets | in: offsets on pcur |
heap | in/out: memory heap |
mtr | in/out: mini-transaction, will be committed |
|
static |
Replays an insert operation on a table that was rebuilt.
thr | in: query graph |
mrec | in: record to insert |
offsets | in: offsets of mrec |
offsets_heap | in/out: memory heap that can be emptied |
heap | in/out: memory heap |
dup | in/out: for reporting duplicate key errors |
trx_id | in: DB_TRX_ID of mrec |
|
static |
Replays an insert operation on a table that was rebuilt.
thr | in: query graph |
row | in: table row in the old table definition |
trx_id | in: trx_id of the row |
offsets_heap | in/out: memory heap that can be emptied |
heap | in/out: memory heap |
dup | in/out: for reporting duplicate key errors |
|
static |
Applies an operation to a table that was rebuilt.
thr | in: query graph |
trx_id_col | in: position of DB_TRX_ID in old index |
new_trx_id_col | in: position of DB_TRX_ID in new index |
dup | in/out: for reporting duplicate key errors |
error | out: DB_SUCCESS or error code |
offsets_heap | in/out: memory heap that can be emptied |
heap | in/out: memory heap |
mrec | in: merge record |
mrec_end | in: end of buffer |
offsets | in/out: work area for parsing mrec |
|
static |
Applies operations to a table was rebuilt.
[in] | thr | query graph |
[in,out] | dup | for reporting duplicate key errors |
[in,out] | stage | performance schema accounting object, used by ALTER TABLE. If not NULL, then stage->inc() will be called for each block of log that is applied. |
|
static |
Replays an update operation on a table that was rebuilt.
It allows to create tuple with virtual column information.
thr | in: query graph |
new_trx_id_col | in: position of DB_TRX_ID in the new clustered index |
mrec | in: new value |
offsets | in: offsets of mrec |
offsets_heap | in/out: memory heap that can be emptied |
heap | in/out: memory heap |
dup | in/out: for reporting duplicate key errors |
trx_id | in: DB_TRX_ID of mrec |
old_pk | in: PRIMARY KEY and DB_TRX_ID,DB_ROLL_PTR of the old value, or PRIMARY KEY if same_pk |
void row_log_table_blob_alloc | ( | dict_index_t * | index, |
page_no_t | page_no | ||
) |
Notes that a BLOB is being allocated during online ALTER TABLE.
index | in/out: clustered index, X-latched |
page_no | in: starting page number of the BLOB |
void row_log_table_blob_free | ( | dict_index_t * | index, |
page_no_t | page_no | ||
) |
Notes that a BLOB is being freed during online ALTER TABLE.
index | in/out: clustered index, X-latched |
page_no | in: starting page number of the BLOB |
|
inlinestatic |
|
static |
Stops logging an operation to a table that is being rebuilt.
[in,out] | log | online rebuild log |
[in] | b | end of log record |
[in] | size | size od log record |
[in] | avail | available size for log record |
void row_log_table_delete | ( | const rec_t * | rec, |
const dtuple_t * | ventry, | ||
dict_index_t * | index, | ||
const ulint * | offsets, | ||
const byte * | sys | ||
) |
Logs a delete operation to a table that is being rebuilt.
This will be merged in row_log_table_apply_delete().
rec | in: clustered index leaf page record, page X-latched |
ventry | in: dtuple holding virtual column info |
index | in/out: clustered index, S-latched or X-latched |
offsets | in: rec_get_offsets(rec,index) |
sys | in: DB_TRX_ID,DB_ROLL_PTR that should be logged, or NULL to use those in rec |
|
inlinestatic |
Delete a record from a secondary index.
[in] | index | secondary index |
[in] | entry | entry to delete |
[in,out] | pcur | B-tree cursor |
dberr_t row_log_table_get_error | ( | const dict_index_t * | index | ) |
Gets the error status of the online index rebuild log.
index | in: clustered index of a table that is being rebuilt online |
const dtuple_t * row_log_table_get_pk | ( | const rec_t * | rec, |
dict_index_t * | index, | ||
const ulint * | offsets, | ||
byte * | sys, | ||
mem_heap_t ** | heap | ||
) |
Constructs the old PRIMARY KEY and DB_TRX_ID,DB_ROLL_PTR of a table that is being rebuilt.
rec | in: clustered index leaf page record, page X-latched |
index | in/out: clustered index, S-latched or X-latched |
offsets | in: rec_get_offsets(rec,index) |
sys | out: DB_TRX_ID,DB_ROLL_PTR for row_log_table_delete(), or NULL |
heap | in/out: memory heap where allocated |
|
static |
Maps an old table column of a PRIMARY KEY column.
[in] | index | index being operated on |
[in] | ifield | clustered index field in the new table (after ALTER TABLE) |
[in,out] | dfield | clustered index tuple field in the new table |
[in,out] | heap | memory heap for allocating dfield contents |
[in] | rec | clustered index leaf page record in the old table |
[in] | offsets | rec_get_offsets(rec) |
[in] | i | rec field corresponding to col |
[in] | page_size | page size of the old table |
[in] | max_len | maximum length of dfield |
DB_INVALID_NULL | if a NULL value is encountered |
DB_TOO_BIG_INDEX_COL | if the maximum prefix length is exceeded |
|
static |
Gets the old table column of a PRIMARY KEY column.
table | old table (before ALTER TABLE) |
col_map | mapping of old column numbers to new ones |
col_no | column position in the new table |
void row_log_table_insert | ( | const rec_t * | rec, |
const dtuple_t * | ventry, | ||
dict_index_t * | index, | ||
const ulint * | offsets | ||
) |
Logs an insert to a table that is being rebuilt.
This will be merged in row_log_table_apply_insert().
rec | in: clustered index leaf page record, page X-latched |
ventry | in: dtuple holding virtual column info |
index | in/out: clustered index, S-latched or X-latched |
offsets | in: rec_get_offsets(rec,index) |
|
static |
Logs an insert or update to a table that is being rebuilt.
[in] | rec | clustered index leaf page record, page X-latched |
[in] | ventry | dtuple holding virtual column info |
[in] | o_ventry | dtuple holding old virtual column info |
[in,out] | index | clustered index, S-latched or X-latched |
[in] | offsets | rec_get_offsets(rec,index) |
[in] | insert | true if insert, false if update |
[in] | old_pk | old PRIMARY KEY value (if !insert and a PRIMARY KEY is being created) |
|
static |
Logs an insert or update to a table that is being rebuilt.
[in] | rec | clustered index leaf page record in ROW_FORMAT=REDUNDANT, page X-latched |
[in] | ventry | dtuple holding virtual column info or NULL |
[in] | o_ventry | old dtuple holding virtual column info or NULL |
[in,out] | index | clustered index, S-latched or X-latched |
[in] | insert | true if insert, false if update |
[in] | old_pk | old PRIMARY KEY value (if !insert and a PRIMARY KEY is being created) |
[in] | new_index | clustered index of the new table, not latched |
Starts logging an operation to a table that is being rebuilt.
log | in/out: online rebuild log |
size | in: size of log record |
avail | out: available size for log record |
void row_log_table_update | ( | const rec_t * | rec, |
dict_index_t * | index, | ||
const ulint * | offsets, | ||
const dtuple_t * | old_pk, | ||
const dtuple_t * | new_v_row, | ||
const dtuple_t * | old_v_row | ||
) |
Logs an update to a table that is being rebuilt.
Logs an update operation to a table that is being rebuilt.
This will be merged in row_log_table_apply_update().
rec | in: clustered index leaf page record, page X-latched |
index | in/out: clustered index, S-latched or X-latched |
offsets | in: rec_get_offsets(rec,index) |
old_pk | in: row_log_table_get_pk() before the update |
new_v_row | in: dtuple contains the new virtual columns |
old_v_row | in: dtuple contains the old virtual columns |
|
static |
Create the file or online log if it does not exist.
[in,out] | log | online rebuild log |
|
constexpr |
Size of the modification log entry header, in bytes.
op, extra_size