MySQL 5.6.14 Source Code Document
|
#include "univ.i"
#include "trx0types.h"
#include "mtr0mtr.h"
#include "trx0sys.h"
#include "que0types.h"
#include "page0page.h"
#include "usr0sess.h"
#include "fil0fil.h"
#include "trx0purge.ic"
Go to the source code of this file.
Classes | |
struct | purge_iter_t |
struct | trx_purge_t |
struct | trx_purge_rec_t |
Enumerations | |
enum | purge_state_t { PURGE_STATE_INIT, PURGE_STATE_RUN, PURGE_STATE_STOP, PURGE_STATE_EXIT, PURGE_STATE_DISABLED } |
Functions | |
UNIV_INLINE fil_addr_t | trx_purge_get_log_from_hist (fil_addr_t node_addr) |
UNIV_INTERN void | trx_purge_sys_create (ulint n_purge_threads, ib_bh_t *ib_bh) |
UNIV_INTERN void | trx_purge_sys_close (void) |
UNIV_INTERN void | trx_purge_add_update_undo_to_history (trx_t *trx, page_t *undo_page, mtr_t *mtr) |
UNIV_INTERN ulint | trx_purge (ulint n_purge_threads, ulint limit, bool truncate) |
UNIV_INTERN void | trx_purge_stop (void) |
UNIV_INTERN void | trx_purge_run (void) |
UNIV_INTERN purge_state_t | trx_purge_state (void) |
Variables | |
trx_purge_t * | purge_sys |
trx_undo_rec_t | trx_purge_dummy_rec |
enum purge_state_t |
Purge states
Definition at line 107 of file trx0purge.h.
UNIV_INTERN ulint trx_purge | ( | ulint | n_purge_threads, |
ulint | limit, | ||
bool | truncate | ||
) |
This function runs a purge batch.
n_purge_threads | in: number of purge tasks to submit to task queue. |
limit | in: the maximum number of records to purge in one batch |
UNIV_INTERN void trx_purge_add_update_undo_to_history | ( | trx_t * | trx, |
page_t * | undo_page, | ||
mtr_t * | mtr | ||
) |
in: mtr
Adds the update undo log as the first log in the history list. Removes the update undo log segment from the rseg slot if it is too big for reuse.
trx | in: transaction |
undo_page | in: update undo log header page, x-latched |
mtr | in: mtr |
Definition at line 201 of file trx0purge.cc.
UNIV_INLINE fil_addr_t trx_purge_get_log_from_hist | ( | fil_addr_t | node_addr | ) |
Calculates the file address of an undo log header when we have the file address of its history list node.
UNIV_INTERN void trx_purge_run | ( | void | ) |
Resume purge, move to PURGE_STATE_RUN.
UNIV_INTERN purge_state_t trx_purge_state | ( | void | ) |
Get the purge state.
UNIV_INTERN void trx_purge_stop | ( | void | ) |
Stop purge and wait for it to stop, move to PURGE_STATE_STOP.
UNIV_INTERN void trx_purge_sys_close | ( | void | ) |
Frees the global purge system control structure.
Definition at line 162 of file trx0purge.cc.
UNIV_INTERN void trx_purge_sys_create | ( | ulint | n_purge_threads, |
ib_bh_t * | ib_bh | ||
) |
Creates the global purge system control structure and inits the history mutex. in/own: UNDO log min binary heap
Creates the global purge system control structure and inits the history mutex.
n_purge_threads | in: number of purge threads |
ib_bh | in, own: UNDO log min binary heap |
Definition at line 112 of file trx0purge.cc.
trx_purge_t* purge_sys |
The global data structure coordinating a purge
Definition at line 56 of file trx0purge.cc.
trx_undo_rec_t trx_purge_dummy_rec |
A dummy undo record used as a return value when we have a whole undo log
which needs no purge
Definition at line 60 of file trx0purge.cc.