MySQL 9.1.0
Source Code Documentation
|
Transaction undo log. More...
Functions | |
roll_ptr_t | trx_undo_build_roll_ptr (bool is_insert, space_id_t space_id, page_no_t page_no, ulint offset) |
Build a roll pointer. More... | |
void | trx_undo_decode_roll_ptr (roll_ptr_t roll_ptr, bool *is_insert, ulint *rseg_id, page_no_t *page_no, ulint *offset) |
Decodes a roll pointer. More... | |
static bool | trx_undo_roll_ptr_is_insert (roll_ptr_t roll_ptr) |
Returns true if the roll pointer is of the insert type. More... | |
static bool | trx_undo_trx_id_is_insert (const byte *trx_id) |
Returns true if the record is of the insert type. More... | |
static void | trx_write_roll_ptr (byte *ptr, roll_ptr_t roll_ptr) |
Writes a roll ptr to an index page. More... | |
static roll_ptr_t | trx_read_roll_ptr (const byte *ptr) |
Reads a roll ptr from an index page. More... | |
static page_t * | trx_undo_page_get (const page_id_t &page_id, const page_size_t &page_size, mtr_t *mtr) |
Gets an undo log page and x-latches it. More... | |
static page_t * | trx_undo_page_get_s_latched (const page_id_t &page_id, const page_size_t &page_size, mtr_t *mtr) |
Gets an undo log page and s-latches it. More... | |
static ulint | trx_undo_page_get_start (page_t *undo_page, page_no_t page_no, ulint offset) |
Returns the start offset of the undo log records of the specified undo log on the page. More... | |
static ulint | trx_undo_page_get_end (page_t *undo_page, page_no_t page_no, ulint offset) |
Returns the end offset of the undo log records of the specified undo log on the page. More... | |
static trx_undo_rec_t * | trx_undo_page_get_prev_rec (trx_undo_rec_t *rec, page_no_t page_no, ulint offset) |
Returns the previous undo record on the page in the specified log, or NULL if none exists. More... | |
static trx_undo_rec_t * | trx_undo_page_get_next_rec (trx_undo_rec_t *rec, page_no_t page_no, ulint offset) |
Returns the next undo log record on the page in the specified log, or NULL if none exists. More... | |
static trx_undo_rec_t * | trx_undo_page_get_last_rec (page_t *undo_page, page_no_t page_no, ulint offset) |
Returns the last undo record on the page in the specified undo log, or NULL if none exists. More... | |
static trx_undo_rec_t * | trx_undo_page_get_first_rec (page_t *undo_page, page_no_t page_no, ulint offset) |
Returns the first undo record on the page in the specified undo log, or NULL if none exists. More... | |
Transaction undo log.
Created 3/26/1996 Heikki Tuuri
|
inlinestatic |
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 |
|
inline |
Build a roll pointer.
[in] | is_insert | true if insert undo log |
[in] | space_id | space ID of the rollback segment |
[in] | page_no | page number |
[in] | offset | offset of the undo entry within page |
|
inline |
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 |
|
inlinestatic |
Gets an undo log page and x-latches it.
[in] | page_id | Page id |
[in] | page_size | Page size |
[in,out] | mtr | Mini-transaction |
|
inlinestatic |
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 |
|
inlinestatic |
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 |
|
inlinestatic |
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 |
|
inlinestatic |
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 |
|
inlinestatic |
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 |
|
inlinestatic |
Gets an undo log page and s-latches it.
[in] | page_id | Page id |
[in] | page_size | Page size |
[in,out] | mtr | Mini-transaction |
|
inlinestatic |
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 |
|
inlinestatic |
Returns true if the roll pointer is of the insert type.
roll_ptr | in: roll pointer |
|
inlinestatic |
Returns true if the record is of the insert type.
trx_id | in: DB_TRX_ID, followed by DB_ROLL_PTR |
|
inlinestatic |
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 |