MySQL 5.6.14 Source Code Document
|
#include "trx0rec.h"
#include "fsp0fsp.h"
#include "mach0data.h"
#include "trx0undo.h"
#include "mtr0log.h"
#include "dict0dict.h"
#include "ut0mem.h"
#include "read0read.h"
#include "row0ext.h"
#include "row0upd.h"
#include "que0que.h"
#include "trx0purge.h"
#include "trx0rseg.h"
#include "row0row.h"
Go to the source code of this file.
Macros | |
#define | ATTRIB_USED_ONLY_IN_DEBUG __attribute__((unused)) |
Functions | |
UNIV_INLINE void | trx_undof_page_add_undo_rec_log (page_t *undo_page, ulint old_free, ulint new_free, mtr_t *mtr) |
UNIV_INTERN byte * | trx_undo_parse_add_undo_rec (byte *ptr, byte *end_ptr, page_t *page) |
UNIV_INLINE ulint | trx_undo_left (const page_t *page, const byte *ptr) |
UNIV_INTERN byte * | trx_undo_rec_get_pars (trx_undo_rec_t *undo_rec, ulint *type, ulint *cmpl_info, bool *updated_extern, undo_no_t *undo_no, table_id_t *table_id) |
UNIV_INTERN byte * | trx_undo_rec_get_row_ref (byte *ptr, dict_index_t *index, dtuple_t **ref, mem_heap_t *heap) |
UNIV_INTERN byte * | trx_undo_rec_skip_row_ref (byte *ptr, dict_index_t *index) |
UNIV_INTERN byte * | trx_undo_update_rec_get_sys_cols (byte *ptr, trx_id_t *trx_id, roll_ptr_t *roll_ptr, ulint *info_bits) |
UNIV_INLINE byte * | trx_undo_update_rec_get_n_upd_fields (byte *ptr, ulint *n) |
UNIV_INLINE byte * | trx_undo_update_rec_get_field_no (byte *ptr, ulint *field_no) |
UNIV_INTERN byte * | trx_undo_update_rec_get_update (byte *ptr, dict_index_t *index, ulint type, trx_id_t trx_id, roll_ptr_t roll_ptr, ulint info_bits, trx_t *trx, mem_heap_t *heap, upd_t **upd) |
UNIV_INTERN byte * | trx_undo_rec_get_partial_row (byte *ptr, dict_index_t *index, dtuple_t **row, ibool ignore_prefix, mem_heap_t *heap) |
UNIV_INLINE ulint trx_undo_left | ( | const page_t * | page, |
const byte * | ptr | ||
) |
Calculates the free space left for extending an undo log record.
page | in: undo log page |
ptr | in: pointer to page |
Definition at line 143 of file trx0rec.cc.
UNIV_INTERN byte* trx_undo_parse_add_undo_rec | ( | byte * | ptr, |
byte * | end_ptr, | ||
page_t * | page | ||
) |
Parses a redo log record of adding an undo log record.
ptr | in: buffer |
end_ptr | in: buffer end |
page | in: page or NULL |
Definition at line 95 of file trx0rec.cc.
UNIV_INTERN byte* trx_undo_rec_get_pars | ( | trx_undo_rec_t * | undo_rec, |
ulint * | type, | ||
ulint * | cmpl_info, | ||
bool * | updated_extern, | ||
undo_no_t * | undo_no, | ||
table_id_t * | table_id | ||
) |
Reads from an undo log record the general parameters.
undo_rec | in: undo log record |
type | out: undo record type: TRX_UNDO_INSERT_REC, ... |
cmpl_info | out: compiler info, relevant only for update type records |
updated_extern | out: true if we updated an externally stored fild |
undo_no | out: undo log record number |
table_id | out: table id |
Definition at line 283 of file trx0rec.cc.
UNIV_INTERN byte* trx_undo_rec_get_partial_row | ( | byte * | ptr, |
dict_index_t * | index, | ||
dtuple_t ** | row, | ||
ibool | ignore_prefix, | ||
mem_heap_t * | heap | ||
) |
Builds a partial row from an update undo log record, for purge. It contains the columns which occur as ordering in any index of the table. Any missing columns are indicated by col->mtype == DATA_MISSING.
ptr | in: remaining part in update undo log record of a suitable type, at the start of the stored index columns; NOTE that this copy of the undo log record must be preserved as long as the partial row is used, as we do NOT copy the data in the record! |
index | in: clustered index |
row | out, own: partial row |
ignore_prefix | in: flag to indicate if we expect blob prefixes in undo. Used only in the assertion. |
heap | in: memory heap from which the memory needed is allocated |
Definition at line 1046 of file trx0rec.cc.
UNIV_INTERN byte* trx_undo_rec_get_row_ref | ( | byte * | ptr, |
dict_index_t * | index, | ||
dtuple_t ** | ref, | ||
mem_heap_t * | heap | ||
) |
Builds a row reference from an undo log record.
ptr | in: remaining part of a copy of an undo log record, at the start of the row reference; NOTE that this copy of the undo log record must be preserved as long as the row reference is used, as we do NOT copy the data in the record! |
index | in: clustered index |
ref | out, own: row reference |
heap | in: memory heap from which the memory needed is allocated |
Definition at line 378 of file trx0rec.cc.
UNIV_INTERN byte* trx_undo_rec_skip_row_ref | ( | byte * | ptr, |
dict_index_t * | index | ||
) |
Skips a row reference from an undo log record.
ptr | in: remaining part in update undo log record, at the start of the row reference |
index | in: clustered index |
Definition at line 424 of file trx0rec.cc.
UNIV_INLINE byte* trx_undo_update_rec_get_field_no | ( | byte * | ptr, |
ulint * | field_no | ||
) |
Reads from an update undo log record a stored field number.
ptr | in: pointer to remaining part of undo log record |
field_no | out: field number |
Definition at line 901 of file trx0rec.cc.
UNIV_INLINE byte* trx_undo_update_rec_get_n_upd_fields | ( | byte * | ptr, |
ulint * | n | ||
) |
Reads from an update undo log record the number of updated fields.
ptr | in: pointer to remaining part of undo log record |
n | out: number of fields |
Definition at line 885 of file trx0rec.cc.
UNIV_INTERN byte* trx_undo_update_rec_get_sys_cols | ( | byte * | ptr, |
trx_id_t * | trx_id, | ||
roll_ptr_t * | roll_ptr, | ||
ulint * | info_bits | ||
) |
Reads from an undo log update record the system field values of the old version.
ptr | in: remaining part of undo log record after reading general parameters |
trx_id | out: trx id |
roll_ptr | out: roll ptr |
info_bits | out: info bits state |
Definition at line 856 of file trx0rec.cc.
UNIV_INTERN byte* trx_undo_update_rec_get_update | ( | byte * | ptr, |
dict_index_t * | index, | ||
ulint | type, | ||
trx_id_t | trx_id, | ||
roll_ptr_t | roll_ptr, | ||
ulint | info_bits, | ||
trx_t * | trx, | ||
mem_heap_t * | heap, | ||
upd_t ** | upd | ||
) |
Builds an update vector based on a remaining part of an undo log record.
ptr | in: remaining part in update undo log record, after reading the row reference NOTE that this copy of the undo log record must be preserved as long as the update vector is used, as we do NOT copy the data in the record! |
index | in: clustered index |
type | in: TRX_UNDO_UPD_EXIST_REC, TRX_UNDO_UPD_DEL_REC, or TRX_UNDO_DEL_MARK_REC; in the last case, only trx id and roll ptr fields are added to the update vector |
trx_id | in: transaction id from this undo record |
roll_ptr | in: roll pointer from this undo record |
info_bits | in: info bits from this undo record |
trx | in: transaction |
heap | in: memory heap from which the memory needed is allocated |
upd | out, own: update vector |
Definition at line 918 of file trx0rec.cc.
UNIV_INLINE void trx_undof_page_add_undo_rec_log | ( | page_t * | undo_page, |
ulint | old_free, | ||
ulint | new_free, | ||
mtr_t * | mtr | ||
) |
Writes the mtr log entry of the inserted undo log record on the undo log page.
undo_page | in: undo log page |
old_free | in: start offset of the inserted entry |
new_free | in: end offset of the entry |
mtr | in: mtr |
Definition at line 54 of file trx0rec.cc.