From 3033ea85a20fb5afd4cab8a816ff72fd4d784778 Mon Sep 17 00:00:00 2001 From: Georgi Kodinov Date: Mon, 9 Mar 2009 20:57:03 +0200 Subject: 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 --- sql/item_strfunc.cc | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'sql/item_strfunc.cc') 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; -- cgit v1.2.1