#At file:///Users/jdd/bzr-repo/cluster-7.2-labs-memcached/ based on revid:john.duncan@stripped
4160 John David Duncan 2011-04-18
Add Ndb Custom Data ptr
modified:
storage/ndb/include/ndbapi/Ndb.hpp
storage/ndb/src/ndbapi/Ndb.cpp
storage/ndb/src/ndbapi/NdbImpl.hpp
storage/ndb/src/ndbapi/Ndbinit.cpp
=== modified file 'storage/ndb/include/ndbapi/Ndb.hpp'
--- a/storage/ndb/include/ndbapi/Ndb.hpp 2011-02-09 14:59:39 +0000
+++ b/storage/ndb/include/ndbapi/Ndb.hpp 2011-04-18 23:20:12 +0000
@@ -1802,6 +1802,10 @@ public:
Uint64 getClientStat(Uint32 id) const;
const char* getClientStatName(Uint32 id) const;
+
+ /* Get/Set per-Ndb custom data pointer */
+ void setCustomData(void*);
+ void* getCustomData() const;
#endif
private:
=== modified file 'storage/ndb/src/ndbapi/Ndb.cpp'
--- a/storage/ndb/src/ndbapi/Ndb.cpp 2011-02-10 07:55:45 +0000
+++ b/storage/ndb/src/ndbapi/Ndb.cpp 2011-04-18 23:20:12 +0000
@@ -2242,3 +2242,15 @@ Ndb::getClientStatName(Uint32 id) const
return NULL;
}
+
+void
+Ndb::setCustomData(void* _customDataPtr)
+{
+ theImpl->customDataPtr = _customDataPtr;
+}
+
+void*
+Ndb::getCustomData() const
+{
+ return theImpl->customDataPtr;
+}
=== modified file 'storage/ndb/src/ndbapi/NdbImpl.hpp'
--- a/storage/ndb/src/ndbapi/NdbImpl.hpp 2011-02-09 14:59:39 +0000
+++ b/storage/ndb/src/ndbapi/NdbImpl.hpp 2011-04-18 23:20:12 +0000
@@ -125,6 +125,7 @@ public:
BaseString m_systemPrefix; // Buffer for preformatted for <sys>/<def>/
+ void* customDataPtr;
Uint64 clientStats[ Ndb::NumClientStatistics ];
inline void incClientStat(const Ndb::ClientStatistics stat, const Uint64 inc) {
@@ -598,5 +599,4 @@ NdbImpl::sendFragmentedSignal(NdbApiSign
}
return -1;
}
-
#endif
=== modified file 'storage/ndb/src/ndbapi/Ndbinit.cpp'
--- a/storage/ndb/src/ndbapi/Ndbinit.cpp 2011-02-04 17:52:38 +0000
+++ b/storage/ndb/src/ndbapi/Ndbinit.cpp 2011-04-18 23:20:12 +0000
@@ -192,7 +192,8 @@ NdbImpl::NdbImpl(Ndb_cluster_connection
1024,1024),
theNoOfDBnodes(0),
theWaiter(this),
- m_ev_op(0)
+ m_ev_op(0),
+ customDataPtr(0)
{
int i;
for (i = 0; i < MAX_NDB_NODES; i++) {
Attachment: [text/bzr-bundle] bzr/john.duncan@oracle.com-20110418232012-8ncbjdandkyqeeyj.bundle
| Thread |
|---|
| • bzr commit into mysql-5.1-telco-7.2 branch (john.duncan:4160) | John David Duncan | 19 Apr |