List:Commits« Previous MessageNext Message »
From:Magnus Blåudd Date:August 3 2010 7:25am
Subject:bzr commit into mysql-5.1-telco-7.0 branch (magnus.blaudd:3657)
View as plain text  
#At file:///home/msvensson/mysql/7.0/ based on revid:magnus.blaudd@stripped

 3657 Magnus Blåudd	2010-08-03
      ndb
       - remove the unused NDB_SET_VERSION hack in order to reduce
         version code complexity

    modified:
      storage/ndb/src/common/util/version.c
      storage/ndb/src/kernel/main.cpp
      storage/ndb/src/ndbapi/ClusterMgr.cpp
=== modified file 'storage/ndb/src/common/util/version.c'
--- a/storage/ndb/src/common/util/version.c	2010-08-02 14:48:31 +0000
+++ b/storage/ndb/src/common/util/version.c	2010-08-03 07:25:36 +0000
@@ -91,24 +91,6 @@ struct NdbUpGradeCompatible {
   UG_MatchType matchType;
 };
 
-#define HAVE_NDB_SETVERSION
-#ifdef HAVE_NDB_SETVERSION
-Uint32 ndbOwnVersionTesting = 0;
-void
-ndbSetOwnVersion() {
-  char buf[256];
-  if (NdbEnv_GetEnv("NDB_SETVERSION", buf, sizeof(buf))) {
-    Uint32 _v1,_v2,_v3;
-    if (sscanf(buf, "%u.%u.%u", &_v1, &_v2, &_v3) == 3) {
-      ndbOwnVersionTesting = MAKE_VERSION(_v1,_v2,_v3);
-      ndbout_c("Testing: Version set to 0x%x",  ndbOwnVersionTesting);
-    }
-  }
-}
-#else
-void ndbSetOwnVersion() {}
-#endif
-
 struct NdbUpGradeCompatible ndbCompatibleTable_full[] = {
   { MAKE_VERSION(7,0,NDB_VERSION_BUILD), MAKE_VERSION(7,0,0), UG_Range },
   { MAKE_VERSION(7,0,NDB_VERSION_BUILD), MAKE_VERSION(6,4,0), UG_Range },
@@ -160,14 +142,7 @@ void ndbPrintVersion()
 Uint32
 ndbGetOwnVersion()
 {
-#ifdef HAVE_NDB_SETVERSION
-  if (ndbOwnVersionTesting == 0)
-    return NDB_VERSION_D;
-  else
-    return ndbOwnVersionTesting;
-#else
   return NDB_VERSION_D;
-#endif
 }
 
 int

=== modified file 'storage/ndb/src/kernel/main.cpp'
--- a/storage/ndb/src/kernel/main.cpp	2010-06-16 08:40:20 +0000
+++ b/storage/ndb/src/kernel/main.cpp	2010-08-03 07:25:36 +0000
@@ -104,8 +104,6 @@ static void usage()
   ndb_usage(short_usage_sub, load_default_groups, my_long_options);
 }
 
-extern "C" void ndbSetOwnVersion();
-
 extern int g_ndb_init_need_monotonic;
 
 /**
@@ -120,8 +118,6 @@ real_main(int argc, char** argv)
   g_ndb_init_need_monotonic = 1;
   NDB_INIT(argv[0]);
 
-  ndbSetOwnVersion();
-
   // Print to stdout/console
   g_eventLogger->createConsoleHandler();
 

=== modified file 'storage/ndb/src/ndbapi/ClusterMgr.cpp'
--- a/storage/ndb/src/ndbapi/ClusterMgr.cpp	2010-02-04 15:18:17 +0000
+++ b/storage/ndb/src/ndbapi/ClusterMgr.cpp	2010-08-03 07:25:36 +0000
@@ -52,9 +52,6 @@ runClusterMgr_C(void * me)
   return NULL;
 }
 
-extern "C" {
-  void ndbSetOwnVersion();
-}
 ClusterMgr::ClusterMgr(TransporterFacade & _facade):
   theStop(0),
   theFacade(_facade),
@@ -68,7 +65,6 @@ ClusterMgr::ClusterMgr(TransporterFacade
   m_cluster_state(CS_waiting_for_clean_cache)
 {
   DBUG_ENTER("ClusterMgr::ClusterMgr");
-  ndbSetOwnVersion();
   clusterMgrThreadMutex = NdbMutex_Create();
   waitForHBCond= NdbCondition_Create();
   m_auto_reconnect = -1;

Attachment: [text/bzr-bundle] bzr/magnus.blaudd@sun.com-20100803072536-i75359bzulk0nfim.bundle
Thread
bzr commit into mysql-5.1-telco-7.0 branch (magnus.blaudd:3657) Magnus Blåudd3 Aug