MySQL 8.4.2
Source Code Documentation
mysql_system_variable_update_imp.cc File Reference

Functions

static enum_var_type sysvar_type (const char *type_name)
 Return the system variable type given a type name. More...
 
static bool prepare_thread_and_validate (Set_variables_helper &hlp, const char *variable_type, my_h_string variable_name, enum_var_type &var_type)
 This is an internal method that handles preparation tasks common for all system variable update service APIs: More...
 
static bool common_system_variable_update_set (Set_variables_helper &hlp, enum_var_type var_type, my_h_string variable_base, my_h_string variable_name, Item *variable_value)
 Common system variable update code (used by different variable value types). More...
 

Function Documentation

◆ common_system_variable_update_set()

static bool common_system_variable_update_set ( Set_variables_helper hlp,
enum_var_type  var_type,
my_h_string  variable_base,
my_h_string  variable_name,
Item variable_value 
)
static

Common system variable update code (used by different variable value types).

Parameters
hlpAn execution context
var_typeEnum type matching one of GLOBAL, SESSION, PERSIST, PERSIST_ONLY.
variable_baseMySQL string of the variable prefix, NULL if none.
variable_nameMySQL string of the variable name.
variable_valuePointer to Item object storing the value of the correct
Return values
falseSuccess
trueFailure, error set

◆ prepare_thread_and_validate()

static bool prepare_thread_and_validate ( Set_variables_helper hlp,
const char *  variable_type,
my_h_string  variable_name,
enum_var_type var_type 
)
static

This is an internal method that handles preparation tasks common for all system variable update service APIs:

  • creates temporary THD for an operation, if needed
  • validates that SESSION type is not used with temporary THD
Parameters
hlpExecution context handle.
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_nameMySQL string of the variable name.
var_typeReference to output variable type enumeration (avoids parsing type multiple times).
Return values
FALSESuccess
TRUEFailure, error set

◆ sysvar_type()

static enum_var_type sysvar_type ( const char *  type_name)
static

Return the system variable type given a type name.