MySQL 5.6.14 Source Code Document
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
set_var.h File Reference
#include <my_getopt.h>
#include <vector>
#include "item.h"
#include "sql_class.h"
#include "binlog.h"
#include "sql_plugin.h"
Include dependency graph for set_var.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  sys_var_chain
class  sys_var
class  set_var_base
class  set_var
class  set_var_user
class  set_var_password
class  set_var_collation_client

Functions

int mysql_add_sys_var_chain (sys_var *chain)
int mysql_del_sys_var_chain (sys_var *chain)
SHOW_VARenumerate_sys_vars (THD *thd, bool sorted, enum enum_var_type type)
sys_varfind_sys_var (THD *thd, const char *str, uint length=0)
int sql_set_variables (THD *thd, List< set_var_base > *var_list)
bool fix_delay_key_write (sys_var *self, THD *thd, enum_var_type type)
sql_mode_t expand_sql_mode (sql_mode_t sql_mode)
bool sql_mode_string_representation (THD *thd, sql_mode_t sql_mode, LEX_STRING *ls)
const CHARSET_INFOget_old_charset_by_name (const char *old_name)
int sys_var_init ()
int sys_var_add_options (std::vector< my_option > *long_options, int parse_flags)
void sys_var_end (void)

Variables

TYPELIB bool_typelib
SHOW_COMP_OPTION have_csv
SHOW_COMP_OPTION have_ndbcluster
SHOW_COMP_OPTION have_partitioning
SHOW_COMP_OPTION have_profiling
SHOW_COMP_OPTION have_ssl
SHOW_COMP_OPTION have_symlink
SHOW_COMP_OPTION have_dlopen
SHOW_COMP_OPTION have_query_cache
SHOW_COMP_OPTION have_geometry
SHOW_COMP_OPTION have_rtree_keys
SHOW_COMP_OPTION have_crypt
SHOW_COMP_OPTION have_compress
sys_varSys_autocommit_ptr
sys_varSys_gtid_next_ptr
sys_varSys_gtid_next_list_ptr
sys_varSys_gtid_purged_ptr

Detailed Description

"public" interface to sys_var - server configuration variables.

Definition in file set_var.h.

Function Documentation

SHOW_VAR* enumerate_sys_vars ( THD *  thd,
bool  sorted,
enum enum_var_type  type 
)

Constructs an array of system variables for display to the user.

Parameters
thdcurrent thread
sortedIf TRUE, the system variables should be sorted
typeOPT_GLOBAL or OPT_SESSION for SHOW GLOBAL|SESSION VARIABLES
Return values
pointerArray of SHOW_VAR elements for display
NULLFAILURE

Definition at line 466 of file set_var.cc.

bool fix_delay_key_write ( sys_var self,
THD *  thd,
enum_var_type  type 
)
Todo:
When updating myisam_delay_key_write, we should do a 'flush tables' of all MyISAM tables to ensure that they are reopen with the new attribute.

Definition at line 1168 of file sys_vars.cc.

int mysql_add_sys_var_chain ( sys_var first)

Add variables to the dynamic hash of system variables

Parameters
firstPointer to first system variable to add
Return values
0SUCCESS
otherwiseFAILURE

Definition at line 398 of file set_var.cc.

int sql_set_variables ( THD *  thd,
List< set_var_base > *  var_list 
)

Execute update of all variables.

First run a check of all variables that all updates will go ok. If yes, then execute all updates, returning an error if any one failed.

This should ensure that in all normal cases none all or variables are updated.

Parameters
THDThread id
var_listList of variables to update
Return values
0ok
1ERROR, message sent (normally no variables was updated)
-1ERROR, message not sent

Definition at line 557 of file set_var.cc.

Here is the call graph for this function: