|
InnoDB Plugin
1.0
|


Macros | |
| #define | TRX_SYS_RSEG_SPACE |
| #define | TRX_SYS_RSEG_PAGE_NO |
| #define | TRX_SYS_RSEG_SLOT_SIZE 8 |
Typedefs | |
| typedef byte | trx_sysf_rseg_t |
Functions | |
| UNIV_INTERN void | trx_sys_flush_max_trx_id (void) |
| UNIV_INLINE ibool | trx_sys_hdr_page (ulint space, ulint page_no) |
| UNIV_INLINE trx_rseg_t * | trx_sys_get_nth_rseg (trx_sys_t *sys, ulint n) |
| UNIV_INLINE trx_sysf_t * | trx_sysf_get (mtr_t *mtr) |
| UNIV_INLINE ulint | trx_sysf_rseg_get_space (trx_sysf_t *sys_header, ulint i, mtr_t *mtr) |
| UNIV_INLINE ulint | trx_sysf_rseg_get_page_no (trx_sysf_t *sys_header, ulint i, mtr_t *mtr) |
| UNIV_INLINE void | trx_sysf_rseg_set_space (trx_sysf_t *sys_header, ulint i, ulint space, mtr_t *mtr) |
| UNIV_INLINE void | trx_sysf_rseg_set_page_no (trx_sysf_t *sys_header, ulint i, ulint page_no, mtr_t *mtr) |
| UNIV_INLINE void | trx_write_trx_id (byte *ptr, trx_id_t id) |
| UNIV_INLINE trx_id_t | trx_read_trx_id (const byte *ptr) |
| UNIV_INLINE trx_t * | trx_get_rw_trx_by_id (trx_id_t trx_id) |
| UNIV_INLINE trx_id_t | trx_rw_min_trx_id_low (void) |
| UNIV_INLINE ibool | trx_assert_recovered (trx_id_t trx_id) |
| UNIV_INLINE trx_id_t | trx_rw_min_trx_id (void) |
| UNIV_INLINE trx_t * | trx_rw_is_active_low (trx_id_t trx_id, ibool *corrupt) |
| UNIV_INLINE trx_t * | trx_rw_is_active (trx_id_t trx_id, ibool *corrupt) |
| UNIV_INLINE trx_id_t | trx_sys_get_new_trx_id (void) |
| UNIV_INLINE trx_id_t | trx_sys_get_max_trx_id (void) |
| UNIV_INLINE ulint | trx_sys_get_n_rw_trx (void) |
Transaction system
Created 3/26/1996 Heikki Tuuri
| #define TRX_SYS_RSEG_PAGE_NO |
| #define TRX_SYS_RSEG_SPACE |
Assert that a transaction has been recovered.
| trx_id | in: transaction identifier |
Looks for the trx handle with the given id in rw_trx_list. The caller must be holding trx_sys->mutex.
| trx_id | in: trx id to search for |
| UNIV_INLINE trx_id_t trx_read_trx_id | ( | const byte * | ptr | ) |
Reads a trx id from an index page. In case that the id size changes in some future version, this function should be used instead of mach_read_...
| ptr | in: pointer to memory from where to read |
Checks if a rw transaction with the given id is active. If the caller is not holding lock_sys->mutex, the transaction may already have been committed.
| trx_id | in: trx id of the transaction |
| corrupt | in: NULL or pointer to a flag that will be set if corrupt |
Checks if a rw transaction with the given id is active. Caller must hold trx_sys->mutex. If the caller is not holding lock_sys->mutex, the transaction may already have been committed.
| trx_id | in: trx id of the transaction |
| corrupt | in: NULL or pointer to a flag that will be set if corrupt |
| UNIV_INLINE trx_id_t trx_rw_min_trx_id | ( | void | ) |
Returns the minimum trx id in rw trx list. This is the smallest id for which the rw trx can possibly be active. (But, you must look at the trx->state to find out if the minimum trx id transaction itself is active, or already committed.)
| UNIV_INLINE trx_id_t trx_rw_min_trx_id_low | ( | void | ) |
Returns the minimum trx id in trx list. This is the smallest id for which the trx can possibly be active. (But, you must look at the trx->state to find out if the minimum trx id transaction itself is active, or already committed.). The caller must be holding the trx_sys_t::mutex in shared mode.
| UNIV_INTERN void trx_sys_flush_max_trx_id | ( | void | ) |
Writes the value of max_trx_id to the file based trx system header.
| UNIV_INLINE trx_id_t trx_sys_get_max_trx_id | ( | void | ) |
Determines the maximum transaction id.
| UNIV_INLINE ulint trx_sys_get_n_rw_trx | ( | void | ) |
Get the number of transaction in the system, independent of their state.
| UNIV_INLINE trx_id_t trx_sys_get_new_trx_id | ( | void | ) |
Allocates a new transaction id.
| UNIV_INLINE trx_rseg_t* trx_sys_get_nth_rseg | ( | trx_sys_t * | sys, |
| ulint | n | ||
| ) |
Gets the pointer in the nth slot of the rseg array.
| sys | in: trx system |
| n | in: index of slot |
| UNIV_INLINE ibool trx_sys_hdr_page | ( | ulint | space, |
| ulint | page_no | ||
| ) |
Checks if a page address is the trx sys header page.
| space | in: space |
| page_no | in: page number |
| UNIV_INLINE trx_sysf_t* trx_sysf_get | ( | mtr_t * | mtr | ) |
Gets a pointer to the transaction system header and x-latches its page.
| mtr | in: mtr |
| UNIV_INLINE ulint trx_sysf_rseg_get_page_no | ( | trx_sysf_t * | sys_header, |
| ulint | i, | ||
| mtr_t * | mtr | ||
| ) |
Gets the page number of the nth rollback segment slot in the trx system header.
| sys_header | in: trx system header |
| i | in: slot index == rseg id |
| mtr | in: mtr |
| UNIV_INLINE ulint trx_sysf_rseg_get_space | ( | trx_sysf_t * | sys_header, |
| ulint | i, | ||
| mtr_t * | mtr | ||
| ) |
Gets the space of the nth rollback segment slot in the trx system file copy.
| sys_header | in: trx sys header |
| i | in: slot index == rseg id |
| mtr | in: mtr |
| UNIV_INLINE void trx_sysf_rseg_set_page_no | ( | trx_sysf_t * | sys_header, |
| ulint | i, | ||
| ulint | page_no, | ||
| mtr_t * | mtr | ||
| ) |
Sets the page number of the nth rollback segment slot in the trx system header.
| sys_header | in: trx sys header |
| i | in: slot index == rseg id |
| page_no | in: page number, FIL_NULL if the slot is reset to unused |
| mtr | in: mtr |
| UNIV_INLINE void trx_sysf_rseg_set_space | ( | trx_sysf_t * | sys_header, |
| ulint | i, | ||
| ulint | space, | ||
| mtr_t * | mtr | ||
| ) |
Sets the space id of the nth rollback segment slot in the trx system file copy.
| sys_header | in: trx sys file copy |
| i | in: slot index == rseg id |
| space | in: space id |
| mtr | in: mtr |
| UNIV_INLINE void trx_write_trx_id | ( | byte * | ptr, |
| trx_id_t | id | ||
| ) |
Writes a trx id to an index page. In case that the id size changes in some future version, this function should be used instead of mach_write_...
| ptr | in: pointer to memory where written |
| id | in: id |
1.8.1.2