mirror of
https://github.com/MariaDB/server.git
synced 2026-05-02 13:15:32 +02:00
Automerge.
This commit is contained in:
commit
47b334a642
7 changed files with 90 additions and 21 deletions
|
|
@ -1554,16 +1554,17 @@ String *Item_func_password::val_str(String *str)
|
|||
return 0;
|
||||
if (res->length() == 0)
|
||||
return &my_empty_string;
|
||||
make_scrambled_password(tmp_value, res->c_ptr());
|
||||
my_make_scrambled_password(tmp_value, res->ptr(), res->length());
|
||||
str->set(tmp_value, SCRAMBLED_PASSWORD_CHAR_LENGTH, res->charset());
|
||||
return str;
|
||||
}
|
||||
|
||||
char *Item_func_password::alloc(THD *thd, const char *password)
|
||||
char *Item_func_password::alloc(THD *thd, const char *password,
|
||||
size_t pass_len)
|
||||
{
|
||||
char *buff= (char *) thd->alloc(SCRAMBLED_PASSWORD_CHAR_LENGTH+1);
|
||||
if (buff)
|
||||
make_scrambled_password(buff, password);
|
||||
my_make_scrambled_password(buff, password, pass_len);
|
||||
return buff;
|
||||
}
|
||||
|
||||
|
|
@ -1577,16 +1578,17 @@ String *Item_func_old_password::val_str(String *str)
|
|||
return 0;
|
||||
if (res->length() == 0)
|
||||
return &my_empty_string;
|
||||
make_scrambled_password_323(tmp_value, res->c_ptr());
|
||||
my_make_scrambled_password_323(tmp_value, res->ptr(), res->length());
|
||||
str->set(tmp_value, SCRAMBLED_PASSWORD_CHAR_LENGTH_323, res->charset());
|
||||
return str;
|
||||
}
|
||||
|
||||
char *Item_func_old_password::alloc(THD *thd, const char *password)
|
||||
char *Item_func_old_password::alloc(THD *thd, const char *password,
|
||||
size_t pass_len)
|
||||
{
|
||||
char *buff= (char *) thd->alloc(SCRAMBLED_PASSWORD_CHAR_LENGTH_323+1);
|
||||
if (buff)
|
||||
make_scrambled_password_323(buff, password);
|
||||
my_make_scrambled_password_323(buff, password, pass_len);
|
||||
return buff;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue