MySQL 26.10.0
Source Code Documentation
mrs_component::SystemVars Class Reference

Owns and manages system variables exposed by the MRS component. More...

#include <mrs_component_system_vars.h>

Classes

struct  ConfiguredValues
 

Public Member Functions

 SystemVars ()=default
 
 ~SystemVars ()=default
 
 SystemVars (const SystemVars &)=delete
 
SystemVars & operator= (const SystemVars &)=delete
 
 SystemVars (SystemVars &&)=delete
 
SystemVars & operator= (SystemVars &&)=delete
 
int initialize_all ()
 Initialize the MySQL Rest Service Component system variables. More...
 
int register_all ()
 Register the MySQL Rest Service Component system variables with the server and set the current values in sysvars. More...
 
int unregister_all ()
 Unregister the MySQL Rest Service Component system variables. More...
 
int register_system_var (SysvarBase &sysvar, void *args) const
 Register one system variable. More...
 
int unregister_system_var (SysvarBase &sysvar) const
 Unregister one system variable. More...
 
ConfiguredValues get_configured_values () const
 
void apply_http_limits ()
 

Static Private Member Functions

static int check_http_port (MYSQL_THD, SYS_VAR *, void *new_value, struct st_mysql_value *value)
 Check for a valid http port value. More...
 
static int check_io_worker_threads (MYSQL_THD, SYS_VAR *, void *new_value, struct st_mysql_value *value)
 
static int check_http_max_connections (MYSQL_THD, SYS_VAR *, void *new_value, struct st_mysql_value *value)
 
static int check_http_body_size (MYSQL_THD, SYS_VAR *, void *new_value, struct st_mysql_value *value)
 
static int check_str_var (MYSQL_THD, SYS_VAR *var, void *new_value, struct st_mysql_value *value)
 
static void update_ulong_var (MYSQL_THD, SYS_VAR *, void *val_ptr, const void *checked)
 
static void update_ullong_var (MYSQL_THD, SYS_VAR *, void *val_ptr, const void *checked)
 Update an unsigned long long system variable. More...
 
static void update_string_var (MYSQL_THD, SYS_VAR *, void *val_ptr, const void *checked)
 Update a string system variable. More...
 
static void update_http_max_connections (MYSQL_THD, SYS_VAR *, void *val_ptr, const void *checked)
 
static void update_http_max_request_body_size (MYSQL_THD, SYS_VAR *, void *val_ptr, const void *checked)
 
static void update_http_max_response_body_size (MYSQL_THD, SYS_VAR *, void *val_ptr, const void *checked)
 

Private Attributes

const char * m_sysvar_prefix {"mysql_rest_service"}
 
std::mutex m_values_mutex
 
sv_ulonglong m_http_port_sysvar
 
sv_char m_ssl_cert_sysvar
 
sv_char m_ssl_key_sysvar
 
sv_char m_ssl_cipher_sysvar
 
sv_ulong m_io_worker_threads_sysvar
 
sv_ulong m_http_max_connections_sysvar
 
sv_ulonglong m_http_max_request_body_size_sysvar
 
sv_ulonglong m_http_max_response_body_size_sysvar
 

Detailed Description

Owns and manages system variables exposed by the MRS component.

Constructor & Destructor Documentation

◆ SystemVars() [1/3]

mrs_component::SystemVars::SystemVars ( )
default

◆ ~SystemVars()

mrs_component::SystemVars::~SystemVars ( )
default

◆ SystemVars() [2/3]

mrs_component::SystemVars::SystemVars ( const SystemVars &  )
delete

◆ SystemVars() [3/3]

mrs_component::SystemVars::SystemVars ( SystemVars &&  )
delete

Member Function Documentation

◆ apply_http_limits()

void mrs_component::SystemVars::apply_http_limits ( )

◆ check_http_body_size()

int mrs_component::SystemVars::check_http_body_size ( MYSQL_THD  ,
SYS_VAR *  var,
void *  new_value,
struct st_mysql_value *  value 
)
staticprivate

◆ check_http_max_connections()

int mrs_component::SystemVars::check_http_max_connections ( MYSQL_THD  ,
SYS_VAR *  var,
void *  new_value,
struct st_mysql_value *  value 
)
staticprivate

◆ check_http_port()

int mrs_component::SystemVars::check_http_port ( MYSQL_THD  ,
SYS_VAR *  var,
void *  new_value,
struct st_mysql_value *  value 
)
staticprivate

Check for a valid http port value.

◆ check_io_worker_threads()

int mrs_component::SystemVars::check_io_worker_threads ( MYSQL_THD  ,
SYS_VAR *  var,
void *  new_value,
struct st_mysql_value *  value 
)
staticprivate

◆ check_str_var()

int mrs_component::SystemVars::check_str_var ( MYSQL_THD  ,
SYS_VAR *  var,
void *  new_value,
struct st_mysql_value *  value 
)
staticprivate

◆ get_configured_values()

SystemVars::ConfiguredValues mrs_component::SystemVars::get_configured_values ( ) const

◆ initialize_all()

int mrs_component::SystemVars::initialize_all ( )

Initialize the MySQL Rest Service Component system variables.

◆ operator=() [1/2]

SystemVars & mrs_component::SystemVars::operator= ( const SystemVars &  )
delete

◆ operator=() [2/2]

SystemVars & mrs_component::SystemVars::operator= ( SystemVars &&  )
delete

◆ register_all()

int mrs_component::SystemVars::register_all ( )

Register the MySQL Rest Service Component system variables with the server and set the current values in sysvars.

◆ register_system_var()

int mrs_component::SystemVars::register_system_var ( SysvarBase &  sysvar,
void *  args 
) const

Register one system variable.

The PERSIST_AS_READ_ONLY flag ensures that persisted or otherwise pre-configured system variables are loaded during component initialization

◆ unregister_all()

int mrs_component::SystemVars::unregister_all ( )

Unregister the MySQL Rest Service Component system variables.

◆ unregister_system_var()

int mrs_component::SystemVars::unregister_system_var ( SysvarBase &  sysvar) const

Unregister one system variable.

◆ update_http_max_connections()

void mrs_component::SystemVars::update_http_max_connections ( MYSQL_THD  ,
SYS_VAR *  ,
void *  val_ptr,
const void *  checked 
)
staticprivate

◆ update_http_max_request_body_size()

void mrs_component::SystemVars::update_http_max_request_body_size ( MYSQL_THD  ,
SYS_VAR *  ,
void *  val_ptr,
const void *  checked 
)
staticprivate

◆ update_http_max_response_body_size()

void mrs_component::SystemVars::update_http_max_response_body_size ( MYSQL_THD  ,
SYS_VAR *  ,
void *  val_ptr,
const void *  checked 
)
staticprivate

◆ update_string_var()

void mrs_component::SystemVars::update_string_var ( MYSQL_THD  ,
SYS_VAR *  ,
void *  val_ptr,
const void *  checked 
)
staticprivate

Update a string system variable.

◆ update_ullong_var()

void mrs_component::SystemVars::update_ullong_var ( MYSQL_THD  ,
SYS_VAR *  ,
void *  val_ptr,
const void *  checked 
)
staticprivate

Update an unsigned long long system variable.

◆ update_ulong_var()

void mrs_component::SystemVars::update_ulong_var ( MYSQL_THD  ,
SYS_VAR *  ,
void *  val_ptr,
const void *  checked 
)
staticprivate

Member Data Documentation

◆ m_http_max_connections_sysvar

sv_ulong mrs_component::SystemVars::m_http_max_connections_sysvar
private

◆ m_http_max_request_body_size_sysvar

sv_ulonglong mrs_component::SystemVars::m_http_max_request_body_size_sysvar
private

◆ m_http_max_response_body_size_sysvar

sv_ulonglong mrs_component::SystemVars::m_http_max_response_body_size_sysvar
private

◆ m_http_port_sysvar

sv_ulonglong mrs_component::SystemVars::m_http_port_sysvar
private

◆ m_io_worker_threads_sysvar

sv_ulong mrs_component::SystemVars::m_io_worker_threads_sysvar
private

◆ m_ssl_cert_sysvar

sv_char mrs_component::SystemVars::m_ssl_cert_sysvar
private

◆ m_ssl_cipher_sysvar

sv_char mrs_component::SystemVars::m_ssl_cipher_sysvar
private

◆ m_ssl_key_sysvar

sv_char mrs_component::SystemVars::m_ssl_key_sysvar
private

◆ m_sysvar_prefix

const char* mrs_component::SystemVars::m_sysvar_prefix {"mysql_rest_service"}
private

◆ m_values_mutex

std::mutex mrs_component::SystemVars::m_values_mutex
mutableprivate

The documentation for this class was generated from the following files: