![]() |
MySQL 26.7.0
Source Code Documentation
|
Data structure that contains the information about shared tablespaces. More...
#include <fsp0sysspace.h>
Classes | |
| class | Opened_storage_node |
Public Member Functions | |
| SysTablespace (space_id_t space_id, fil_type_t space_type) | |
| void | set_tablespace_full_status (bool is_full) |
| Set tablespace full status. More... | |
| bool | get_tablespace_full_status () |
| Get tablespace full status. More... | |
| bool | parse_params (const char *filepath_spec) |
| Parse the input params and populate member variables. More... | |
| dberr_t | check_file_spec (bool create_new_tablespace, uint64_t min_expected_size, bool supports_raw_devices) |
| Check the data file specification. More... | |
| ulint | can_auto_extend_last_file () const |
| dberr_t | prepare_nodes () |
Open or create the data files, register the tablespace and its nodes in the fil's tablespace registry. More... | |
| ut::Expected< lsn_t > | read_lsn_and_check_flags () |
| Check the tablespace header for this tablespace and read the flush LSN. More... | |
| page_no_t | get_sum_of_new_sizes_in_pages () const |
Public Member Functions inherited from ib::fsp::Tablespace< SysTablespace_node > | |
| Tablespace (space_id_t space_id, fil_type_t space_type) | |
| Tablespace (const Tablespace &)=delete | |
| virtual | ~Tablespace () |
| Tablespace & | operator= (const Tablespace &)=delete |
| const SysTablespace_node & | node (size_t order) const |
| fil_type_t | space_type () const |
| Get tablespace type. More... | |
| void | set_name (const char *name) |
| Set tablespace name. More... | |
| const char * | name () const |
| Get tablespace name. More... | |
| void | set_path (const std::string &path) |
| Set tablespace path. More... | |
| const std::string & | path () const |
| Get tablespace path. More... | |
| void | set_space_id (space_id_t space_id) |
| Set the space id of the tablespace. More... | |
| space_id_t | space_id () const |
| Get the space id of the tablespace. More... | |
| void | set_flags (uint32_t fsp_flags) |
| Set the tablespace flags. More... | |
| uint32_t | flags () const |
| Get the tablespace flags. More... | |
| page_no_t | get_sum_of_expected_sizes_in_pages () const |
| std::vector< size_t > | delete_files () |
| Delete all the data files. More... | |
| bool | intersects (const Tablespace &other_space) |
| Check if two tablespaces have common data file names. More... | |
| void | add_datafile (const char *node_path) |
| Use the ADD DATAFILE path to create a node object and add it to the front of m_nodes. More... | |
| bool | is_read_only () const |
| Determines if the current tablespace should be opened for read-only. More... | |
| size_t | get_nodes_count () const |
| Returns the number of nodes the tablespace contains. More... | |
| std::string | get_node_full_path (size_t node_order=0) const |
| Returns a full path to the node. More... | |
| std::string | get_node_full_path (const Tablespace_node &node) const |
| Returns a full path to the node. More... | |
| void | set_autoextend_size (uint64_t size) |
| uint64_t | get_autoextend_size () const |
Static Public Member Functions | |
| static page_no_t | get_autoextend_increment () |
Private Types | |
| enum class | file_status_t_ { FILE_STATUS_VOID = 0 , FILE_STATUS_RW_PERMISSION_ERROR , FILE_STATUS_READ_WRITE_ERROR , FILE_STATUS_NOT_REGULAR_FILE_ERROR } |
Private Member Functions | |
| ut::Expected< SysTablespace::Opened_storage_node > | create_node (SysTablespace_node &node) |
| Create storage for the specified data node. More... | |
| ut::Expected< SysTablespace::Opened_storage_node > | open_node (const SysTablespace_node &node) |
| Open storage of the specified data node. More... | |
| page_no_t | parse_suffixed_page_count (char *&ptr) |
| Convert a numeric string representing a number of bytes optionally ending in upper or lower case G, M, or K, to a number of megabytes, rounding down to the nearest megabyte. More... | |
| dberr_t | check_size (SysTablespace_node &node, const ib::fil::Tablespaces_nodes_interface::Node_info &node_info) |
| Verify the size of the node storage. More... | |
Static Private Member Functions | |
| static char * | parse_file_name (char *ptr) |
Private Attributes | |
| bool | m_auto_extend_last_file {} |
| if true, then we auto-extend the last data file More... | |
| page_no_t | m_last_file_size_in_pages_max {} |
| if != 0, this tells the max size auto-extending may increase the last data file size More... | |
| bool | m_is_tablespace_full {} |
| Tablespace full status. More... | |
| page_no_t | m_sum_of_new_sizes_in_pages {} |
| Sum of sizes of all nodes, in pages, that had the storage created during this instance lifetime. More... | |
Additional Inherited Members | |
Protected Attributes inherited from ib::fsp::Tablespace< SysTablespace_node > | |
| ut::vector< SysTablespace_node > | m_nodes |
| Data nodes information used in this tablespace, in the correct order. More... | |
Data structure that contains the information about shared tablespaces.
Currently this can be the system tablespace or a temporary table tablespace
|
strongprivate |
|
inline |
|
inline |
| dberr_t ib::fsp::SysTablespace::check_file_spec | ( | bool | create_new_tablespace, |
| uint64_t | min_expected_size, | ||
| bool | supports_raw_devices | ||
| ) |
Check the data file specification.
| [in] | create_new_tablespace | True if a new tablespace is to be created |
| [in] | min_expected_size | Minimum expected tablespace size in bytes |
| [in] | supports_raw_devices | True if the tablespace supports raw devices. |
|
private |
Verify the size of the node storage.
| [in] | node | data node object |
| [in] | node_info | Information about the node storage specified. |
|
private |
Create storage for the specified data node.
| [in,out] | node | data node object. May change value of the m_node_storage_exists member. |
|
inlinestatic |
|
inline |
|
inline |
Get tablespace full status.
|
private |
Open storage of the specified data node.
| [in] | node | data node object |
|
staticprivate |
| bool ib::fsp::SysTablespace::parse_params | ( | const char * | filepath_spec | ) |
Parse the input params and populate member variables.
| [in] | filepath_spec | path to data files |
|
private |
Convert a numeric string representing a number of bytes optionally ending in upper or lower case G, M, or K, to a number of megabytes, rounding down to the nearest megabyte.
Then return the number of pages in the file.
| [in,out] | ptr | Pointer to a numeric string |
| dberr_t ib::fsp::SysTablespace::prepare_nodes | ( | ) |
Open or create the data files, register the tablespace and its nodes in the fil's tablespace registry.
| ut::Expected< lsn_t > ib::fsp::SysTablespace::read_lsn_and_check_flags | ( | ) |
Check the tablespace header for this tablespace and read the flush LSN.
TODO: Enable following after WL#11063-related comment in fsp_header_validate() is fixed. const auto server_version = fsp_header_get_server_version(page.get()); const auto space_version = fsp_header_get_space_version(page.get());
|
inline |
Set tablespace full status.
| [in] | is_full | true if full |
|
private |
if true, then we auto-extend the last data file
|
private |
Tablespace full status.
|
private |
if != 0, this tells the max size auto-extending may increase the last data file size
|
private |
Sum of sizes of all nodes, in pages, that had the storage created during this instance lifetime.