![]() |
MySQL 26.7.0
Source Code Documentation
|
Manages low-level storage for Tablespaces. More...
#include <fil0tablespaces_nodes_interface.h>
Classes | |
| struct | Capabilities |
| struct | Create_node_hints |
| struct | Node_hints |
| struct | Node_info |
| Stored general information about the storage node at the time of calling the get_node_info(). More... | |
Public Types | |
| enum class | Status { SUCCESS = 0 , IO_ERROR } |
| enum class | Create_error { NODE_EXISTS = 1 , FILE_NAME_TOO_LONG , OUT_OF_DISK_SPACE , IO_ERROR , UNSUPPORTED } |
| enum class | Open_error { NODE_DOES_NOT_EXIST = 1 , NO_ACCESS_PERMISSIONS , IO_ERROR } |
| enum class | Node_error { NODE_DOES_NOT_EXIST , NOT_A_NODE , IO_ERROR } |
| Errors that can be returned while getting information about a node. More... | |
| using | Tablespace_id = uint32_t |
| Type used for giving the tablespaces unique number. More... | |
Public Member Functions | |
| virtual | ~Tablespaces_nodes_interface ()=default |
| Performs any clean up. More... | |
| virtual Capabilities | get_capabilities ()=0 |
| Query the capabilities of the Page Service implementation. More... | |
| virtual ut::Expected< ut::unique_ptr< Tablespace_node_handle_interface >, Create_error > | create (Tablespace_id space_id, size_t node_order, const Create_node_hints &hints, uint32_t flags, page_no_t size_in_pages)=0 |
| Creates a low-level storage for a new tablespace node. More... | |
| virtual ut::Expected< ut::unique_ptr< Tablespace_node_handle_interface >, Open_error > | open (Tablespace_id space_id, size_t node_order, const Node_hints &hints, size_t page_size, bool for_read_only)=0 |
Opens an existing tablespace's node storage by path, so it is ready to read and write pages, flush and extend the tablespace node. More... | |
| virtual Status | rename (space_id_t space_id, size_t node_order, const std::string &old_path, const std::string &new_path)=0 |
| Rename a tablespace file. More... | |
| virtual Status | remove (Tablespace_id space_id, size_t node_order, const Node_hints &hints)=0 |
Deletes a specified tablespace's node storage by path. More... | |
| virtual ut::Expected< Node_info, Node_error > | get_node_info (Tablespace_id space_id, size_t node_order, const Node_hints &hints, size_t page_size)=0 |
| Gets basic information about the node specified, this includes its size (first page offset that is not available for reading and writing) and minimum block size for usage in transparent page compression. More... | |
Manages low-level storage for Tablespaces.
| using ib::fil::Tablespaces_nodes_interface::Tablespace_id = uint32_t |
Type used for giving the tablespaces unique number.
|
strong |
|
strong |
Errors that can be returned while getting information about a node.
|
strong |
|
strong |
|
virtualdefault |
Performs any clean up.
|
pure virtual |
Creates a low-level storage for a new tablespace node.
if storage 'path' already exists, it returns error TABLESPACE_EXISTS. To be used in fil_create_tablespace().
| [in] | space_id | Tablespace ID to create the node's storage for. |
| [in] | node_order | Number of the node in the tablespace. |
| [in] | hints | Additional information that may be useful for creating the node's storage. |
| [in] | flags | Tablespace flags |
| [in] | size_in_pages | Initial size of the tablespace node in pages, must be >= FIL_IBD_FILE_INITIAL_SIZE |
Implemented in ib::fil::Tablespaces_nodes.
|
pure virtual |
Query the capabilities of the Page Service implementation.
This function can be called even before start().
Implemented in ib::fil::Tablespaces_nodes.
|
pure virtual |
Gets basic information about the node specified, this includes its size (first page offset that is not available for reading and writing) and minimum block size for usage in transparent page compression.
If Node_hints::m_check_permissions is true, currently available access modes are also checked; otherwise Node_info::access_permissions is not reliable. The node may not exist, or the path specified may lead to a non-file object or the operation may encounter any other problem in which case a suitable Node_error will be returned.
| [in] | space_id | Tablespace ID. It can be SPACE_UNKNOWN to check if the path specified in hints exists and get all info but the size of node in pages. |
| [in] | node_order | Number of the node in the tablespace. |
| [in] | hints | Additional information that may be useful for querying the node's storage. |
| [in] | page_size | Physical page size used in the tablespace, must match one specified when creating the tablespace. However, if the space_id is SPACE_UNKNOWN or we are not interested in the node size, a value of 0 can be specified. In such case, the returned Node_info::size will be 0. |
Implemented in ib::fil::Tablespaces_nodes.
|
pure virtual |
Opens an existing tablespace's node storage by path, so it is ready to read and write pages, flush and extend the tablespace node.
The tablespace must not be opened at the time of this call. To be used in fil_node_t::open().
| [in] | space_id | Tablespace ID to open the node's storage for. |
| [in] | node_order | Number of the node in the tablespace. |
| [in] | hints | Additional information that may be useful for opening the node's storage. |
| [in] | page_size | Physical page size used in the tablespace, must match one specified when creating the tablespace. |
| [in] | for_read_only | True if the storage should be opened for read-only access. |
Implemented in ib::fil::Tablespaces_nodes.
|
pure virtual |
Deletes a specified tablespace's node storage by path.
To be used in Fil_shard::space_delete().
| [in] | space_id | Tablespace ID |
| [in] | node_order | Number of the node in the tablespace. |
| [in] | hints | Additional information that may be useful for removing the node's storage. |
Implemented in ib::fil::Tablespaces_nodes.
|
pure virtual |
Rename a tablespace file.
| [in] | space_id | tablespace_id |
| [in] | node_order | Number of the node in the tablespace. |
| [in] | old_path | old name of the file |
| [in] | new_path | new name of the file |
Implemented in ib::fil::Tablespaces_nodes.