mirror of
https://github.com/MariaDB/server.git
synced 2026-01-06 05:22:24 +03:00
fixed coredump in SET PASSWORD in slave thread.
mysql-test/t/rpl000001.test: added test for replicaion of set password sql/sql_acl.cc: fixed coredump on slave in the case of SET PASSWORD
This commit is contained in:
@@ -781,8 +781,8 @@ bool change_password(THD *thd, const char *host, const char *user,
|
||||
length=(uint) strlen(new_password);
|
||||
new_password[length & 16]=0;
|
||||
|
||||
if (!thd || strcmp(thd->user,user) ||
|
||||
my_strcasecmp(host,thd->host ? thd->host : thd->ip))
|
||||
if (!thd || (!thd->slave_thread && ( strcmp(thd->user,user) ||
|
||||
my_strcasecmp(host,thd->host ? thd->host : thd->ip))))
|
||||
{
|
||||
if (check_access(thd, UPDATE_ACL, "mysql",0,1))
|
||||
return 1;
|
||||
|
||||
Reference in New Issue
Block a user