summaryrefslogtreecommitdiff
path: root/sql/log.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/log.cc')
-rw-r--r--sql/log.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/sql/log.cc b/sql/log.cc
index 9ad779a119b..608a7e94431 100644
--- a/sql/log.cc
+++ b/sql/log.cc
@@ -1586,8 +1586,8 @@ bool MYSQL_LOG::write(THD *thd,const char *query, uint query_length,
tmp_errno=errno;
}
if (my_b_printf(&log_file, "# User@Host: %s[%s] @ %s [%s]\n",
- thd->priv_user,
- thd->user,
+ thd->priv_user ? thd->priv_user : "",
+ thd->user ? thd->user : "",
thd->host ? thd->host : "",
thd->ip ? thd->ip : "") == (uint) -1)
tmp_errno=errno;