mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
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.
This commit is contained in:
@ -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);
|
||||
};
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user