InnoDB Plugin
1.0
|
Functions | |
UNIV_INLINE roll_ptr_t | trx_undo_build_roll_ptr (ibool is_insert, ulint rseg_id, ulint page_no, ulint offset) |
UNIV_INLINE void | trx_undo_decode_roll_ptr (roll_ptr_t roll_ptr, ibool *is_insert, ulint *rseg_id, ulint *page_no, ulint *offset) |
UNIV_INLINE ibool | trx_undo_roll_ptr_is_insert (roll_ptr_t roll_ptr) |
UNIV_INLINE bool | trx_undo_trx_id_is_insert (const byte *trx_id) |
UNIV_INLINE void | trx_write_roll_ptr (byte *ptr, roll_ptr_t roll_ptr) |
UNIV_INLINE roll_ptr_t | trx_read_roll_ptr (const byte *ptr) |
UNIV_INLINE page_t * | trx_undo_page_get (ulint space, ulint zip_size, ulint page_no, mtr_t *mtr) |
UNIV_INLINE page_t * | trx_undo_page_get_s_latched (ulint space, ulint zip_size, ulint page_no, mtr_t *mtr) |
UNIV_INLINE ulint | trx_undo_page_get_start (page_t *undo_page, ulint page_no, ulint offset) |
UNIV_INLINE ulint | trx_undo_page_get_end (page_t *undo_page, ulint page_no, ulint offset) |
UNIV_INLINE trx_undo_rec_t * | trx_undo_page_get_prev_rec (trx_undo_rec_t *rec, ulint page_no, ulint offset) |
UNIV_INLINE trx_undo_rec_t * | trx_undo_page_get_next_rec (trx_undo_rec_t *rec, ulint page_no, ulint offset) |
UNIV_INLINE trx_undo_rec_t * | trx_undo_page_get_last_rec (page_t *undo_page, ulint page_no, ulint offset) |
UNIV_INLINE trx_undo_rec_t * | trx_undo_page_get_first_rec (page_t *undo_page, ulint page_no, ulint offset) |
Transaction undo log
Created 3/26/1996 Heikki Tuuri
UNIV_INLINE roll_ptr_t trx_read_roll_ptr | ( | const byte * | ptr | ) |
Reads a roll ptr from an index page. In case that the roll ptr size changes in some future version, this function should be used instead of mach_read_...
ptr | in: pointer to memory from where to read |
UNIV_INLINE roll_ptr_t trx_undo_build_roll_ptr | ( | ibool | is_insert, |
ulint | rseg_id, | ||
ulint | page_no, | ||
ulint | offset | ||
) |
Builds a roll pointer.
is_insert | in: TRUE if insert undo log |
rseg_id | in: rollback segment id |
page_no | in: page number |
offset | in: offset of the undo entry within page |
UNIV_INLINE void trx_undo_decode_roll_ptr | ( | roll_ptr_t | roll_ptr, |
ibool * | is_insert, | ||
ulint * | rseg_id, | ||
ulint * | page_no, | ||
ulint * | offset | ||
) |
Decodes a roll pointer.
roll_ptr | in: roll pointer |
is_insert | out: TRUE if insert undo log |
rseg_id | out: rollback segment id |
page_no | out: page number |
offset | out: offset of the undo entry within page |
Gets an undo log page and x-latches it.
space | in: space where placed |
zip_size | in: compressed page size in bytes or 0 for uncompressed pages |
page_no | in: page number |
mtr | in: mtr |
UNIV_INLINE ulint trx_undo_page_get_end | ( | page_t * | undo_page, |
ulint | page_no, | ||
ulint | offset | ||
) |
Returns the end offset of the undo log records of the specified undo log on the page.
undo_page | in: undo log page |
page_no | in: undo log header page number |
offset | in: undo log header offset on page |
UNIV_INLINE trx_undo_rec_t* trx_undo_page_get_first_rec | ( | page_t * | undo_page, |
ulint | page_no, | ||
ulint | offset | ||
) |
Returns the first undo record on the page in the specified undo log, or NULL if none exists.
undo_page | in: undo log page |
page_no | in: undo log header page number |
offset | in: undo log header offset on page |
UNIV_INLINE trx_undo_rec_t* trx_undo_page_get_last_rec | ( | page_t * | undo_page, |
ulint | page_no, | ||
ulint | offset | ||
) |
Returns the last undo record on the page in the specified undo log, or NULL if none exists.
undo_page | in: undo log page |
page_no | in: undo log header page number |
offset | in: undo log header offset on page |
UNIV_INLINE trx_undo_rec_t* trx_undo_page_get_next_rec | ( | trx_undo_rec_t * | rec, |
ulint | page_no, | ||
ulint | offset | ||
) |
Returns the next undo log record on the page in the specified log, or NULL if none exists.
rec | in: undo log record |
page_no | in: undo log header page number |
offset | in: undo log header offset on page |
UNIV_INLINE trx_undo_rec_t* trx_undo_page_get_prev_rec | ( | trx_undo_rec_t * | rec, |
ulint | page_no, | ||
ulint | offset | ||
) |
Returns the previous undo record on the page in the specified log, or NULL if none exists.
rec | in: undo log record |
page_no | in: undo log header page number |
offset | in: undo log header offset on page |
UNIV_INLINE page_t* trx_undo_page_get_s_latched | ( | ulint | space, |
ulint | zip_size, | ||
ulint | page_no, | ||
mtr_t * | mtr | ||
) |
Gets an undo log page and s-latches it.
space | in: space where placed |
zip_size | in: compressed page size in bytes or 0 for uncompressed pages |
page_no | in: page number |
mtr | in: mtr |
UNIV_INLINE ulint trx_undo_page_get_start | ( | page_t * | undo_page, |
ulint | page_no, | ||
ulint | offset | ||
) |
Returns the start offset of the undo log records of the specified undo log on the page.
undo_page | in: undo log page |
page_no | in: undo log header page number |
offset | in: undo log header offset on page |
UNIV_INLINE ibool trx_undo_roll_ptr_is_insert | ( | roll_ptr_t | roll_ptr | ) |
Returns TRUE if the roll pointer is of the insert type.
roll_ptr | in: roll pointer |
UNIV_INLINE bool trx_undo_trx_id_is_insert | ( | const byte * | trx_id | ) |
Returns true if the record is of the insert type.
trx_id | in: DB_TRX_ID, followed by DB_ROLL_PTR |
UNIV_INLINE void trx_write_roll_ptr | ( | byte * | ptr, |
roll_ptr_t | roll_ptr | ||
) |
Writes a roll ptr to an index page. In case that the size changes in some future version, this function should be used instead of mach_write_...
ptr | in: pointer to memory where written |
roll_ptr | in: roll ptr |