summaryrefslogtreecommitdiff
path: root/sql/set_var.h
diff options
context:
space:
mode:
authorGeorgi Kodinov <kgeorge@mysql.com>2008-11-28 17:27:12 +0200
committerGeorgi Kodinov <kgeorge@mysql.com>2008-11-28 17:27:12 +0200
commit552a1bd3528323a6ca13080eb5b9fdfecfc5efb3 (patch)
treef6bbb349fcaf959a9183e7740699c863921811e2 /sql/set_var.h
parentbe1e99281241539b34e374529716f8eb162f4786 (diff)
parentf1a9d567c1535f4829e0b3b078b24c0e8c5c437c (diff)
downloadmariadb-git-552a1bd3528323a6ca13080eb5b9fdfecfc5efb3.tar.gz
merged bug 37339 to 5.1-bugteam
Diffstat (limited to 'sql/set_var.h')
-rw-r--r--sql/set_var.h62
1 files changed, 62 insertions, 0 deletions
diff --git a/sql/set_var.h b/sql/set_var.h
index 6b62d62706e..2e58b2faa7d 100644
--- a/sql/set_var.h
+++ b/sql/set_var.h
@@ -71,6 +71,14 @@ public:
sys_after_update_func after_update;
bool no_support_one_shot;
+ /*
+ true if the value is in character_set_filesystem,
+ false otherwise.
+ Note that we can't use a pointer to the charset as the system var is
+ instantiated in global scope and the charset pointers are initialized
+ later.
+ */
+ bool is_os_charset;
sys_var(const char *name_arg, sys_after_update_func func= NULL,
Binlog_status_enum binlog_status_arg= NOT_IN_BINLOG)
:name(name_arg), after_update(func), no_support_one_shot(1),
@@ -107,6 +115,7 @@ public:
{ return option_limits == 0; }
virtual bool is_struct() { return 0; }
virtual bool is_readonly() const { return 0; }
+ CHARSET_INFO *charset(THD *thd);
virtual sys_var_pluginvar *cast_pluginvar() { return 0; }
protected:
@@ -291,6 +300,18 @@ public:
};
+class sys_var_const_os_str: public sys_var_const_str
+{
+public:
+ sys_var_const_os_str(sys_var_chain *chain, const char *name_arg,
+ const char *value_arg)
+ :sys_var_const_str(chain, name_arg, value_arg)
+ {
+ is_os_charset= TRUE;
+ }
+};
+
+
class sys_var_const_str_ptr :public sys_var
{
public:
@@ -320,6 +341,18 @@ public:
};
+class sys_var_const_os_str_ptr :public sys_var_const_str_ptr
+{
+public:
+ sys_var_const_os_str_ptr(sys_var_chain *chain, const char *name_arg,
+ char **value_arg)
+ :sys_var_const_str_ptr(chain, name_arg, value_arg)
+ {
+ is_os_charset= TRUE;
+ }
+};
+
+
class sys_var_enum :public sys_var
{
uint *value;
@@ -929,6 +962,19 @@ public:
};
+class sys_var_readonly_os: public sys_var_readonly
+{
+public:
+ sys_var_readonly_os(sys_var_chain *chain, const char *name_arg, enum_var_type type,
+ SHOW_TYPE show_type_arg,
+ sys_value_ptr_func value_ptr_func_arg)
+ :sys_var_readonly(chain, name_arg, type, show_type_arg, value_ptr_func_arg)
+ {
+ is_os_charset= TRUE;
+ }
+};
+
+
/**
Global-only, read-only variable. E.g. command line option.
*/
@@ -957,6 +1003,22 @@ public:
};
+class sys_var_const_os: public sys_var_const
+{
+public:
+ enum_var_type var_type;
+ SHOW_TYPE show_type_value;
+ uchar *ptr;
+ sys_var_const_os(sys_var_chain *chain, const char *name_arg,
+ enum_var_type type,
+ SHOW_TYPE show_type_arg, uchar *ptr_arg)
+ :sys_var_const(chain, name_arg, type, show_type_arg, ptr_arg)
+ {
+ is_os_charset= TRUE;
+ }
+};
+
+
class sys_var_have_option: public sys_var
{
protected: