MySQL 9.1.0
Source Code Documentation
|
An implementation of mysql system_variable_reader for the mysql server component. More...
#include <mysql_system_variable_reader_imp.h>
Static Public Member Functions | |
static mysql_service_status_t | get (THD *hthd, const char *variable_type, const char *component_name, const char *variable_name, void **val, size_t *out_length_of_val) noexcept |
Gets the value of a system variable. More... | |
An implementation of mysql system_variable_reader for the mysql server component.
|
staticnoexcept |
Gets the value of a system variable.
Works only for system variables taking integer or compatible values. Passing non-NULL THD means that the operation will be executed within the scope of existing transaction, thus any operation side effects impacting transaction itself (for example it may generate an SQL error that it stores into the current THD). If using existing THD, security context of the thread is checked to make sure that required privileges exist. Passing NULL makes a call to current_thd and gets the GLOBAL value of the variable. Passing NULL with SESSION type will gives error and returns.
hthd | thread session handle. if NULL, the GLOBAL value of the variable is returned. | |
variable_type | one of [GLOBAL, SESSION]. | |
component_name | Name of the component or "mysql_server" for the legacy ones. | |
variable_name | Name of the variable | |
[in,out] | val | On input: a buffer to hold the value. On output a pointer to the value. |
[in,out] | out_length_of_val | On input: the buffer size. On output the length of the data copied. |
false | success |
TRUE | failure, error set. For error info, see THD if supplied. |