summaryrefslogtreecommitdiff
path: root/libmysqld/lib_sql.cc
diff options
context:
space:
mode:
Diffstat (limited to 'libmysqld/lib_sql.cc')
-rw-r--r--libmysqld/lib_sql.cc7
1 files changed, 3 insertions, 4 deletions
diff --git a/libmysqld/lib_sql.cc b/libmysqld/lib_sql.cc
index a86d467299c..d6f41fda5f6 100644
--- a/libmysqld/lib_sql.cc
+++ b/libmysqld/lib_sql.cc
@@ -532,10 +532,9 @@ err:
int check_embedded_connection(MYSQL *mysql)
{
THD *thd= (THD*)mysql->thd;
- thd->host= (char*)my_localhost;
- thd->host_or_ip= thd->host;
- thd->user= my_strdup(mysql->user, MYF(0));
- thd->priv_user= thd->user;
+ st_security_context *sctx= thd->security_ctx;
+ sctx->host_or_ip= sctx->host= (char*)my_localhost;
+ sctx->priv_user= sctx->user= my_strdup(mysql->user, MYF(0));
return check_user(thd, COM_CONNECT, NULL, 0, thd->db, true);
}