summaryrefslogtreecommitdiff
path: root/libmysqld
diff options
context:
space:
mode:
authorunknown <hf@deer.(none)>2004-06-09 23:10:09 +0500
committerunknown <hf@deer.(none)>2004-06-09 23:10:09 +0500
commitc56613fb3c5b4eacf21d95c68c34d4e28f55e6a5 (patch)
tree9abc8cdfbd09dadacdfe01583ff6d8b550bfbd80 /libmysqld
parent8370e6e118403828b638f454de821dca5a5e172f (diff)
downloadmariadb-git-c56613fb3c5b4eacf21d95c68c34d4e28f55e6a5.tar.gz
fix for bug #3974 ("SHOW FULL PROCESSLIST" crashes the embedded server)
server crashed checking thd->priv_user[0] and thd->priv_user is NULL if NO_EMBEDDED_ACCESS_CHECKS is on. Now i set it to be the same as thd->user libmysqld/lib_sql.cc: now priv_user won't be NULL
Diffstat (limited to 'libmysqld')
-rw-r--r--libmysqld/lib_sql.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/libmysqld/lib_sql.cc b/libmysqld/lib_sql.cc
index 2ceeb43a91e..d1a140c754a 100644
--- a/libmysqld/lib_sql.cc
+++ b/libmysqld/lib_sql.cc
@@ -511,6 +511,7 @@ int check_embedded_connection(MYSQL *mysql)
thd->host= (char*)my_localhost;
thd->host_or_ip= thd->host;
thd->user= my_strdup(mysql->user, MYF(0));
+ thd->priv_user= thd->user;
return check_user(thd, COM_CONNECT, NULL, 0, thd->db, true);
}