Commit c0672fb8 authored by unknown's avatar unknown

fix for a :

SELECT USER();

parent 7786126b
......@@ -1461,7 +1461,8 @@ String *Item_func_user::val_str(String *str)
// For system threads (e.g. replication SQL thread) user may be empty
if (!thd->user)
return &empty_string;
uint32 res_length=(strlen(thd->user)+strlen(host)+2) * cs->mbmaxlen;
uint32 res_length=(strlen(thd->user)+strlen(host)+3) * cs->mbmaxlen;
// it is +3 , because 1 for each string and 1 for '@' sign
if (str->alloc(res_length))
{
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment