![]() |
MySQL 26.7.0
Source Code Documentation
|
Purge old versions. More...
#include "fil0fil.h"#include "mtr0mtr.h"#include "page0page.h"#include "que0types.h"#include "read0read_view_interface.h"#include "trx0sys.h"#include "trx0types.h"#include "trx0undo_trunc.h"#include "univ.i"#include "usr0sess.h"#include "trx0purge.ic"Go to the source code of this file.
Classes | |
| struct | purge_iter_t |
| This is the purge pointer/iterator. More... | |
| struct | trx_purge_t |
| The control structure used in the purge operation. More... | |
| struct | TrxUndoRsegsIterator |
| Choose the rollback segment with the smallest trx_no. More... | |
Enumerations | |
| enum | purge_state_t { PURGE_STATE_INIT , PURGE_STATE_RUN , PURGE_STATE_STOP , PURGE_STATE_EXIT , PURGE_STATE_DISABLED } |
| Purge states. More... | |
Functions | |
| static 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. More... | |
| void | trx_purge_sys_mem_create () |
| Initialize in-memory purge structures. More... | |
| void | trx_purge_sys_initialize (uint32_t n_purge_threads, purge_pq_t *purge_queue) |
| Creates the global purge system control structure and inits the history mutex. More... | |
| void | trx_purge_sys_close (void) |
| Frees the global purge system control structure. More... | |
| void | trx_purge_add_update_undo_to_history (trx_t *trx, trx_undo_ptr_t *undo_ptr, page_t *undo_page, bool update_rseg_history_len, ulint n_added_logs, mtr_t *mtr) |
| in: mtr More... | |
| ulint | trx_purge (ulint n_purge_threads, ulint limit, bool truncate) |
| This function runs a purge batch. More... | |
| void | trx_purge_stop (void) |
| Stop purge and wait for it to stop, move to PURGE_STATE_STOP. More... | |
| void | trx_purge_run () |
| Resume purge, move to PURGE_STATE_RUN. More... | |
| purge_state_t | trx_purge_state (void) |
| Get the purge state. More... | |
Variables | |
| trx_purge_t * | purge_sys |
| The global data structure coordinating a purge. More... | |
Purge old versions.
Created 3/26/1996 Heikki Tuuri
| enum purge_state_t |
This function runs a purge batch.
| n_purge_threads | in: number of purge tasks to submit to the work queue |
| batch_size | in: the maximum number of records to purge in one batch |
| truncate | in: truncate history if true |
| void trx_purge_add_update_undo_to_history | ( | trx_t * | trx, |
| trx_undo_ptr_t * | undo_ptr, | ||
| page_t * | undo_page, | ||
| bool | update_rseg_history_len, | ||
| ulint | n_added_logs, | ||
| mtr_t * | mtr | ||
| ) |
in: mtr
in: mtr
Removes the update undo log segment from the rseg slot if it is too big for reuse.
| trx | in: transaction |
| undo_ptr | in/out: update undo log. |
| undo_page | in: update undo log header page, x-latched |
| update_rseg_history_len | in: if true: update rseg history len else skip updating it. |
| n_added_logs | in: number of logs added |
| mtr | in: mtr |
|
inlinestatic |
Calculates the file address of an undo log header when we have the file address of its history list node.
| void trx_purge_run | ( | ) |
Resume purge, move to PURGE_STATE_RUN.
| purge_state_t trx_purge_state | ( | void | ) |
Get the purge state.
| void trx_purge_stop | ( | void | ) |
Stop purge and wait for it to stop, move to PURGE_STATE_STOP.
| void trx_purge_sys_close | ( | void | ) |
Frees the global purge system control structure.
| void trx_purge_sys_initialize | ( | uint32_t | n_purge_threads, |
| purge_pq_t * | purge_queue | ||
| ) |
Creates the global purge system control structure and inits the history mutex.
| [in] | n_purge_threads | number of purge threads |
| [in,out] | purge_queue | UNDO log min binary heap |
| void trx_purge_sys_mem_create | ( | ) |
Initialize in-memory purge structures.
|
extern |
The global data structure coordinating a purge.