Merge from Tim's 5.0.76-release tree to make 5.0.77 .

This commit is contained in:
Chad MILLER 2009-01-21 13:45:23 -05:00
commit d3629d7489
79 changed files with 1886 additions and 432 deletions

View file

@ -3489,6 +3489,7 @@ int set_var_password::check(THD *thd)
#ifndef NO_EMBEDDED_ACCESS_CHECKS
if (!user->host.str)
{
DBUG_ASSERT(thd->security_ctx->priv_host);
if (*thd->security_ctx->priv_host != 0)
{
user->host.str= (char *) thd->security_ctx->priv_host;
@ -3500,6 +3501,12 @@ int set_var_password::check(THD *thd)
user->host.length= 1;
}
}
if (!user->user.str)
{
DBUG_ASSERT(thd->security_ctx->priv_user);
user->user.str= (char *) thd->security_ctx->priv_user;
user->user.length= strlen(thd->security_ctx->priv_user);
}
/* Returns 1 as the function sends error to client */
return check_change_password(thd, user->host.str, user->user.str,
password, strlen(password)) ? 1 : 0;