MySQL 8.4.2
Source Code Documentation
|
List of undo tablespaces, each containing a list of rollback segments. More...
#include <trx0purge.h>
Public Member Functions | |
Tablespaces () | |
~Tablespaces () | |
void | init () |
Initialize. More... | |
void | deinit () |
De-initialize. More... | |
void | clear () |
Clear the contents of the list of Tablespace objects. More... | |
ulint | size () |
Get the number of tablespaces tracked by this object. More... | |
bool | empty () |
See if the list of tablespaces is empty. More... | |
Tablespace * | at (size_t pos) |
Get the Tablespace tracked at a position. More... | |
void | add (Tablespace &ref_undo_space) |
Add a new undo::Tablespace to the back of the vector. More... | |
void | drop (Tablespace *undo_space) |
Drop an existing explicit undo::Tablespace. More... | |
void | drop (Tablespace &ref_undo_space) |
Drop an existing explicit undo::Tablespace. More... | |
bool | contains (space_id_t num) |
Check if the given space_id is in the vector. More... | |
Tablespace * | find (space_id_t num) |
Find the given space_num in the vector. More... | |
Tablespace * | find_first_inactive_explicit (size_t *num_active) |
Find the first undo space that is marked inactive explicitly. More... | |
bool | own_latch () |
Determine if this thread owns a lock on m_latch. More... | |
void | s_lock () |
Get a shared lock on m_spaces. More... | |
void | s_unlock () |
Release a shared lock on m_spaces. More... | |
void | x_lock () |
Get an exclusive lock on m_spaces. More... | |
void | x_unlock () |
Release an exclusive lock on m_spaces. More... | |
Public Attributes | |
Tablespaces_Vector | m_spaces |
Private Types | |
using | Tablespaces_Vector = std::vector< Tablespace *, ut::allocator< Tablespace * > > |
Private Attributes | |
rw_lock_t * | m_latch |
RW lock to protect m_spaces. More... | |
List of undo tablespaces, each containing a list of rollback segments.
|
private |
|
inline |
|
inline |
void undo::Tablespaces::add | ( | Tablespace & | ref_undo_space | ) |
Add a new undo::Tablespace to the back of the vector.
Add a new space_id to the back of the vector.
The vector has been pre-allocated to 128 so read threads will not loose what is pointed to. If tablespace_name and file_name are standard names, they are optional.
[in] | ref_undo_space | undo tablespace |
|
inline |
Get the Tablespace tracked at a position.
|
inline |
Clear the contents of the list of Tablespace objects.
This does not deallocate any memory.
|
inline |
Check if the given space_id is in the vector.
[in] | num | undo tablespace number |
void undo::Tablespaces::deinit | ( | void | ) |
De-initialize.
De-initialize the undo::Tablespaces object.
void undo::Tablespaces::drop | ( | Tablespace & | ref_undo_space | ) |
Drop an existing explicit undo::Tablespace.
[in] | ref_undo_space | reference to undo space |
void undo::Tablespaces::drop | ( | Tablespace * | undo_space | ) |
Drop an existing explicit undo::Tablespace.
[in] | undo_space | pointer to undo space |
|
inline |
See if the list of tablespaces is empty.
|
inline |
Find the given space_num in the vector.
[in] | num | undo tablespace number |
|
inline |
Find the first undo space that is marked inactive explicitly.
[in,out] | num_active | If there are no inactive_explicit spaces found, this will contain the number of active spaces found. |
void undo::Tablespaces::init | ( | void | ) |
Initialize.
Initialize the undo::Tablespaces object.
Fix the size of the vector so that it will not do allocations for inserts. This way the contents can be read without using a latch.
|
inline |
Determine if this thread owns a lock on m_latch.
|
inline |
Get a shared lock on m_spaces.
|
inline |
Release a shared lock on m_spaces.
|
inline |
Get the number of tablespaces tracked by this object.
|
inline |
Get an exclusive lock on m_spaces.
|
inline |
Release an exclusive lock on m_spaces.
|
private |
RW lock to protect m_spaces.
x for adding elements, s for scanning, size() etc.
Tablespaces_Vector undo::Tablespaces::m_spaces |