summaryrefslogtreecommitdiff
path: root/sql/item_strfunc.h
diff options
context:
space:
mode:
Diffstat (limited to 'sql/item_strfunc.h')
-rw-r--r--sql/item_strfunc.h16
1 files changed, 12 insertions, 4 deletions
diff --git a/sql/item_strfunc.h b/sql/item_strfunc.h
index dc50c9a4ccd..ea8a78c528a 100644
--- a/sql/item_strfunc.h
+++ b/sql/item_strfunc.h
@@ -337,10 +337,18 @@ public:
};
-class Item_func_database :public Item_str_func
+class Item_func_sysconst :public Item_str_func
{
public:
- Item_func_database() { collation.set(system_charset_info,DERIVATION_IMPLICIT); }
+ Item_func_sysconst()
+ { collation.set(system_charset_info,DERIVATION_SYSCONST); }
+ Item *safe_charset_converter(CHARSET_INFO *tocs);
+};
+
+class Item_func_database :public Item_func_sysconst
+{
+public:
+ Item_func_database() :Item_func_sysconst() {}
String *val_str(String *);
void fix_length_and_dec()
{
@@ -350,10 +358,10 @@ public:
const char *func_name() const { return "database"; }
};
-class Item_func_user :public Item_str_func
+class Item_func_user :public Item_func_sysconst
{
public:
- Item_func_user() { collation.set(system_charset_info, DERIVATION_IMPLICIT); }
+ Item_func_user() :Item_func_sysconst() {}
String *val_str(String *);
void fix_length_and_dec()
{