InnoDB Plugin
1.0
|
#include "univ.i"
#include "trx0types.h"
#include "trx0sys.h"
#include "ut0bh.h"
#include "trx0rseg.ic"
Go to the source code of this file.
Data Structures | |
struct | trx_rseg_t |
struct | rseg_queue_t |
Macros | |
#define | TRX_RSEG_N_SLOTS (UNIV_PAGE_SIZE / 16) |
#define | TRX_RSEG_MAX_N_TRXS (TRX_RSEG_N_SLOTS / 2) |
#define | TRX_RSEG_SLOT_PAGE_NO |
#define | TRX_RSEG_SLOT_SIZE 4 |
#define | TRX_RSEG FSEG_PAGE_DATA |
#define | TRX_RSEG_MAX_SIZE |
#define | TRX_RSEG_HISTORY_SIZE |
#define | TRX_RSEG_HISTORY |
#define | TRX_RSEG_FSEG_HEADER (8 + FLST_BASE_NODE_SIZE) |
#define | TRX_RSEG_UNDO_SLOTS (8 + FLST_BASE_NODE_SIZE + FSEG_HEADER_SIZE) |
Functions | |
UNIV_INLINE trx_rsegf_t * | trx_rsegf_get (ulint space, ulint zip_size, ulint page_no, mtr_t *mtr) |
UNIV_INLINE trx_rsegf_t * | trx_rsegf_get_new (ulint space, ulint zip_size, ulint page_no, mtr_t *mtr) |
UNIV_INLINE ulint | trx_rsegf_get_nth_undo (trx_rsegf_t *rsegf, ulint n, mtr_t *mtr) |
UNIV_INLINE void | trx_rsegf_set_nth_undo (trx_rsegf_t *rsegf, ulint n, ulint page_no, mtr_t *mtr) |
UNIV_INLINE ulint | trx_rsegf_undo_find_free (trx_rsegf_t *rsegf, mtr_t *mtr) |
UNIV_INLINE trx_rseg_t * | trx_rseg_get_on_id (ulint id) |
UNIV_INTERN ulint | trx_rseg_header_create (ulint space, ulint zip_size, ulint max_size, ulint rseg_slot_no, mtr_t *mtr) |
UNIV_INTERN void | trx_rseg_array_init (trx_sysf_t *sys_header, ib_bh_t *ib_bh, mtr_t *mtr) |
UNIV_INTERN void | trx_rseg_mem_free (trx_rseg_t *rseg) |
UNIV_INTERN trx_rseg_t * | trx_rseg_create (ulint space) |
UNIV_INTERN ulint | trx_rseg_get_n_undo_tablespaces (ulint *space_ids) |
Rollback segment
Created 3/26/1996 Heikki Tuuri
#define TRX_RSEG_HISTORY |
#define TRX_RSEG_HISTORY_SIZE |
#define TRX_RSEG_MAX_SIZE |
#define TRX_RSEG_SLOT_PAGE_NO |
UNIV_INTERN void trx_rseg_array_init | ( | trx_sysf_t * | sys_header, |
ib_bh_t * | ib_bh, | ||
mtr_t * | mtr | ||
) |
Creates the memory copies for rollback segments and initializes the rseg array in trx_sys at a database startup. in/out: mtr
sys_header | in/out: trx system header |
ib_bh | in: rseg queue |
UNIV_INTERN trx_rseg_t* trx_rseg_create | ( | ulint | space | ) |
in: id of UNDO tablespace
UNIV_INTERN ulint trx_rseg_get_n_undo_tablespaces | ( | ulint * | space_ids | ) |
out: array of space ids of UNDO tablespaces
UNIV_INLINE trx_rseg_t* trx_rseg_get_on_id | ( | ulint | id | ) |
Looks for a rollback segment, based on the rollback segment id.
Looks for a rollback segment, based on the rollback segment id.
id | in: rollback segment id |
UNIV_INTERN ulint trx_rseg_header_create | ( | ulint | space, |
ulint | zip_size, | ||
ulint | max_size, | ||
ulint | rseg_slot_no, | ||
mtr_t * | mtr | ||
) |
Creates a rollback segment header. This function is called only when a new rollback segment is created in the database.
space | in: space id |
zip_size | in: compressed page size in bytes or 0 for uncompressed pages |
max_size | in: max size in pages |
rseg_slot_no | in: rseg id == slot number in trx sys |
UNIV_INTERN void trx_rseg_mem_free | ( | trx_rseg_t * | rseg | ) |
in, own: instance to free
UNIV_INLINE trx_rsegf_t* trx_rsegf_get | ( | ulint | space, |
ulint | zip_size, | ||
ulint | page_no, | ||
mtr_t * | mtr | ||
) |
Gets a rollback segment header.
Gets a rollback segment header.
space | in: space where placed |
zip_size | in: compressed page size in bytes or 0 for uncompressed pages |
page_no | in: page number of the header |
mtr | in: mtr |
UNIV_INLINE trx_rsegf_t* trx_rsegf_get_new | ( | ulint | space, |
ulint | zip_size, | ||
ulint | page_no, | ||
mtr_t * | mtr | ||
) |
Gets a newly created rollback segment header.
Gets a newly created rollback segment header.
space | in: space where placed |
zip_size | in: compressed page size in bytes or 0 for uncompressed pages |
page_no | in: page number of the header |
mtr | in: mtr |
UNIV_INLINE ulint trx_rsegf_get_nth_undo | ( | trx_rsegf_t * | rsegf, |
ulint | n, | ||
mtr_t * | mtr | ||
) |
Gets the file page number of the nth undo log slot.
Gets the file page number of the nth undo log slot.
rsegf | in: rollback segment header |
n | in: index of slot |
mtr | in: mtr |
UNIV_INLINE void trx_rsegf_set_nth_undo | ( | trx_rsegf_t * | rsegf, |
ulint | n, | ||
ulint | page_no, | ||
mtr_t * | mtr | ||
) |
Sets the file page number of the nth undo log slot. in: mtr
Sets the file page number of the nth undo log slot.
rsegf | in: rollback segment header |
n | in: index of slot |
page_no | in: page number of the undo log segment |
mtr | in: mtr |
UNIV_INLINE ulint trx_rsegf_undo_find_free | ( | trx_rsegf_t * | rsegf, |
mtr_t * | mtr | ||
) |
Looks for a free slot for an undo log segment.
Looks for a free slot for an undo log segment.
rsegf | in: rollback segment header |
mtr | in: mtr |