MySQL 5.6.14 Source Code Document
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
trx0undo.cc File Reference
#include "trx0undo.h"
#include "fsp0fsp.h"
#include "mach0data.h"
#include "mtr0log.h"
#include "trx0rseg.h"
#include "trx0trx.h"
#include "srv0srv.h"
#include "srv0start.h"
#include "trx0rec.h"
#include "trx0purge.h"
#include "srv0mon.h"
Include dependency graph for trx0undo.cc:

Go to the source code of this file.

Functions

UNIV_INTERN trx_undo_rec_ttrx_undo_get_prev_rec (trx_undo_rec_t *rec, ulint page_no, ulint offset, bool shared, mtr_t *mtr)
UNIV_INTERN trx_undo_rec_ttrx_undo_get_next_rec (trx_undo_rec_t *rec, ulint page_no, ulint offset, mtr_t *mtr)
UNIV_INTERN trx_undo_rec_ttrx_undo_get_first_rec (ulint space, ulint zip_size, ulint page_no, ulint offset, ulint mode, mtr_t *mtr)
UNIV_INLINE void trx_undo_page_init_log (page_t *undo_page, ulint type, mtr_t *mtr)
UNIV_INTERN byte * trx_undo_parse_page_init (byte *ptr, byte *end_ptr, page_t *page, mtr_t *mtr)

Variables

static trx_rsegf_trseg_hdr
static trx_rsegf_t ulint type
static trx_rsegf_t ulint ulint * id
static trx_rsegf_t ulint ulint
page_t ** 
undo_page

Detailed Description

Transaction undo log

Created 3/26/1996 Heikki Tuuri

Definition in file trx0undo.cc.

Function Documentation

UNIV_INTERN trx_undo_rec_t* trx_undo_get_first_rec ( ulint  space,
ulint  zip_size,
ulint  page_no,
ulint  offset,
ulint  mode,
mtr_t mtr 
)

Gets the first record in an undo log.

Returns
undo log record, the page latched, NULL if none
Parameters
spacein: undo log header space
zip_sizein: compressed page size in bytes or 0 for uncompressed pages
page_noin: undo log header page number
offsetin: undo log header offset on page
modein: latching mode: RW_S_LATCH or RW_X_LATCH
mtrin: mtr

Definition at line 312 of file trx0undo.cc.

Here is the call graph for this function:

UNIV_INTERN trx_undo_rec_t* trx_undo_get_next_rec ( trx_undo_rec_t rec,
ulint  page_no,
ulint  offset,
mtr_t mtr 
)

Gets the next record in an undo log.

Returns
undo log record, the page s-latched, NULL if none
Parameters
recin: undo record
page_noin: undo log header page number
offsetin: undo log header offset on page
mtrin: mtr

Definition at line 281 of file trx0undo.cc.

Here is the call graph for this function:

UNIV_INTERN trx_undo_rec_t* trx_undo_get_prev_rec ( trx_undo_rec_t rec,
ulint  page_no,
ulint  offset,
bool  shared,
mtr_t mtr 
)

Gets the previous record in an undo log.

Returns
undo log record, the page s-latched, NULL if none
Parameters
recin: undo record
page_noin: undo log header page number
offsetin: undo log header offset on page
sharedin: true=S-latch, false=X-latch
mtrin: mtr

Definition at line 200 of file trx0undo.cc.

Here is the call graph for this function:

UNIV_INLINE void trx_undo_page_init_log ( page_t undo_page,
ulint  type,
mtr_t mtr 
)

Writes the mtr log entry of an undo log page initialization.

Parameters
undo_pagein: undo log page
typein: undo log type
mtrin: mtr

Definition at line 349 of file trx0undo.cc.

Here is the call graph for this function:

UNIV_INTERN byte* trx_undo_parse_page_init ( byte *  ptr,
byte *  end_ptr,
page_t page,
mtr_t mtr 
)

Parses the redo log entry of an undo log page initialization.

Returns
end of log record or NULL
Parameters
ptrin: buffer
end_ptrin: buffer end
pagein: page or NULL
mtrin: mtr or NULL

Definition at line 368 of file trx0undo.cc.

Here is the call graph for this function:

Variable Documentation

trx_rsegf_t ulint ulint* id

out: slot index within rseg header

Definition at line 428 of file trx0undo.cc.

trx_rsegf_t* rseg_hdr

< in: rollback segment in: rollback segment header, page x-latched

Definition at line 428 of file trx0undo.cc.

trx_rsegf_t ulint type

in: type of the segment: TRX_UNDO_INSERT or TRX_UNDO_UPDATE

Definition at line 428 of file trx0undo.cc.

trx_rsegf_t ulint ulint page_t** undo_page

out: segment header page x-latched, NULL if there was an error

Definition at line 428 of file trx0undo.cc.