summaryrefslogtreecommitdiff
path: root/sql/item_strfunc.cc
diff options
context:
space:
mode:
authorAlexey Kopytov <Alexey.Kopytov@sun.com>2009-06-01 16:42:24 +0400
committerAlexey Kopytov <Alexey.Kopytov@sun.com>2009-06-01 16:42:24 +0400
commit47b334a64200d9413d3289fb3f011a6f4bc22ec2 (patch)
tree42f04b95d4c57218e9b1cbf122c4d4bd9f1f75f4 /sql/item_strfunc.cc
parent83a11b78dfe1b702a0b5d8f2b142d0f0cc75092f (diff)
parent1b8322c3c6f406bd119145c6f38ddeb802e1b9fc (diff)
downloadmariadb-git-47b334a64200d9413d3289fb3f011a6f4bc22ec2.tar.gz
Automerge.
Diffstat (limited to 'sql/item_strfunc.cc')
-rw-r--r--sql/item_strfunc.cc14
1 files changed, 8 insertions, 6 deletions
diff --git a/sql/item_strfunc.cc b/sql/item_strfunc.cc
index 4941f427731..e3fe67f4324 100644
--- a/sql/item_strfunc.cc
+++ b/sql/item_strfunc.cc
@@ -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;
}