MySQL 5.6.14 Source Code Document
|
#include "row0vers.h"
#include "dict0dict.h"
#include "dict0boot.h"
#include "btr0btr.h"
#include "mach0data.h"
#include "trx0rseg.h"
#include "trx0trx.h"
#include "trx0roll.h"
#include "trx0undo.h"
#include "trx0purge.h"
#include "trx0rec.h"
#include "que0que.h"
#include "row0row.h"
#include "row0upd.h"
#include "rem0cmp.h"
#include "read0read.h"
#include "lock0lock.h"
Go to the source code of this file.
Functions | |
UNIV_INLINE trx_id_t | row_vers_impl_x_locked_low (const rec_t *clust_rec, dict_index_t *clust_index, const rec_t *rec, dict_index_t *index, const ulint *offsets, mtr_t *mtr) |
UNIV_INTERN trx_id_t | row_vers_impl_x_locked (const rec_t *rec, dict_index_t *index, const ulint *offsets) |
UNIV_INTERN ibool | row_vers_must_preserve_del_marked (trx_id_t trx_id, mtr_t *mtr) |
UNIV_INTERN ibool | row_vers_old_has_index_entry (ibool also_curr, const rec_t *rec, mtr_t *mtr, dict_index_t *index, const dtuple_t *ientry) |
UNIV_INTERN dberr_t | row_vers_build_for_consistent_read (const rec_t *rec, mtr_t *mtr, dict_index_t *index, ulint **offsets, read_view_t *view, mem_heap_t **offset_heap, mem_heap_t *in_heap, rec_t **old_vers) |
UNIV_INTERN void | row_vers_build_for_semi_consistent_read (const rec_t *rec, mtr_t *mtr, dict_index_t *index, ulint **offsets, mem_heap_t **offset_heap, mem_heap_t *in_heap, const rec_t **old_vers) |
UNIV_INTERN dberr_t row_vers_build_for_consistent_read | ( | const rec_t * | rec, |
mtr_t * | mtr, | ||
dict_index_t * | index, | ||
ulint ** | offsets, | ||
read_view_t * | view, | ||
mem_heap_t ** | offset_heap, | ||
mem_heap_t * | in_heap, | ||
rec_t ** | old_vers | ||
) |
Constructs the version of a clustered index record which a consistent read should see. We assume that the trx id stored in rec is such that the consistent read should not see rec in its present version.
rec | in: record in a clustered index; the caller must have a latch on the page; this latch locks the top of the stack of versions of this records |
mtr | in: mtr holding the latch on rec |
index | in: the clustered index |
offsets | in/out: offsets returned by rec_get_offsets(rec, index) |
view | in: the consistent read view |
offset_heap | in/out: memory heap from which the offsets are allocated |
in_heap | in: memory heap from which the memory for *old_vers is allocated; memory for possible intermediate versions is allocated and freed locally within the function |
old_vers | out, own: old version, or NULL if the history is missing or the record does not exist in the view, that is, it was freshly inserted afterwards |
Definition at line 477 of file row0vers.cc.
UNIV_INTERN void row_vers_build_for_semi_consistent_read | ( | const rec_t * | rec, |
mtr_t * | mtr, | ||
dict_index_t * | index, | ||
ulint ** | offsets, | ||
mem_heap_t ** | offset_heap, | ||
mem_heap_t * | in_heap, | ||
const rec_t ** | old_vers | ||
) |
Constructs the last committed version of a clustered index record, which should be seen by a semi-consistent read.
rec | in: record in a clustered index; the caller must have a latch on the page; this latch locks the top of the stack of versions of this records |
mtr | in: mtr holding the latch on rec |
index | in: the clustered index |
offsets | in/out: offsets returned by rec_get_offsets(rec, index) |
offset_heap | in/out: memory heap from which the offsets are allocated |
in_heap | in: memory heap from which the memory for *old_vers is allocated; memory for possible intermediate versions is allocated and freed locally within the function |
old_vers | out: rec, old version, or NULL if the record does not exist in the view, that is, it was freshly inserted afterwards |
Definition at line 612 of file row0vers.cc.
UNIV_INTERN trx_id_t row_vers_impl_x_locked | ( | const rec_t * | rec, |
dict_index_t * | index, | ||
const ulint * | offsets | ||
) |
Finds out if an active transaction has inserted or modified a secondary index record.
rec | in: record in a secondary index |
index | in: the secondary index |
offsets | in: rec_get_offsets(rec, index) |
Definition at line 253 of file row0vers.cc.
UNIV_INLINE trx_id_t row_vers_impl_x_locked_low | ( | const rec_t * | clust_rec, |
dict_index_t * | clust_index, | ||
const rec_t * | rec, | ||
dict_index_t * | index, | ||
const ulint * | offsets, | ||
mtr_t * | mtr | ||
) |
Finds out if an active transaction has inserted or modified a secondary index record.
clust_rec | in: clustered index record |
clust_index | in: the clustered index |
rec | in: secondary index record |
index | in: the secondary index |
offsets | in: rec_get_offsets(rec, index) |
mtr | in/out: mini-transaction |
Definition at line 58 of file row0vers.cc.
Finds out if we must preserve a delete marked earlier version of a clustered index record, because it is >= the purge view.
trx_id | in: transaction id in the version |
mtr | in: mtr holding the latch on the clustered index record; it will also hold the latch on purge_view |
Definition at line 309 of file row0vers.cc.
UNIV_INTERN ibool row_vers_old_has_index_entry | ( | ibool | also_curr, |
const rec_t * | rec, | ||
mtr_t * | mtr, | ||
dict_index_t * | index, | ||
const dtuple_t * | ientry | ||
) |
Finds out if a version of the record, where the version >= the current purge view, should have ientry as its secondary index entry. We check if there is any not delete marked version of the record where the trx id >= purge view, and the secondary index entry and ientry are identified in the alphabetical ordering; exactly in this case we return TRUE.
also_curr | in: TRUE if also rec is included in the versions to search; otherwise only versions prior to it are searched |
rec | in: record in the clustered index; the caller must have a latch on the page |
mtr | in: mtr holding the latch on rec; it will also hold the latch on purge_view |
index | in: the secondary index |
ientry | in: the secondary index entry |
Definition at line 334 of file row0vers.cc.