diff options
author | Michael Widenius <monty@mariadb.org> | 2016-06-24 23:42:35 +0200 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2016-06-30 11:43:02 +0200 |
commit | fb67cde2370f7427b3279309daac712c369f1cf8 (patch) | |
tree | 94eecb3c669fdf00957f49741b75ee6eec057826 /sql/item_strfunc.h | |
parent | 8f226121e52cbaa332964b24bd27e8babf9f2b06 (diff) | |
download | mariadb-git-fb67cde2370f7427b3279309daac712c369f1cf8.tar.gz |
Use default character set for expressions
- Force usage of () around complex DEFAULT expressions
- Give error if DEFAULT expression contains invalid characters
- Don't use const_charset_conversion for stored Item_func_sysconf expressions
as the result is not constaint over different executions
- Fixed Item_func_user() to not store calculated value in str_value
Diffstat (limited to 'sql/item_strfunc.h')
-rw-r--r-- | sql/item_strfunc.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sql/item_strfunc.h b/sql/item_strfunc.h index aa7fabbdb21..e484e41d300 100644 --- a/sql/item_strfunc.h +++ b/sql/item_strfunc.h @@ -562,10 +562,7 @@ class Item_func_sysconst :public Item_str_func public: Item_func_sysconst(THD *thd): Item_str_func(thd) { collation.set(system_charset_info,DERIVATION_SYSCONST); } - Item *safe_charset_converter(THD *thd, CHARSET_INFO *tocs) - { - return const_charset_converter(thd, tocs, true, fully_qualified_func_name()); - } + Item *safe_charset_converter(THD *thd, CHARSET_INFO *tocs); /* Used to create correct Item name in new converted item in safe_charset_converter, return string representation of this function @@ -599,6 +596,7 @@ class Item_func_user :public Item_func_sysconst { protected: query_id_t last_query_id; + String cached_value; bool init(THD *thd, const char *user, const char *host); public: @@ -906,6 +904,7 @@ public: } virtual void print(String *str, enum_query_type query_type); const char *func_name() const { return "cast_as_binary"; } + bool need_parentheses_in_default() { return true; } }; @@ -1058,6 +1057,7 @@ public: /* this function is transparent for view updating */ return args[0]->field_for_view_update(); } + bool need_parentheses_in_default() { return true; } }; |