![]() |
MySQL 26.7.0
Source Code Documentation
|
Classes | |
| class | Inject_failure_once |
| Inject a failure in the undo truncation debug compiled code at various places so that it fails the first time it hits and succeeds after that. More... | |
| class | Space_id_bank |
| A bank of UNDO space ids which is a lock free repository for information about the space IDs used for undo tablespaces. More... | |
| struct | Tablespace |
| An undo_truncate::Tablespace object is used to easily convert between undo_space_id and undo_space_num and to create the automatic file_name and space name. More... | |
| class | Tablespaces |
| List of undo tablespaces, each containing a list of rollback segments. More... | |
| class | Truncate |
| Track an UNDO tablespace marked for truncate. More... | |
| class | Undo_num2id_map |
| Map from undo tablespace number to space id to allow a reserved undo space ID to be found quickly. More... | |
Functions | |
| bool | is_active_truncate_log_present (space_id_t space_num) |
| Check if TRUNCATE_DDL_LOG file exist. More... | |
| void | remove_truncate_log_file (space_id_t space_num) |
| Remove TRUNCATE_DDL_LOG file if it exists. More... | |
| char * | make_space_name (space_id_t space_id) |
| Build a standard undo tablespace name from a space_id. More... | |
| char * | make_file_name (space_id_t space_id) |
| Build a standard undo tablespace file name from a space_id. More... | |
| bool | is_reserved (space_id_t space_id) |
| Check if the space_id is an undo space ID in the reserved range. More... | |
| space_id_t | num2id (space_id_t space_num, size_t ndx) |
| Convert an undo space number (from 1 to 127) into the undo space_id, given an index indicating which space_id from the pool assigned to that undo number. More... | |
| space_id_t | num2id (space_id_t space_num) |
| Convert an undo space number (from 1 to 127) into an undo space_id. More... | |
| space_id_t | id2num (space_id_t space_id) |
| Get the corresponding UNDO space number for a given UNDO space id. More... | |
| space_id_t | id2next_id (space_id_t space_id) |
| void | set_active (space_id_t space_id) |
| Set an undo tablespace active. More... | |
| void | use_space_id (space_id_t space_id) |
| Note that the undo space number for a space ID is being used. 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) |
| Given a valid undo space_id, return the next 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... | |
| 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 | get_next_available_space_id () |
| Return the next available undo space ID to be used for a new explicit undo tablespaces. More... | |
| void | mark_undo_tablespace_unusable (space_id_t space_id, mtr_t *mtr) |
| Set the FSP_FLAGS_MASK_UNDO_UNUSABLE flag in the undo tablespace header to indicate that the undo file is not usable. More... | |
| void | mark_undo_tablespace_usable (space_id_t space_id, mtr_t *mtr) |
| Unset the FSP_FLAGS_MASK_UNDO_UNUSABLE in the undo tablespace header to indicate that the undo file is now usable. More... | |
| void | inject_crash (const char *injection_point_name) |
| Inject a crash if a certain SET GLOBAL DEBUG has been set. More... | |
Variables | |
| static constexpr char | s_log_prefix [] = "undo_" |
| Truncate Log file Prefix. More... | |
| static constexpr char | s_log_ext [] = "trunc.log" |
| Truncate Log file Extension. More... | |
| ib_mutex_t | ddl_mutex |
| Mutex for serializing undo tablespace related DDL. More... | |
| ut::unique_ptr< Undo_num2id_map > | num2id_map |
| Tablespaces * | spaces |
| A global object that contains a vector of undo_truncate::Tablespace structs. More... | |
| constexpr ulint | TRUNCATE_FREQUENCY = 128 |
| static Space_id_bank | space_id_bank |
| space_id_t undo_truncate::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::id2next_id | ( | space_id_t | space_id | ) |
| space_id_t undo_truncate::id2num | ( | space_id_t | space_id | ) |
Get the corresponding UNDO space number for a given UNDO space id.
| [in] | space_id | undo tablespace ID |
| void undo_truncate::inject_crash | ( | const char * | injection_point_name | ) |
Inject a crash if a certain SET GLOBAL DEBUG has been set.
Before DBUG_SUICIDE(), write an entry about this crash to the error log and flush the redo log.
| bool undo_truncate::is_active_truncate_log_present | ( | space_id_t | space_num | ) |
Check if TRUNCATE_DDL_LOG file exist.
| [in] | space_num | undo tablespace number |
|
inline |
Check if the space_id is an undo space ID in the reserved range.
| [in] | space_id | undo tablespace ID |
| char * undo_truncate::make_file_name | ( | space_id_t | space_id | ) |
Build a standard undo tablespace file name from a space_id.
This will create a name like 'undo_001' if the space_id is in the reserved range, else it will be like 'undo001'. This caller is responsible for freeing the returned value using ut::free
| [in] | space_id | id of the undo tablespace. |
| char * undo_truncate::make_space_name | ( | space_id_t | space_id | ) |
Build a standard undo tablespace name from a space_id.
This caller is responsible for freeing the returned value using ut::free
| [in] | space_id | id of the undo tablespace. |
| void undo_truncate::mark_undo_tablespace_unusable | ( | space_id_t | space_id, |
| mtr_t * | mtr | ||
| ) |
Set the FSP_FLAGS_MASK_UNDO_UNUSABLE flag in the undo tablespace header to indicate that the undo file is not usable.
This is mainly done during the truncate operation of undo tablespace.
| [in] | space_id | undo tablespace id |
| [in] | mtr | Mini-transaction |
| void undo_truncate::mark_undo_tablespace_usable | ( | space_id_t | space_id, |
| mtr_t * | mtr | ||
| ) |
Unset the FSP_FLAGS_MASK_UNDO_UNUSABLE in the undo tablespace header to indicate that the undo file is now usable.
| [in] | space_id | undo tablespace id |
| [in] | mtr | Mini-transaction |
| space_id_t undo_truncate::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::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 |
| space_id_t undo_truncate::num2id | ( | space_id_t | space_num | ) |
Convert an undo space number (from 1 to 127) into an undo space_id.
Use the undo_truncate::space_id_bank to return the current space_id assigned to that undo number.
| [in] | space_num | undo tablespace number |
| space_id_t undo_truncate::num2id | ( | space_id_t | space_num, |
| size_t | ndx | ||
| ) |
Convert an undo space number (from 1 to 127) into the undo space_id, given an index indicating which space_id from the pool assigned to that undo number.
| [in] | space_num | undo tablespace number |
| [in] | ndx | index of the space_id within that undo number |
| void undo_truncate::remove_truncate_log_file | ( | space_id_t | space_num | ) |
Remove TRUNCATE_DDL_LOG file if it exists.
| [in] | space_num | undo tablespace number |
| void undo_truncate::set_active | ( | space_id_t | space_id | ) |
Set an undo tablespace active.
| void undo_truncate::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::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::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 |
| ib_mutex_t undo_truncate::ddl_mutex |
Mutex for serializing undo tablespace related DDL.
These have to do with creating and dropping undo tablespaces.
| ut::unique_ptr< Undo_num2id_map > undo_truncate::num2id_map |
|
staticconstexpr |
Truncate Log file Extension.
|
staticconstexpr |
Truncate Log file Prefix.
|
static |
| Tablespaces * undo_truncate::spaces |
A global object that contains a vector of undo_truncate::Tablespace structs.
|
constexpr |