MySQL 9.1.0
Source Code Documentation
log0pfs.cc File Reference
#include <cassert>
#include <memory>
#include <mysql/components/services/pfs_plugin_table_service.h>
#include <mysql/components/services/registry.h>
#include <mysql/service_plugin_registry.h>
#include "log0chkp.h"
#include "log0files_dict.h"
#include "log0files_io.h"
#include "log0log.h"
#include "log0pfs.h"
#include "log0sys.h"
#include "ut0mutex.h"
#include "sql/auto_thd.h"
#include "sql/pfs_priv_util.h"
#include "sql/sql_plugin.h"
#include "sql/table.h"
#include "sql/thd_raii.h"
#include "sql/dd/cache/dictionary_client.h"

Classes

class  Log_files_pfs_table
 PFS table with metadata of redo log files. More...
 
struct  Log_files_pfs_table::Row
 Used to store data of a single row in the table. More...
 
class  Log_files_pfs_table_share_proxy
 PFS table handle which is used to create multiple instances for concurrent queries. More...
 

Functions

template<typename T >
static bool acquire_service (const mysql_service_registry_t *reg_srv, T *service, const char *name)
 
template<typename T >
static void release_service (const mysql_service_registry_t *reg_srv, T **service)
 
void pfs_sdi_enable ()
 
void pfs_sdi_disable ()
 
static bool log_pfs_should_create_tables ()
 
bool log_pfs_create_tables ()
 Create redo log PFS tables. More...
 
void log_pfs_delete_tables ()
 
bool log_pfs_acquire_services (const mysql_service_registry_t *reg_srv)
 Acquire services required for redo log PFS tables. More...
 
void log_pfs_release_services (const mysql_service_registry_t *reg_srv)
 Release services that have been acquired for redo log PFS tables. More...
 

Variables

mysql_service_pfs_plugin_table_v1_tpfs_table {}
 
mysql_service_pfs_plugin_column_tiny_v1_tpfs_col_tinyint {}
 
mysql_service_pfs_plugin_column_integer_v1_tpfs_col_integer {}
 
mysql_service_pfs_plugin_column_bigint_v1_tpfs_col_bigint {}
 
mysql_service_pfs_plugin_column_string_v2_tpfs_col_string {}
 
static bool pfs_initialized {false}
 
static bool pfs_tables_created {false}
 
static constexpr const char * SVC_PFS_TABLE = "pfs_plugin_table_v1"
 
static constexpr const char * SVC_PFS_COLUMN_TINYINT
 
static constexpr const char * SVC_PFS_COLUMN_INTEGER
 
static constexpr const char * SVC_PFS_COLUMN_BIGINT
 
static constexpr const char * SVC_PFS_COLUMN_STRING
 
static Log_files_pfs_table_share_proxy pfs_table_share_proxy
 

Function Documentation

◆ acquire_service()

template<typename T >
static bool acquire_service ( const mysql_service_registry_t reg_srv,
T *  service,
const char *  name 
)
static

◆ log_pfs_acquire_services()

bool log_pfs_acquire_services ( const mysql_service_registry_t reg_srv)

Acquire services required for redo log PFS tables.

Parameters
[in,out]reg_srvregistry which allows to acquire services
Return values
truesuccess
falseerror

◆ log_pfs_create_tables()

bool log_pfs_create_tables ( )

Create redo log PFS tables.

Note that log_pfs_acquire_services() had to be called prior to calling this function. If the log_pfs_acquire_services() failed, then a call to this function is still allowed, but it will report an error then.

Remarks
When srv_read_only_mode is true, this function reports success, but does not create any tables.
Return values
truesuccess
falseerror

◆ log_pfs_delete_tables()

void log_pfs_delete_tables ( )

◆ log_pfs_release_services()

void log_pfs_release_services ( const mysql_service_registry_t reg_srv)

Release services that have been acquired for redo log PFS tables.

Parameters
[in,out]reg_srvregistry which was used to acquire the services

◆ log_pfs_should_create_tables()

static bool log_pfs_should_create_tables ( )
static

◆ pfs_sdi_disable()

void pfs_sdi_disable ( )

◆ pfs_sdi_enable()

void pfs_sdi_enable ( )

◆ release_service()

template<typename T >
static void release_service ( const mysql_service_registry_t reg_srv,
T **  service 
)
static

Variable Documentation

◆ pfs_col_bigint

◆ pfs_col_integer

◆ pfs_col_string

◆ pfs_col_tinyint

◆ pfs_initialized

bool pfs_initialized {false}
static

◆ pfs_table

◆ pfs_table_share_proxy

Log_files_pfs_table_share_proxy pfs_table_share_proxy
static

◆ pfs_tables_created

bool pfs_tables_created {false}
static

◆ SVC_PFS_COLUMN_BIGINT

constexpr const char* SVC_PFS_COLUMN_BIGINT
staticconstexpr
Initial value:
=
"pfs_plugin_column_bigint_v1"

◆ SVC_PFS_COLUMN_INTEGER

constexpr const char* SVC_PFS_COLUMN_INTEGER
staticconstexpr
Initial value:
=
"pfs_plugin_column_integer_v1"

◆ SVC_PFS_COLUMN_STRING

constexpr const char* SVC_PFS_COLUMN_STRING
staticconstexpr
Initial value:
=
"pfs_plugin_column_string_v2"

◆ SVC_PFS_COLUMN_TINYINT

constexpr const char* SVC_PFS_COLUMN_TINYINT
staticconstexpr
Initial value:
=
"pfs_plugin_column_tiny_v1"

◆ SVC_PFS_TABLE

constexpr const char* SVC_PFS_TABLE = "pfs_plugin_table_v1"
staticconstexpr