summaryrefslogtreecommitdiff
path: root/sql/set_var.h
diff options
context:
space:
mode:
authorbar@bar.mysql.r18.ru <>2003-04-07 16:10:27 +0500
committerbar@bar.mysql.r18.ru <>2003-04-07 16:10:27 +0500
commite165845d39aa6ce33f543fb033776363fad7784c (patch)
treed46595aeafebe373e34fab33628294f37eef348d /sql/set_var.h
parente0caf3f22517ebf57c2f0e5347ac0b2c90edcf50 (diff)
downloadmariadb-git-e165845d39aa6ce33f543fb033776363fad7784c.tar.gz
sys_var_collation is now abstract class
Two separate classes sys_var_client_collation and sys_var_literal_collation have been added for "literal_collation" and "client_collation" variables.
Diffstat (limited to 'sql/set_var.h')
-rw-r--r--sql/set_var.h28
1 files changed, 22 insertions, 6 deletions
diff --git a/sql/set_var.h b/sql/set_var.h
index 7b2f9d5cb80..51f59981e14 100644
--- a/sql/set_var.h
+++ b/sql/set_var.h
@@ -406,20 +406,36 @@ public:
};
-class sys_var_client_collation :public sys_var_thd
+class sys_var_collation :public sys_var_thd
{
public:
- sys_var_client_collation(const char *name_arg) :sys_var_thd(name_arg)
- {}
+ sys_var_collation(const char *name_arg) :sys_var_thd(name_arg) {}
bool check(THD *thd, set_var *var);
- bool update(THD *thd, set_var *var);
- SHOW_TYPE type() { return SHOW_CHAR; }
- byte *value_ptr(THD *thd, enum_var_type type);
+SHOW_TYPE type() { return SHOW_CHAR; }
bool check_update_type(Item_result type)
{
return type != STRING_RESULT; /* Only accept strings */
}
bool check_default(enum_var_type type) { return 0; }
+ virtual void set_default(THD *thd, enum_var_type type)= 0;
+};
+
+class sys_var_client_collation :public sys_var_collation
+{
+public:
+ sys_var_client_collation(const char *name_arg) :sys_var_collation(name_arg) {}
+ bool update(THD *thd, set_var *var);
+ void set_default(THD *thd, enum_var_type type);
+ byte *value_ptr(THD *thd, enum_var_type type);
+};
+
+class sys_var_literal_collation :public sys_var_collation
+{
+public:
+ sys_var_literal_collation(const char *name_arg) :sys_var_collation(name_arg) {}
+ bool update(THD *thd, set_var *var);
+ void set_default(THD *thd, enum_var_type type);
+ byte *value_ptr(THD *thd, enum_var_type type);
};