summaryrefslogtreecommitdiff
path: root/sql/item_strfunc.h
diff options
context:
space:
mode:
authorSergei Golubchik <sergii@pisem.net>2013-10-29 15:08:44 +0100
committerSergei Golubchik <sergii@pisem.net>2013-10-29 15:08:44 +0100
commit0fdb3bcfdbfa5d7cad28adc1c0f7c0958cdab2e0 (patch)
tree7d6a1d36b975e2b1bb8d9ffd3b7511ec0694349e /sql/item_strfunc.h
parent7dc48ae327ad27205dffe0cec16b445d01529f84 (diff)
parentfef416699009b78366d9eec937c01822b531f518 (diff)
downloadmariadb-git-0fdb3bcfdbfa5d7cad28adc1c0f7c0958cdab2e0.tar.gz
10.0-base merge (roles)
Diffstat (limited to 'sql/item_strfunc.h')
-rw-r--r--sql/item_strfunc.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/sql/item_strfunc.h b/sql/item_strfunc.h
index 6bce7da7d52..6709b4b64c6 100644
--- a/sql/item_strfunc.h
+++ b/sql/item_strfunc.h
@@ -607,6 +607,28 @@ public:
};
+class Item_func_current_role :public Item_func_sysconst
+{
+ Name_resolution_context *context;
+
+public:
+ Item_func_current_role(Name_resolution_context *context_arg)
+ : context(context_arg) {}
+ bool fix_fields(THD *thd, Item **ref);
+ void fix_length_and_dec()
+ { max_length= username_char_length * SYSTEM_CHARSET_MBMAXLEN; }
+ int save_in_field(Field *field, bool no_conversions)
+ { return save_str_value_in_field(field, &str_value); }
+ const char *func_name() const { return "current_role"; }
+ const char *fully_qualified_func_name() const { return "current_role()"; }
+ String *val_str(String *)
+ {
+ DBUG_ASSERT(fixed == 1);
+ return (null_value ? 0 : &str_value);
+ }
+};
+
+
class Item_func_soundex :public Item_str_func
{
String tmp_value;