MySQL 8.4.3
Source Code Documentation
|
Session Temporary tablespace. More...
#include <srv0tmp.h>
Public Member Functions | |
Tablespace () | |
Session Temporary tablespace. More... | |
~Tablespace () | |
dberr_t | create () |
Create the .IBT file with pattern "temp_*.ibt". More... | |
bool | close () const |
Close the .ibt file. More... | |
bool | truncate () |
Truncate the tablespace. More... | |
bool | operator== (const Tablespace &other) |
comparator for two tablespace objects More... | |
space_id_t | space_id () const |
void | set_thread_id_and_purpose (my_thread_id thread_id, enum tbsp_purpose purpose) |
Set the thread id of the thread and the purpose of using the tablespace. More... | |
void | reset_thread_id_and_purpose () |
Reset the thread id while returning the tablespace to the pool. More... | |
my_thread_id | thread_id () const |
enum tbsp_purpose | purpose () const |
std::string | path () const |
Private Member Functions | |
uint32_t | file_id () const |
The id used for name on disk temp_1.ibt, temp_2.ibt, etc. More... | |
std::string | file_name () const |
Private Attributes | |
const space_id_t | m_space_id |
space_id of the current tablespace More... | |
bool | m_inited |
True only after .ibt file is created. More... | |
my_thread_id | m_thread_id |
Tablespace belongs to this Session id More... | |
enum tbsp_purpose | m_purpose |
Purpose for this tablespace. More... | |
Static Private Attributes | |
static space_id_t | m_last_used_space_id = dict_sys_t::s_min_temp_space_id |
Next available space_id for tablespace. More... | |
Session Temporary tablespace.
Tablespace::Tablespace | ( | ) |
Session Temporary tablespace.
Tablespace::~Tablespace | ( | ) |
bool Tablespace::close | ( | void | ) | const |
Close the .ibt file.
Doesn't delete the tablespace
dberr_t Tablespace::create | ( | ) |
Create the .IBT file with pattern "temp_*.ibt".
|
private |
The id used for name on disk temp_1.ibt, temp_2.ibt, etc.
|
private |
|
inline |
comparator for two tablespace objects
std::string Tablespace::path | ( | ) | const |
|
inline |
|
inline |
Reset the thread id while returning the tablespace to the pool.
|
inline |
Set the thread id of the thread and the purpose of using the tablespace.
[in] | thread_id | thread id of the thread requesting the tablespace |
[in] | purpose | purpose for requesting the tablespace |
|
inline |
|
inline |
bool Tablespace::truncate | ( | void | ) |
Truncate the tablespace.
|
private |
True only after .ibt file is created.
|
staticprivate |
Next available space_id for tablespace.
Space_ids for Session temporary tablespace.
These are hardcoded space_ids at higher range
The available range is from dict_sys_t::s_min_temp_space_id to dict_sys_t::s_max_temp_space_id. Total 400K space_ids are reserved for session temporary tablespaces.
|
private |
Purpose for this tablespace.
|
private |
space_id of the current tablespace
|
private |
Tablespace belongs to this Session id