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 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...
|
|
An implementation of mysql system_variable_update_string, system_variable_update_integer and system_variable_update_default services for the mysql server component.
◆ set_default()
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
-
hthd | thread session handle. if NULL a temporary one will be created and then removed. |
variable_type | One of GLOBAL, SESSION, PERSIST, PERSIST_ONLY. For any other value (including NULL), GLOBAL is assumed. SESSION is not supported for a temporary THD. |
variable_base | a mysql string of the variable name prefix. NULL if none |
variable_name | MySQL string of the variable name |
- Return values
-
FALSE | success |
TRUE | failure, error set. For error info, see THD if supplied. |
◆ set_signed()
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
-
hthd | thread session handle. if NULL a temporary one will be created and then deleted. |
variable_type | One of GLOBAL, SESSION, PERSIST, PERSIST_ONLY. For any other value (including NULL), GLOBAL is assumed. SESSION is not supported for a temporary THD. |
variable_base | a mysql string of the variable name prefix. NULL if none |
variable_name | MySQL string of the variable name |
variable_value | long long to set as value |
- Return values
-
FALSE | success |
TRUE | failure, error set. For error info, see THD if supplied. |
◆ set_string()
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
-
hthd | THD session handle. If NULL, then a temporary THD will be created and then deleted. |
variable_type | One of GLOBAL, SESSION, PERSIST, PERSIST_ONLY. For any other value (including NULL), GLOBAL is assumed. SESSION is not supported for a temporary THD. |
variable_base | MySQL string of the variable prefix, NULL if none. |
variable_name | MySQL string of the variable name. |
variable_value | MySQL string value to pass to the variable. |
- Return values
-
FALSE | Success |
TRUE | Failure, error set |
- See also
- mysql_service_mysql_system_variable_update_string_t
◆ set_unsigned()
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
-
hthd | thread session handle. if NULL a temporary one will be created and then deleted. |
variable_type | One of GLOBAL, SESSION, PERSIST, PERSIST_ONLY. For any other value (including NULL), GLOBAL is assumed. SESSION is not supported for a temporary THD. |
variable_base | a mysql string of the variable name prefix. NULL if none |
variable_name | MySQL string of the variable name |
variable_value | unsigned long long to set as value |
- Return values
-
FALSE | success |
TRUE | failure, error set. For error info, see THD if supplied. |
The documentation for this class was generated from the following files: