summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorunknown <monty@mashka.mysql.fi>2003-08-03 16:33:04 +0300
committerunknown <monty@mashka.mysql.fi>2003-08-03 16:33:04 +0300
commite2a4c4a5d25c5f628415113c3fb12ea87905914a (patch)
tree6ef125e6a87eafb21e69e9d18fd059dc4eeb1db7 /sql
parent2c3f6568797ecc269371b7d20eecdf4993905cec (diff)
downloadmariadb-git-e2a4c4a5d25c5f628415113c3fb12ea87905914a.tar.gz
Cleaned up code comment
Diffstat (limited to 'sql')
-rw-r--r--sql/item_strfunc.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/sql/item_strfunc.cc b/sql/item_strfunc.cc
index 9e37a5a18e5..ff01d841e78 100644
--- a/sql/item_strfunc.cc
+++ b/sql/item_strfunc.cc
@@ -1094,7 +1094,8 @@ String *Item_func_database::val_str(String *str)
String *Item_func_user::val_str(String *str)
{
THD *thd=current_thd;
- if (!(thd->user) || // for system threads (e.g. replication thread)
+ // For a replication thread user may be a null pointer (To be fixed)
+ if (!thd->user ||
str->copy((const char*) thd->user,(uint) strlen(thd->user)) ||
str->append('@') ||
str->append(thd->host ? thd->host : thd->ip ? thd->ip : ""))