diff options
author | Alexey Kopytov <Alexey.Kopytov@sun.com> | 2009-06-01 16:00:38 +0400 |
---|---|---|
committer | Alexey Kopytov <Alexey.Kopytov@sun.com> | 2009-06-01 16:00:38 +0400 |
commit | 7561bc9212a22e3d591033103b7b404503fe721b (patch) | |
tree | 56315491cf4cef28a3140a8445cc412749dac6d6 /sql/item_strfunc.cc | |
parent | 405bd2af117384e009c3feffe1fd7d9019bf9d2b (diff) | |
parent | 1b8322c3c6f406bd119145c6f38ddeb802e1b9fc (diff) | |
download | mariadb-git-7561bc9212a22e3d591033103b7b404503fe721b.tar.gz |
Manual merge.
Diffstat (limited to 'sql/item_strfunc.cc')
-rw-r--r-- | sql/item_strfunc.cc | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/sql/item_strfunc.cc b/sql/item_strfunc.cc index 501b7e85080..ab0050278cd 100644 --- a/sql/item_strfunc.cc +++ b/sql/item_strfunc.cc @@ -1629,16 +1629,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; } @@ -1652,16 +1653,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; } |