MySQL 8.0.40
Source Code Documentation
|
Undo modify of a row. More...
#include <stddef.h>
#include "btr0btr.h"
#include "dict0boot.h"
#include "dict0dd.h"
#include "dict0dict.h"
#include "ha_prototypes.h"
#include "log0chkp.h"
#include "mach0data.h"
#include "que0que.h"
#include "row0log.h"
#include "row0row.h"
#include "row0umod.h"
#include "row0undo.h"
#include "row0upd.h"
#include "row0vers.h"
#include "trx0rec.h"
#include "trx0roll.h"
#include "trx0trx.h"
#include "trx0undo.h"
#include "current_thd.h"
#include "debug_sync.h"
Functions | |
static dberr_t | row_undo_mod_clust_low (undo_node_t *node, ulint **offsets, mem_heap_t **offsets_heap, mem_heap_t *heap, const dtuple_t **rebuilt_old_pk, byte *sys, que_thr_t *thr, mtr_t *mtr, ulint mode) |
Undoes a modify in a clustered index record. More... | |
static dberr_t | row_undo_mod_remove_clust_low (undo_node_t *node, mtr_t *mtr, ulint mode) |
Purges a clustered index record after undo if possible. More... | |
static dberr_t | row_undo_mod_clust (undo_node_t *node, que_thr_t *thr) |
Undoes a modify in a clustered index record. More... | |
static dberr_t | row_undo_mod_del_mark_or_remove_sec_low (undo_node_t *node, que_thr_t *thr, dict_index_t *index, dtuple_t *entry, ulint mode) |
Delete marks or removes a secondary index entry if found. More... | |
static dberr_t | row_undo_mod_del_mark_or_remove_sec (undo_node_t *node, que_thr_t *thr, dict_index_t *index, dtuple_t *entry) |
Delete marks or removes a secondary index entry if found. More... | |
static dberr_t | row_undo_mod_del_unmark_sec_and_undo_update (ulint mode, que_thr_t *thr, dict_index_t *index, dtuple_t *entry, undo_no_t undo_no) |
Delete unmarks a secondary index entry which must be found. More... | |
static void | row_undo_mod_sec_flag_corrupted (trx_t *trx, dict_index_t *index) |
Flags a secondary index corrupted. More... | |
static dberr_t | row_undo_mod_upd_del_multi_sec (undo_node_t *node, que_thr_t *thr, dict_index_t *index, mem_heap_t *heap) |
Undoes a modify in secondary indexes when undo record type is UPD_DEL. More... | |
static dberr_t | row_undo_mod_upd_del_sec (undo_node_t *node, que_thr_t *thr) |
Undoes a modify in secondary indexes when undo record type is UPD_DEL. More... | |
static dberr_t | row_undo_mod_del_mark_multi_sec (undo_node_t *node, que_thr_t *thr, dict_index_t *index, mem_heap_t *heap) |
Undoes a modify in secondary indexes when undo record type is DEL_MARK. More... | |
static dberr_t | row_undo_mod_del_mark_sec (undo_node_t *node, que_thr_t *thr) |
Undoes a modify in secondary indexes when undo record type is DEL_MARK. More... | |
static dberr_t | row_undo_mod_upd_exist_multi_sec (undo_node_t *node, que_thr_t *thr, dict_index_t *index, bool non_mv_upd, mem_heap_t *heap) |
Undoes a modify in secondary indexes when undo record type is UPD_EXIST. More... | |
static dberr_t | row_undo_mod_upd_exist_sec (undo_node_t *node, que_thr_t *thr) |
Undoes a modify in secondary indexes when undo record type is UPD_EXIST. More... | |
static void | row_undo_mod_parse_undo_rec (undo_node_t *node, THD *thd, MDL_ticket **mdl) |
Parses the row reference and other info in a modify undo log record. More... | |
dberr_t | row_undo_mod (undo_node_t *node, que_thr_t *thr) |
Undoes a modify operation on a row of a table. More... | |
Undo modify of a row.
Created 2/27/1997 Heikki Tuuri
dberr_t row_undo_mod | ( | undo_node_t * | node, |
que_thr_t * | thr | ||
) |
Undoes a modify operation on a row of a table.
node | in: row undo node |
thr | in: query thread |
|
static |
Undoes a modify in a clustered index record.
Sets also the node state for the next round of undo.
node | in: row undo node |
thr | in: query thread |
|
static |
Undoes a modify in a clustered index record.
node | in: row undo node |
offsets | out: rec_get_offsets() on the record |
offsets_heap | in/out: memory heap that can be emptied |
heap | in/out: memory heap |
rebuilt_old_pk | out: row_log_table_get_pk() before the update, or NULL if the table is not being rebuilt online or the PRIMARY KEY definition does not change |
sys | out: DB_TRX_ID, DB_ROLL_PTR for row_log_table_delete() |
thr | in: query thread |
mtr | in: mtr; must be committed before latching any further pages |
mode | in: BTR_MODIFY_LEAF or BTR_MODIFY_TREE |
|
static |
Undoes a modify in secondary indexes when undo record type is DEL_MARK.
This is the specific function to handle the modify on multi-value indexes.
[in,out] | node | row undo node |
[in,out] | thr | query thread |
[in] | index | the multi-value index |
[in,out] | heap | memory heap |
|
static |
Delete marks or removes a secondary index entry if found.
NOTE that if we updated the fields of a delete-marked secondary index record so that alphabetically they stayed the same, e.g., 'abc' -> 'aBc', we cannot return to the original values because we do not know them. But this should not cause problems because in row0sel.cc, in queries we always retrieve the clustered index record or an earlier version of it, if the secondary index record through which we do the search is delete-marked.
node | in: row undo node |
thr | in: query thread |
index | in: index |
entry | in: index entry |
|
static |
Delete marks or removes a secondary index entry if found.
node | in: row undo node |
thr | in: query thread |
index | in: index |
entry | in: index entry |
mode | in: latch mode BTR_MODIFY_LEAF or BTR_MODIFY_TREE |
|
static |
Undoes a modify in secondary indexes when undo record type is DEL_MARK.
node | in: row undo node |
thr | in: query thread |
|
static |
Delete unmarks a secondary index entry which must be found.
It might not be delete-marked at the moment, but it does not harm to unmark it anyway. We also need to update the fields of the secondary index record if we updated its fields but alphabetically they stayed the same, e.g., 'abc' -> 'aBc'.
DB_SUCCESS | on success |
DB_FAIL | if BTR_MODIFY_TREE should be tried |
DB_OUT_OF_FILE_SPACE | when running out of tablespace |
DB_DUPLICATE_KEY | if the value was missing and an insert would lead to a duplicate exists |
mode | in: search mode: BTR_MODIFY_LEAF or BTR_MODIFY_TREE |
thr | in: query thread |
index | in: index |
entry | in: index entry |
undo_no | in: undo number up to which to rollback. |
|
static |
Parses the row reference and other info in a modify undo log record.
[in] | node | row undo node |
[in] | thd | THD associated with the node |
[in,out] | mdl | MDL ticket or nullptr if unnecessary |
|
static |
Purges a clustered index record after undo if possible.
This is attempted when the record was inserted by updating a delete-marked record and there no longer exist transactions that would see the delete-marked record.
node | in: row undo node |
mtr | in/out: mini-transaction |
mode | in: BTR_MODIFY_LEAF or BTR_MODIFY_TREE |
|
static |
Flags a secondary index corrupted.
trx | in/out: transaction |
index | in: secondary index |
|
static |
Undoes a modify in secondary indexes when undo record type is UPD_DEL.
This is the specific function to handle the modify on multi-value indexes.
[in,out] | node | row undo node |
[in,out] | thr | query thread |
[in] | index | the multi-value index |
[in,out] | heap | memory heap |
|
static |
Undoes a modify in secondary indexes when undo record type is UPD_DEL.
node | in: row undo node |
thr | in: query thread |
|
static |
Undoes a modify in secondary indexes when undo record type is UPD_EXIST.
This is the specific function to handle the modify on multi-value indexes.
[in,out] | node | row undo node |
[in,out] | thr | query thread |
[in] | index | the multi-value index |
[in] | non_mv_upd | true if any non-multi-value field on the index gets updated too |
[in,out] | heap | memory heap |
|
static |
Undoes a modify in secondary indexes when undo record type is UPD_EXIST.
node | in: row undo node |
thr | in: query thread |