mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
fixed coredump in SET PASSWORD in slave thread.
This commit is contained in:
@ -5,6 +5,8 @@ drop table if exists t1;
|
|||||||
create table t1 (word char(20) not null);
|
create table t1 (word char(20) not null);
|
||||||
load data infile '../../std_data/words.dat' into table t1;
|
load data infile '../../std_data/words.dat' into table t1;
|
||||||
drop table if exists foo;
|
drop table if exists foo;
|
||||||
|
set password = password('foo');
|
||||||
|
set password = password('');
|
||||||
create table foo(n int);
|
create table foo(n int);
|
||||||
insert into foo values(1),(2);
|
insert into foo values(1),(2);
|
||||||
save_master_pos;
|
save_master_pos;
|
||||||
|
@ -781,8 +781,8 @@ bool change_password(THD *thd, const char *host, const char *user,
|
|||||||
length=(uint) strlen(new_password);
|
length=(uint) strlen(new_password);
|
||||||
new_password[length & 16]=0;
|
new_password[length & 16]=0;
|
||||||
|
|
||||||
if (!thd || strcmp(thd->user,user) ||
|
if (!thd || (!thd->slave_thread && ( strcmp(thd->user,user) ||
|
||||||
my_strcasecmp(host,thd->host ? thd->host : thd->ip))
|
my_strcasecmp(host,thd->host ? thd->host : thd->ip))))
|
||||||
{
|
{
|
||||||
if (check_access(thd, UPDATE_ACL, "mysql",0,1))
|
if (check_access(thd, UPDATE_ACL, "mysql",0,1))
|
||||||
return 1;
|
return 1;
|
||||||
|
Reference in New Issue
Block a user