![]() |
MySQL 26.7.0
Source Code Documentation
|
A bank of UNDO space ids which is a lock free repository for information about the space IDs used for undo tablespaces. More...
Classes | |
| struct | Space_id_account |
| The currently used undo space IDs for an undo space along with a boolean showing whether the undo space number is in use. More... | |
Public Member Functions | |
| Space_id_bank () | |
| ~Space_id_bank () | |
| void | use_space_id (space_id_t space_id) |
| Note that the undo space number for a space ID is being used. More... | |
| void | unuse_space_id (space_id_t space_id) |
| Mark an undo number associated with a given space_id as unused and available to be reused. More... | |
| space_id_t | use_next_space_id (space_id_t space_num) |
| Mark that the given undo space number is being used and return the next available space_id for that space number. More... | |
| space_id_t | next_space_id (space_id_t space_id, space_id_t space_num) |
| Given a valid undo space_id or SPACE_UNKNOWN, return the next space_id for the given space number. More... | |
| space_id_t | next_space_id (space_id_t space_id) |
| Given a valid undo space_id, return the next space_id for that space number. More... | |
| space_id_t | get_next_available_space_id () |
| Return the next available undo space ID to be used for a new explicit undo tablespaces. More... | |
| bool | check_space_id_in_use (space_id_t space_num) |
| Check if the space_id mapped to space_num is in use. More... | |
| space_id_t | get_current_space_id_for_num (space_id_t space_num) |
| Return the current space id mapped to the space_num. More... | |
Private Attributes | |
| Space_id_account | m_accounts [FSP_MAX_UNDO_TABLESPACES] |
A bank of UNDO space ids which is a lock free repository for information about the space IDs used for undo tablespaces.
It is used during creation in order to assign an unused space number and during truncation in order to assign the next space_id within that space_number range.
It is initialized with the minimum value in the range so that if a new space ID is needed in that range the max space ID will be used first. As truncation occurs, the space_ids are assigned from max down to min.
|
inline |
|
inline |
|
inline |
Check if the space_id mapped to space_num is in use.
| [in] | space_num | undo tablespace number |
|
inline |
Return the current space id mapped to the space_num.
| [in] | space_num | undo tablespace number |
| space_id_t undo_truncate::Space_id_bank::get_next_available_space_id | ( | ) |
Return the next available undo space ID to be used for a new explicit undo tablespaces.
The slot will be marked as in-use.
| space_id_t undo_truncate::Space_id_bank::next_space_id | ( | space_id_t | space_id | ) |
Given a valid undo space_id, return the next space_id for that space number.
| [in] | space_id | undo tablespace ID |
| space_id_t undo_truncate::Space_id_bank::next_space_id | ( | space_id_t | space_id, |
| space_id_t | space_num | ||
| ) |
Given a valid undo space_id or SPACE_UNKNOWN, return the next space_id for the given space number.
| [in] | space_id | undo tablespace ID |
| [in] | space_num | undo tablespace number |
| void undo_truncate::Space_id_bank::unuse_space_id | ( | space_id_t | space_id | ) |
Mark an undo number associated with a given space_id as unused and available to be reused.
This happens when the fil_space_t is closed associated with a drop undo tablespace.
| [in] | space_id | Undo Tablespace ID |
| space_id_t undo_truncate::Space_id_bank::use_next_space_id | ( | space_id_t | space_num | ) |
Mark that the given undo space number is being used and return the next available space_id for that space number.
| [in] | space_num | undo tablespace number |
| void undo_truncate::Space_id_bank::use_space_id | ( | space_id_t | space_id | ) |
Note that the undo space number for a space ID is being used.
Put that space_id into the space_id_bank.
| [in] | space_id | undo tablespace number |
|
private |