diff options
author | Oleksandr Byelkin <sanja@mariadb.com> | 2014-10-22 19:47:05 +0200 |
---|---|---|
committer | Oleksandr Byelkin <sanja@mariadb.com> | 2014-10-22 19:58:50 +0200 |
commit | af93dc48cffdc9a071e3ec6e1fe51f1d7d06686b (patch) | |
tree | 938d7fa8cbefa67161d50172ff962a842904d71c /sql/set_var.h | |
parent | c3db4459561bc491582bef6bea7b83e9fe464a10 (diff) | |
download | mariadb-git-bb-set-statement.tar.gz |
MDEV-5231: Per query variables from Percona Server (rewritten)bb-set-statement
Diffstat (limited to 'sql/set_var.h')
-rw-r--r-- | sql/set_var.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sql/set_var.h b/sql/set_var.h index fe2a0d8e953..e4a4385f056 100644 --- a/sql/set_var.h +++ b/sql/set_var.h @@ -87,6 +87,7 @@ protected: on_update_function on_update; const char *const deprecation_substitute; bool is_os_charset; ///< true if the value is in character_set_filesystem + bool default_val; public: sys_var(sys_var_chain *chain, const char *name_arg, const char *comment, @@ -191,6 +192,8 @@ public: return insert_dynamic(array, (uchar*)&option); } void do_deprecated_warning(THD *thd); + bool is_default() { return default_val; } + void set_is_default(bool def) { default_val= def; } virtual uchar *default_value_ptr(THD *thd) { return (uchar*)&option.def_value; } @@ -249,6 +252,7 @@ public: virtual int check(THD *thd)=0; /* To check privileges etc. */ virtual int update(THD *thd)=0; /* To set the value */ virtual int light_check(THD *thd) { return check(thd); } /* for PS */ + virtual bool is_system() { return FALSE; } }; @@ -290,6 +294,7 @@ public: else value=value_arg; } + virtual bool is_system() { return 1; } int check(THD *thd); int update(THD *thd); int light_check(THD *thd); @@ -388,7 +393,7 @@ SHOW_VAR* enumerate_sys_vars(THD *thd, bool sorted, enum enum_var_type type); int fill_sysvars(THD *thd, TABLE_LIST *tables, COND *cond); sys_var *find_sys_var(THD *thd, const char *str, uint length=0); -int sql_set_variables(THD *thd, List<set_var_base> *var_list); +int sql_set_variables(THD *thd, List<set_var_base> *var_list, bool free); #define SYSVAR_AUTOSIZE(VAR,VAL) \ do { \ |