Commit f712c213 authored by Sinisa@sinisa.nasamreza.org's avatar Sinisa@sinisa.nasamreza.org

Merge sinisa@bk-internal.mysql.com:/home/bk/mysql-4.1

into sinisa.nasamreza.org:/mnt/work/mysql-4.1
parents 8cf4e729 d09462e2
...@@ -1461,8 +1461,7 @@ String *Item_func_user::val_str(String *str) ...@@ -1461,8 +1461,7 @@ String *Item_func_user::val_str(String *str)
// For system threads (e.g. replication SQL thread) user may be empty // For system threads (e.g. replication SQL thread) user may be empty
if (!thd->user) if (!thd->user)
return &empty_string; return &empty_string;
uint32 res_length=(strlen(thd->user)+strlen(host)+3) * cs->mbmaxlen; uint32 res_length=(strlen(thd->user)+strlen(host)+2) * cs->mbmaxlen;
// it is +3 , because 1 for each string and 1 for '@' sign
if (str->alloc(res_length)) 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