summaryrefslogtreecommitdiff
path: root/storage/innobase/include/row0vers.h
diff options
context:
space:
mode:
Diffstat (limited to 'storage/innobase/include/row0vers.h')
-rw-r--r--storage/innobase/include/row0vers.h47
1 files changed, 28 insertions, 19 deletions
diff --git a/storage/innobase/include/row0vers.h b/storage/innobase/include/row0vers.h
index 7b850215701..cd476acb6a1 100644
--- a/storage/innobase/include/row0vers.h
+++ b/storage/innobase/include/row0vers.h
@@ -33,7 +33,10 @@ Created 2/6/1997 Heikki Tuuri
#include "que0types.h"
#include "rem0types.h"
#include "mtr0mtr.h"
-#include "read0types.h"
+#include "dict0mem.h"
+
+// Forward declaration
+class ReadView;
/*****************************************************************//**
Finds out if an active transaction has inserted or modified a secondary
@@ -42,33 +45,36 @@ index record.
NOTE that this function can return false positives but never false
negatives. The caller must confirm all positive results by calling
trx_is_active() while holding lock_sys->mutex. */
-UNIV_INTERN
-trx_id_t
+trx_t*
row_vers_impl_x_locked(
/*===================*/
const rec_t* rec, /*!< in: record in a secondary index */
dict_index_t* index, /*!< in: the secondary index */
const ulint* offsets);/*!< in: rec_get_offsets(rec, index) */
+
/*****************************************************************//**
Finds out if we must preserve a delete marked earlier version of a clustered
index record, because it is >= the purge view.
-@return TRUE if earlier version should be preserved */
-UNIV_INTERN
+@param[in] trx_id transaction id in the version
+@param[in] name table name
+@param[in,out] mtr mini transaction holding the latch on the
+ clustered index record; it will also hold
+ the latch on purge_view
+@return TRUE if earlier version should be preserved */
ibool
row_vers_must_preserve_del_marked(
/*==============================*/
- trx_id_t trx_id, /*!< in: transaction id in the version */
- mtr_t* mtr); /*!< in: mtr holding the latch on the
- clustered index record; it will also
- hold the latch on purge_view */
+ trx_id_t trx_id,
+ const table_name_t& name,
+ mtr_t* mtr);
+
/*****************************************************************//**
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 == ientry; exactly in
this case we return TRUE.
-@return TRUE if earlier version should have */
-UNIV_INTERN
+@return TRUE if earlier version should have */
ibool
row_vers_old_has_index_entry(
/*=========================*/
@@ -80,13 +86,15 @@ row_vers_old_has_index_entry(
mtr_t* mtr, /*!< in: mtr holding the latch on rec; it will
also hold the latch on purge_view */
dict_index_t* index, /*!< in: the secondary index */
- const dtuple_t* ientry);/*!< in: the secondary index entry */
+ const dtuple_t* ientry, /*!< in: the secondary index entry */
+ roll_ptr_t roll_ptr,/*!< in: roll_ptr for the purge record */
+ trx_id_t trx_id);/*!< in: transaction ID on the purging record */
+
/*****************************************************************//**
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.
-@return DB_SUCCESS or DB_MISSING_HISTORY */
-UNIV_INTERN
+@return DB_SUCCESS or DB_MISSING_HISTORY */
dberr_t
row_vers_build_for_consistent_read(
/*===============================*/
@@ -99,23 +107,23 @@ row_vers_build_for_consistent_read(
dict_index_t* index, /*!< in: the clustered index */
ulint** offsets,/*!< in/out: offsets returned by
rec_get_offsets(rec, index) */
- read_view_t* view, /*!< in: the consistent read view */
+ ReadView* view, /*!< in: the consistent read view */
mem_heap_t** offset_heap,/*!< in/out: memory heap from which
the offsets are allocated */
mem_heap_t* 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 */
- rec_t** old_vers)/*!< out, own: old version, or NULL
+ rec_t** 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 */
+ const dtuple_t**vrow) /*!< out: reports virtual column info if any */
MY_ATTRIBUTE((nonnull(1,2,3,4,5,6,7)));
/*****************************************************************//**
Constructs the last committed version of a clustered index record,
which should be seen by a semi-consistent read. */
-UNIV_INTERN
void
row_vers_build_for_semi_consistent_read(
/*====================================*/
@@ -133,12 +141,13 @@ row_vers_build_for_semi_consistent_read(
*old_vers is allocated; memory for possible
intermediate versions is allocated and freed
locally within the function */
- const rec_t** old_vers)/*!< out: rec, old version, or NULL if the
+ const rec_t** old_vers,/*!< out: rec, old version, or NULL if the
record does not exist in the view, that is,
it was freshly inserted afterwards */
+ const dtuple_t**vrow) /*!< out: holds virtual column info if any
+ is updated in the view */
MY_ATTRIBUTE((nonnull(1,2,3,4,5)));
-
#ifndef UNIV_NONINL
#include "row0vers.ic"
#endif