summaryrefslogtreecommitdiff
path: root/storage/innobase/include/trx0rec.h
diff options
context:
space:
mode:
Diffstat (limited to 'storage/innobase/include/trx0rec.h')
-rw-r--r--storage/innobase/include/trx0rec.h22
1 files changed, 10 insertions, 12 deletions
diff --git a/storage/innobase/include/trx0rec.h b/storage/innobase/include/trx0rec.h
index 708af690e2b..bb348d7ef8b 100644
--- a/storage/innobase/include/trx0rec.h
+++ b/storage/innobase/include/trx0rec.h
@@ -181,17 +181,17 @@ trx_undo_report_row_operation(
is being called purge view and we would like to get the purge record
even it is in the purge view (in normal case, it will return without
fetching the purge record */
-#define TRX_UNDO_PREV_IN_PURGE 0x1
+static constexpr ulint TRX_UNDO_PREV_IN_PURGE = 1;
/** This tells trx_undo_prev_version_build() to fetch the old value in
the undo log (which is the after image for an update) */
-#define TRX_UNDO_GET_OLD_V_VALUE 0x2
+static constexpr ulint TRX_UNDO_GET_OLD_V_VALUE = 2;
+
+/** indicate a call from row_vers_old_has_index_entry() */
+static constexpr ulint TRX_UNDO_CHECK_PURGEABILITY = 4;
/** Build a previous version of a clustered index record. The caller
must hold a latch on the index page of the clustered index record.
-@param index_rec clustered index record in the index tree
-@param index_mtr mtr which contains the latch to index_rec page
- and purge_view
@param rec version of a clustered index record
@param index clustered index
@param offsets rec_get_offsets(rec, index)
@@ -210,14 +210,12 @@ must hold a latch on the index page of the clustered index record.
@param v_status status determine if it is going into this
function by purge thread or not.
And if we read "after image" of undo log
-@retval true if previous version was built, or if it was an insert
-or the table has been rebuilt
-@retval false if the previous version is earlier than purge_view,
-or being purged, which means that it may have been removed */
-bool
+@return error code
+@retval DB_SUCCESS if previous version was successfully built,
+or if it was an insert or the undo record refers to the table before rebuild
+@retval DB_MISSING_HISTORY if the history is missing */
+dberr_t
trx_undo_prev_version_build(
- const rec_t *index_rec,
- mtr_t *index_mtr,
const rec_t *rec,
dict_index_t *index,
rec_offs *offsets,