summaryrefslogtreecommitdiff
path: root/sql/item_strfunc.cc
diff options
context:
space:
mode:
authorGeorgi Kodinov <joro@sun.com>2009-03-09 20:57:03 +0200
committerGeorgi Kodinov <joro@sun.com>2009-03-09 20:57:03 +0200
commit3033ea85a20fb5afd4cab8a816ff72fd4d784778 (patch)
tree00e35a3675d99f6ecdede0e62ce24e379186aed2 /sql/item_strfunc.cc
parent6a99d1d4fbb6a05734f8c2cc6305a0d61efdc883 (diff)
downloadmariadb-git-3033ea85a20fb5afd4cab8a816ff72fd4d784778.tar.gz
Bug #42434: license of mysys MD5 implementation is not GPL-compatible
Took the Xfree implementation (based on the same rewrite as the NDB one) and added it instead of the current implementation. Added a macro to make the calls to MD5 more streamlined. client/mysqlmanager-pwgen.c: Bug #42434: changed to call the macro include/my_md5.h: Bug #42434: use the Xfree implementation mysys/md5.c: Bug #42434: use the Xfree implementation sql/item_strfunc.cc: Bug #42434: changed to call the macro sql/table.cc: Bug #42434: changed to call the macro tools/mysqlmanager.c: Bug #42434: changed to call the macro
Diffstat (limited to 'sql/item_strfunc.cc')
-rw-r--r--sql/item_strfunc.cc5
1 files changed, 1 insertions, 4 deletions
diff --git a/sql/item_strfunc.cc b/sql/item_strfunc.cc
index 34f974042a5..158eb8e3bb0 100644
--- a/sql/item_strfunc.cc
+++ b/sql/item_strfunc.cc
@@ -101,13 +101,10 @@ String *Item_func_md5::val_str(String *str)
str->set_charset(&my_charset_bin);
if (sptr)
{
- my_MD5_CTX context;
unsigned char digest[16];
null_value=0;
- my_MD5Init (&context);
- my_MD5Update (&context,(unsigned char *) sptr->ptr(), sptr->length());
- my_MD5Final (digest, &context);
+ MY_MD5_HASH(digest,(unsigned char *) sptr->ptr(), sptr->length());
if (str->alloc(32)) // Ensure that memory is free
{
null_value=1;