mirror of
https://github.com/MariaDB/server.git
synced 2026-04-30 04:05:32 +02:00
merge of bug 42434 to 5.1-bugteam
This commit is contained in:
commit
f79cb0de91
4 changed files with 290 additions and 377 deletions
|
|
@ -105,13 +105,10 @@ String *Item_func_md5::val_str(String *str)
|
|||
str->set_charset(&my_charset_bin);
|
||||
if (sptr)
|
||||
{
|
||||
my_MD5_CTX context;
|
||||
uchar digest[16];
|
||||
|
||||
null_value=0;
|
||||
my_MD5Init (&context);
|
||||
my_MD5Update (&context,(uchar *) sptr->ptr(), sptr->length());
|
||||
my_MD5Final (digest, &context);
|
||||
MY_MD5_HASH(digest,(uchar *) sptr->ptr(), sptr->length());
|
||||
if (str->alloc(32)) // Ensure that memory is free
|
||||
{
|
||||
null_value=1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue