MySQL 8.0.40
Source Code Documentation
mysql_system_variable_update_imp Class Reference

An implementation of mysql system_variable_update_string, system_variable_update_integer and system_variable_update_default services for the mysql server component. More...

#include <mysql_system_variable_update_imp.h>

Static Public Member Functions

static mysql_service_status_t set_string (MYSQL_THD hthd, const char *variable_type, my_h_string variable_base, my_h_string variable_name, my_h_string variable_value) noexcept
 Implementation for the mysql_service_mysql_system_variable_update_string_t service. More...
 
static mysql_service_status_t set_signed (MYSQL_THD hthd, const char *variable_type, my_h_string variable_base, my_h_string variable_name, long long variable_value) noexcept
 Sets the value of a system variable to a new signed integer value. More...
 
static mysql_service_status_t set_unsigned (MYSQL_THD hthd, const char *variable_type, my_h_string variable_base, my_h_string variable_name, unsigned long long variable_value) noexcept
 Sets the value of a system variable to a new unsigned integer value. More...
 
static mysql_service_status_t set_default (MYSQL_THD hthd, const char *variable_type, my_h_string variable_base, my_h_string variable_name) noexcept
 Sets the value of a system variable to its default value. More...
 

Detailed Description

An implementation of mysql system_variable_update_string, system_variable_update_integer and system_variable_update_default services for the mysql server component.

Member Function Documentation

◆ set_default()

mysql_service_status_t mysql_system_variable_update_imp::set_default ( MYSQL_THD  hthd,
const char *  variable_type,
my_h_string  variable_base,
my_h_string  variable_name 
)
staticnoexcept

Sets the value of a system variable to its default value.

Same analysis as for mysql_system_variable_update_integer::set_signed applies here as well.

Parameters
hthdthread session handle. if NULL a temporary one will be created and then removed.
variable_typeOne of GLOBAL, SESSION, PERSIST, PERSIST_ONLY. For any other value (including NULL), GLOBAL is assumed. SESSION is not supported for a temporary THD.
variable_basea mysql string of the variable name prefix. NULL if none
variable_nameMySQL string of the variable name
Return values
FALSEsuccess
TRUEfailure, error set. For error info, see THD if supplied.

◆ set_signed()

mysql_service_status_t mysql_system_variable_update_imp::set_signed ( MYSQL_THD  hthd,
const char *  variable_type,
my_h_string  variable_base,
my_h_string  variable_name,
long long  variable_value 
)
staticnoexcept

Sets the value of a system variable to a new signed integer value.

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 temporary THD created as a execution context (and destroyed afterwards), i.e. no impacts on existing transactions. It doesn't make sense to change SESSION variable on a temporary THD, so this operation will generate error.

Parameters
hthdthread session handle. if NULL a temporary one will be created and then deleted.
variable_typeOne of GLOBAL, SESSION, PERSIST, PERSIST_ONLY. For any other value (including NULL), GLOBAL is assumed. SESSION is not supported for a temporary THD.
variable_basea mysql string of the variable name prefix. NULL if none
variable_nameMySQL string of the variable name
variable_valuelong long to set as value
Return values
FALSEsuccess
TRUEfailure, error set. For error info, see THD if supplied.

◆ set_string()

mysql_service_status_t mysql_system_variable_update_imp::set_string ( MYSQL_THD  hthd,
const char *  variable_type,
my_h_string  variable_base,
my_h_string  variable_name,
my_h_string  variable_value 
)
staticnoexcept

Implementation for the mysql_service_mysql_system_variable_update_string_t service.

Sets the value of a system variable to a new value specified in variable_value. Works only for system variables taking unsigned string values. May generate an SQL error that it stores into the current THD (if available).

Parameters
hthdTHD session handle. If NULL, then a temporary THD will be created and then deleted.
variable_typeOne of GLOBAL, SESSION, PERSIST, PERSIST_ONLY. For any other value (including NULL), GLOBAL is assumed. SESSION is not supported for a temporary THD.
variable_baseMySQL string of the variable prefix, NULL if none.
variable_nameMySQL string of the variable name.
variable_valueMySQL string value to pass to the variable.
Return values
FALSESuccess
TRUEFailure, error set
See also
mysql_service_mysql_system_variable_update_string_t

◆ set_unsigned()

mysql_service_status_t mysql_system_variable_update_imp::set_unsigned ( MYSQL_THD  hthd,
const char *  variable_type,
my_h_string  variable_base,
my_h_string  variable_name,
unsigned long long  variable_value 
)
staticnoexcept

Sets the value of a system variable to a new unsigned integer value.

Same analysis as for mysql_system_variable_update_integer::set_signed applies here as well.

Parameters
hthdthread session handle. if NULL a temporary one will be created and then deleted.
variable_typeOne of GLOBAL, SESSION, PERSIST, PERSIST_ONLY. For any other value (including NULL), GLOBAL is assumed. SESSION is not supported for a temporary THD.
variable_basea mysql string of the variable name prefix. NULL if none
variable_nameMySQL string of the variable name
variable_valueunsigned long long to set as value
Return values
FALSEsuccess
TRUEfailure, error set. For error info, see THD if supplied.

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