List:Commits« Previous MessageNext Message »
From:John David Duncan Date:April 18 2011 11:21pm
Subject:bzr push into mysql-5.1-telco-7.2 branch (john.duncan:4158 to 4160)
View as plain text  
 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
 4159 John David Duncan	2011-04-18
      sandbox script: ability to stop memcached only and start memcached with options

    modified:
      storage/ndb/memcache/sandbox.sh.in
 4158 John David Duncan	2011-04-09
      New "sandbox.sh" script to quickly demonstate cluster & memcached; fixed metadata.sql; revised README.
      Fixed bugs so that memcapable tests all pass, for both "db-only" and "cache-only" policies.

    added:
      storage/ndb/memcache/sandbox.sh.in
    modified:
      storage/ndb/memcache/Makefile.am
      storage/ndb/memcache/README
      storage/ndb/memcache/include/Configuration.h
      storage/ndb/memcache/scripts/metadata.sql
      storage/ndb/memcache/src/Configuration.cc
      storage/ndb/memcache/src/ndb_engine.c
      storage/ndb/memcache/src/ndb_worker.cc
      storage/ndb/memcache/src/schedulers/Flex.cc
      storage/ndb/memcache/src/schedulers/Flex_cluster.cc
      storage/ndb/memcache/src/schedulers/Stockholm.cc
      storage/ndb/ndb_configure.m4
=== 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/memcache/sandbox.sh.in'
--- a/storage/ndb/memcache/sandbox.sh.in	2011-04-09 07:36:24 +0000
+++ b/storage/ndb/memcache/sandbox.sh.in	2011-04-18 20:08:02 +0000
@@ -113,7 +113,7 @@ load_metadata() {
 start_memcached() {
   $MEMCACHE_BASE/bin/memcached -d -v \
     -P $HOME_BASE/sandbox/memcached.pid \
-    -E $MEMCACHE_BASE/lib/ndb_engine.so
+    -E $MEMCACHE_BASE/lib/ndb_engine.so $1 $2
 }
 
 stop_memcached() {
@@ -142,6 +142,8 @@ final_message() {
 
 if test "$1" = "stop" 
  then 
+   test "$2" = "memcached"  &&   stop_memcached   &&  exit
+
    mysqld_is_running        &&   stop_mysqld
    memcached_is_running     &&   stop_memcached
    mgm_server_is_running    &&   stop_mgm_server
@@ -159,7 +161,7 @@ if test "$1" = "stop" 
   
   test -d sandbox/data/ndbmemcache    ||  load_metadata
   
-  memcached_is_running                ||  start_memcached  
+  memcached_is_running                ||  start_memcached
 
   final_message
 fi

=== 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++) {

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-5.1-telco-7.2 branch (john.duncan:4158 to 4160) John David Duncan19 Apr