summaryrefslogtreecommitdiff
path: root/sql/table.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/table.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/table.cc')
-rw-r--r--sql/table.cc5
1 files changed, 1 insertions, 4 deletions
diff --git a/sql/table.cc b/sql/table.cc
index 3abd2c24c94..6dc1f3ab99e 100644
--- a/sql/table.cc
+++ b/sql/table.cc
@@ -1792,11 +1792,8 @@ void st_table::reset_item_list(List<Item> *item_list) const
void TABLE_LIST::calc_md5(char *buffer)
{
- my_MD5_CTX context;
uchar digest[16];
- my_MD5Init(&context);
- my_MD5Update(&context,(uchar *) query.str, query.length);
- my_MD5Final(digest, &context);
+ MY_MD5_HASH(digest, (uchar *) query.str, query.length);
sprintf((char *) buffer,
"%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x",
digest[0], digest[1], digest[2], digest[3],