3715 magnus.blaudd@stripped 2012-03-06
Cherry pick patch mysys/sha1.h dependency removal
modified:
storage/ndb/src/kernel/blocks/pgman.cpp
storage/ndb/src/ndbapi/NdbOperationSearch.cpp
storage/ndb/src/ndbapi/ndb_cluster_connection.cpp
3714 magnus.blaudd@stripped 2012-03-06
ndbcluster
- remove setting of timestamp columns since that is now done by the server
- include the new global_threads.h file to be able to add ndb_binlog thread
to "threads"
modified:
sql/ha_ndbcluster.cc
sql/ha_ndbcluster_binlog.cc
=== modified file 'storage/ndb/src/kernel/blocks/pgman.cpp'
--- a/storage/ndb/src/kernel/blocks/pgman.cpp 2011-07-05 12:46:07 +0000
+++ b/storage/ndb/src/kernel/blocks/pgman.cpp 2012-03-06 17:34:33 +0000
@@ -27,7 +27,7 @@
#include <dbtup/Dbtup.hpp>
#include <DebuggerNames.hpp>
-#include <sha1.h>
+#include <md5_hash.hpp>
/**
* Requests that make page dirty
@@ -2629,21 +2629,13 @@ operator<<(NdbOut& out, Ptr<Pgman::Page_
if (pe.m_state & Pgman::Page_entry::MAPPED) {
Ptr<GlobalPage> gptr;
pe.m_this->m_global_page_pool.getPtr(gptr, pe.m_real_page_i);
- SHA1_CONTEXT c;
- uint8 digest[SHA1_HASH_SIZE];
- mysql_sha1_reset(&c);
- mysql_sha1_input(&c, (uchar*)gptr.p->data, sizeof(gptr.p->data));
- mysql_sha1_result(&c, digest);
- char buf[100];
- int i;
- for (i = 0; i < 20; i++) {
- const char* const hexdigit = "0123456789abcdef";
- uint8 x = digest[i];
- buf[2*i + 0] = hexdigit[x >> 4];
- buf[2*i + 1] = hexdigit[x & 0xF];
- }
- buf[2*i] = 0;
- out << " sha1=" << buf;
+ Uint32 hash_result[4];
+ /* NOTE: Assuming "data" is 64 bit aligned as required by 'md5_hash' */
+ md5_hash(hash_result,
+ (Uint64*)gptr.p->data, sizeof(gptr.p->data)/sizeof(Uint32));
+ out.print(" md5=%08x%08x%08x%08x",
+ hash_result[0], hash_result[1],
+ hash_result[2], hash_result[3]);
}
#endif
}
=== modified file 'storage/ndb/src/ndbapi/NdbOperationSearch.cpp'
--- a/storage/ndb/src/ndbapi/NdbOperationSearch.cpp 2011-07-05 12:46:07 +0000
+++ b/storage/ndb/src/ndbapi/NdbOperationSearch.cpp 2012-03-06 17:34:33 +0000
@@ -34,7 +34,6 @@ Adjust: 971022 UABMNST First version
#include <AttributeHeader.hpp>
#include <signaldata/TcKeyReq.hpp>
#include <signaldata/KeyInfo.hpp>
-#include <md5_hash.hpp>
/******************************************************************************
CondIdType equal(const char* anAttrName, char* aValue, Uint32 aVarKeylen);
=== modified file 'storage/ndb/src/ndbapi/ndb_cluster_connection.cpp'
--- a/storage/ndb/src/ndbapi/ndb_cluster_connection.cpp 2011-07-05 12:46:07 +0000
+++ b/storage/ndb/src/ndbapi/ndb_cluster_connection.cpp 2012-03-06 17:34:33 +0000
@@ -29,7 +29,6 @@
#include <ndb_version.h>
#include <mgmapi_debug.h>
#include <mgmapi_internal.h>
-#include <md5_hash.hpp>
#include "NdbImpl.hpp"
#include "NdbDictionaryImpl.hpp"
No bundle (reason: useless for push emails).
| Thread |
|---|
| • bzr push into mysql-trunk branch (magnus.blaudd:3714 to 3715) | magnus.blaudd | 8 Mar |