diff options
author | Sergey Glukhov <Sergey.Glukhov@sun.com> | 2008-12-24 19:16:50 +0400 |
---|---|---|
committer | Sergey Glukhov <Sergey.Glukhov@sun.com> | 2008-12-24 19:16:50 +0400 |
commit | e75ba73a0762c159984498a06580f323caa2b72c (patch) | |
tree | f56208d053065dce9c54c82f9dc7e40f0f6f1836 /sql/set_var.cc | |
parent | 15015b59e4102babc2fa8a92a3a5b07528cfbeaf (diff) | |
parent | 7103f4c91631dd1e725996429a6f8ccaf4d844d8 (diff) | |
download | mariadb-git-e75ba73a0762c159984498a06580f323caa2b72c.tar.gz |
5.0-bugteam->5.1-bugteam merge
Diffstat (limited to 'sql/set_var.cc')
-rw-r--r-- | sql/set_var.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sql/set_var.cc b/sql/set_var.cc index a371c1113ef..00b7a6d7e76 100644 --- a/sql/set_var.cc +++ b/sql/set_var.cc @@ -3548,6 +3548,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; @@ -3559,6 +3560,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; |