diff options
Diffstat (limited to 'sql/item_strfunc.cc')
-rw-r--r-- | sql/item_strfunc.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sql/item_strfunc.cc b/sql/item_strfunc.cc index 6f121ecdc06..1111da5b61f 100644 --- a/sql/item_strfunc.cc +++ b/sql/item_strfunc.cc @@ -1373,10 +1373,15 @@ String *Item_func_database::val_str(String *str) String *Item_func_user::val_str(String *str) { THD *thd=current_thd; +#ifdef EMBEDDED_LIBRARY + if (str->copy("localuser@localhost", (uint)strlen("localuser@localhost"))) + return &empty_string; +#else if (str->copy((const char*) thd->user,(uint) strlen(thd->user), system_charset_info) || str->append('@') || str->append(thd->host ? thd->host : thd->ip ? thd->ip : "")) return &empty_string; +#endif return str; } |