mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Fixing few small problems in SET PASSWORD:
* comparison with correct cached variable * preventing check_change_password to be called twice, once from set_var::check and the other time from change_password itself
This commit is contained in:
@ -30,7 +30,7 @@ You are using safe update mode and you tried to update a table without a WHERE t
|
||||
delete from t1 where a+0=1;
|
||||
You are using safe update mode and you tried to update a table without a WHERE that uses a KEY column
|
||||
select 1 from t1,t1 as t2,t1 as t3,t1 as t4,t1 as t5;
|
||||
The SELECT would examine too many records and probably take a very long time. Check your WHERE and use SET OPTION SQL_BIG_SELECTS=1 if the SELECT is ok
|
||||
The SELECT would examine too many records and probably take a very long time. Check your WHERE and use SET SQL_BIG_SELECTS=1 if the SELECT is ok
|
||||
update t1 set b="a" limit 1;
|
||||
update t1 set b="a" where b="b" limit 2;
|
||||
delete from t1 where b="test" limit 1;
|
||||
|
@ -1029,7 +1029,7 @@ bool check_change_password(THD *thd, const char *host, const char *user)
|
||||
}
|
||||
if (!thd->slave_thread &&
|
||||
(strcmp(thd->user,user) ||
|
||||
my_strcasecmp(host,thd->host ? thd->host : thd->ip)))
|
||||
my_strcasecmp(host,thd->host_or_ip)))
|
||||
{
|
||||
if (check_access(thd, UPDATE_ACL, "mysql",0,1))
|
||||
return(1);
|
||||
@ -1067,10 +1067,6 @@ bool change_password(THD *thd, const char *host, const char *user,
|
||||
host,user,new_password));
|
||||
DBUG_ASSERT(host != 0); // Ensured by parent
|
||||
|
||||
if (check_change_password(thd, host, user))
|
||||
DBUG_RETURN(1);
|
||||
|
||||
/* password should always be 0 or 16 chars; simple hack to avoid cracking */
|
||||
length=(uint) strlen(new_password);
|
||||
new_password[length & 16]=0;
|
||||
|
||||
|
Reference in New Issue
Block a user