MySQL 9.1.0
Source Code Documentation
Get_system_variable Class Reference

#include <get_system_variable.h>

Inheritance diagram for Get_system_variable:
[legend]

Public Member Functions

 Get_system_variable ()=default
 
 ~Get_system_variable () override=default
 
int get_global_gtid_executed (std::string &gtid_executed)
 Method to return the server gtid_executed by executing the get_variables component service. More...
 
int get_global_gtid_purged (std::string &gtid_purged)
 Method to return the server gtid_purged by executing the get_variables component service. More...
 
int get_global_read_only (bool &value)
 Method to return the global value of read_only by executing the get_variables component service. More...
 
int get_global_super_read_only (bool &value)
 Method to return the global value of super_read_only by executing the get_variables component service. More...
 
void run (Mysql_thread_body_parameters *parameters) override
 Method that will be run on mysql_thread. More...
 

Private Member Functions

bool string_to_bool (const std::string &value)
 Method to convert a string into a boolean. More...
 
int internal_get_system_variable (std::string variable, std::string &value, size_t value_max_length)
 Method to return the server system variable specified on variable. More...
 
- Private Member Functions inherited from Mysql_thread_body
virtual ~Mysql_thread_body ()
 

Constructor & Destructor Documentation

◆ Get_system_variable()

Get_system_variable::Get_system_variable ( )
default

◆ ~Get_system_variable()

Get_system_variable::~Get_system_variable ( )
overridedefault

Member Function Documentation

◆ get_global_gtid_executed()

int Get_system_variable::get_global_gtid_executed ( std::string &  gtid_executed)

Method to return the server gtid_executed by executing the get_variables component service.

Parameters
[out]gtid_executedThe string where the result will be appended
Returns
the error value returned
Return values
0OK
!=0Error

◆ get_global_gtid_purged()

int Get_system_variable::get_global_gtid_purged ( std::string &  gtid_purged)

Method to return the server gtid_purged by executing the get_variables component service.

Parameters
[out]gtid_purgedThe string where the result will be appended
Returns
the error value returned
Return values
0OK
!=0Error

◆ get_global_read_only()

int Get_system_variable::get_global_read_only ( bool &  value)

Method to return the global value of read_only by executing the get_variables component service.

Parameters
[out]valueThe variable where the value will be set
Returns
the error value returned
Return values
0OK
!=0Error

◆ get_global_super_read_only()

int Get_system_variable::get_global_super_read_only ( bool &  value)

Method to return the global value of super_read_only by executing the get_variables component service.

Parameters
[out]valueThe variable where the value will be set
Returns
the error value returned
Return values
0OK
!=0Error

◆ internal_get_system_variable()

int Get_system_variable::internal_get_system_variable ( std::string  variable,
std::string &  value,
size_t  value_max_length 
)
private

Method to return the server system variable specified on variable.

Parameters
[in]variableThe system variable name to be retrieved
[out]valueThe string where the result will be set
[in]value_max_lengthThe maximum string value length
Returns
the error value returned
Return values
0OK
!=0Error

◆ run()

void Get_system_variable::run ( Mysql_thread_body_parameters parameters)
overridevirtual

Method that will be run on mysql_thread.

Parameters
[in,out]parametersValues used by method to get service variable.

Implements Mysql_thread_body.

◆ string_to_bool()

bool Get_system_variable::string_to_bool ( const std::string &  value)
private

Method to convert a string into a boolean.

Parameters
[in]valueThe value as string.
Returns
the value as boolean
Return values
truestring value is "ON"
falseotherwise

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