Commit da3667f6 authored by hf@deer.(none)'s avatar hf@deer.(none)

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
parent 4506aba1
...@@ -511,6 +511,7 @@ int check_embedded_connection(MYSQL *mysql) ...@@ -511,6 +511,7 @@ int check_embedded_connection(MYSQL *mysql)
thd->host= (char*)my_localhost; thd->host= (char*)my_localhost;
thd->host_or_ip= thd->host; thd->host_or_ip= thd->host;
thd->user= my_strdup(mysql->user, MYF(0)); thd->user= my_strdup(mysql->user, MYF(0));
thd->priv_user= thd->user;
return check_user(thd, COM_CONNECT, NULL, 0, thd->db, true); return check_user(thd, COM_CONNECT, NULL, 0, thd->db, true);
} }
......
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