List:Commits« Previous MessageNext Message »
From:jonas Date:December 19 2006 1:02pm
Subject:bk commit into 5.1 tree (jonas:1.2368)
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of jonas. When jonas does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet@stripped, 2006-12-19 13:01:59+01:00, jonas@stripped +26 -0
  ndb - make new clone with separate version no for ndb

  cluster_change_hist.txt@stripped, 2006-12-19 11:46:38+01:00, jonas@stripped +20 -0
    BitKeeper file /home/jonas/src/51-cluster/cluster_change_hist.txt

  cluster_change_hist.txt@stripped, 2006-12-19 11:46:38+01:00, jonas@stripped +0 -0

  config/ac-macros/ha_ndbcluster.m4@stripped, 2006-12-19 13:01:56+01:00,
jonas@stripped +15 -9
    version-split

  configure.in@stripped, 2006-12-19 13:01:56+01:00, jonas@stripped +6 -1
    version-split

  storage/ndb/include/debugger/EventLogger.hpp@stripped, 2006-12-19 13:01:56+01:00,
jonas@stripped +4 -3
    version-split

  storage/ndb/include/kernel/NodeInfo.hpp@stripped, 2006-12-19 13:01:56+01:00,
jonas@stripped +5 -5
    version-split

  storage/ndb/include/kernel/signaldata/ApiRegSignalData.hpp@stripped, 2006-12-19
13:01:56+01:00, jonas@stripped +6 -3
    version-split

  storage/ndb/include/kernel/signaldata/ApiVersion.hpp@stripped, 2006-12-19 13:01:56+01:00,
jonas@stripped +4 -4
    version-split

  storage/ndb/include/kernel/signaldata/CmRegSignalData.hpp@stripped, 2006-12-19
13:01:56+01:00, jonas@stripped +10 -5
    version-split

  storage/ndb/include/mgmapi/mgmapi.h@stripped, 2006-12-19 13:01:56+01:00,
jonas@stripped +4 -1
    version-split

  storage/ndb/include/ndb_version.h.in@stripped, 2006-12-19 13:01:56+01:00,
jonas@stripped +9 -7
    version-split

  storage/ndb/include/util/ndb_opts.h@stripped, 2006-12-19 13:01:57+01:00,
jonas@stripped +1 -1
    version-split

  storage/ndb/include/util/version.h@stripped, 2006-12-19 13:01:57+01:00,
jonas@stripped +2 -1
    version-split

  storage/ndb/src/common/debugger/EventLogger.cpp@stripped, 2006-12-19 13:01:57+01:00,
jonas@stripped +35 -21
    version-split

  storage/ndb/src/common/util/version.c@stripped, 2006-12-19 13:01:57+01:00,
jonas@stripped +25 -12
    version-split

  storage/ndb/src/kernel/blocks/cmvmi/Cmvmi.cpp@stripped, 2006-12-19 13:01:57+01:00,
jonas@stripped +8 -5
    version-split

  storage/ndb/src/kernel/blocks/diskpage.cpp@stripped, 2006-12-19 13:01:57+01:00,
jonas@stripped +1 -1
    version-split

  storage/ndb/src/kernel/blocks/ndbcntr/NdbcntrMain.cpp@stripped, 2006-12-19 13:01:57+01:00,
jonas@stripped +4 -2
    version-split

  storage/ndb/src/kernel/blocks/qmgr/QmgrMain.cpp@stripped, 2006-12-19 13:01:57+01:00,
jonas@stripped +40 -4
    version-split

  storage/ndb/src/kernel/blocks/restore.cpp@stripped, 2006-12-19 13:01:57+01:00,
jonas@stripped +1 -1
    version-split

  storage/ndb/src/mgmapi/mgmapi.cpp@stripped, 2006-12-19 13:01:57+01:00,
jonas@stripped +8 -6
    version-split

  storage/ndb/src/mgmclient/CommandInterpreter.cpp@stripped, 2006-12-19 13:01:57+01:00,
jonas@stripped +6 -4
    version-split

  storage/ndb/src/mgmsrv/MgmtSrvr.cpp@stripped, 2006-12-19 13:01:57+01:00,
jonas@stripped +27 -11
    version-split

  storage/ndb/src/mgmsrv/MgmtSrvr.hpp@stripped, 2006-12-19 13:01:57+01:00,
jonas@stripped +6 -3
    version-split

  storage/ndb/src/mgmsrv/Services.cpp@stripped, 2006-12-19 13:01:57+01:00,
jonas@stripped +9 -4
    version-split

  storage/ndb/src/ndbapi/ClusterMgr.cpp@stripped, 2006-12-19 13:01:57+01:00,
jonas@stripped +7 -1
    version-split

  storage/ndb/tools/restore/restore_main.cpp@stripped, 2006-12-19 13:01:57+01:00,
jonas@stripped +3 -3
    version-split

# This is a BitKeeper patch.  What follows are the unified diffs for the
# set of deltas contained in the patch.  The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User:	jonas
# Host:	perch.ndb.mysql.com
# Root:	/home/jonas/src/51-telco

--- 1.404/configure.in	2006-12-19 13:02:05 +01:00
+++ 1.405/configure.in	2006-12-19 13:02:05 +01:00
@@ -7,8 +7,13 @@
 AC_CANONICAL_SYSTEM
 # The Docs Makefile.am parses this line!
 # remember to also change ndb version below and update version.c in ndb
-AM_INIT_AUTOMAKE(mysql, 5.1.15-beta)
+AM_INIT_AUTOMAKE(mysql, 5.1.14-ndb-6.1.0)
 AM_CONFIG_HEADER(config.h)
+
+NDB_VERSION_MAJOR=6
+NDB_VERSION_MINOR=1
+NDB_VERSION_BUILD=0
+NDB_VERSION_STATUS="-beta"
 
 PROTOCOL_VERSION=10
 DOT_FRM_VERSION=6

--- 1.21/config/ac-macros/ha_ndbcluster.m4	2006-12-19 13:02:05 +01:00
+++ 1.22/config/ac-macros/ha_ndbcluster.m4	2006-12-19 13:02:05 +01:00
@@ -2,15 +2,10 @@
 dnl Macro: MYSQL_CHECK_NDBCLUSTER
 dnl ---------------------------------------------------------------------------
 
-NDB_VERSION_MAJOR=`echo $VERSION | cut -d. -f1`
-NDB_VERSION_MINOR=`echo $VERSION | cut -d. -f2`
-NDB_VERSION_BUILD=`echo $VERSION | cut -d. -f3 | cut -d- -f1`
-NDB_VERSION_STATUS=`echo $VERSION | cut -d- -f2`
-# if there was now -suffix, $NDB_VERSION_STATUS will be the same as $VERSION
-if test "$NDB_VERSION_STATUS" = "$VERSION"
-then
-  NDB_VERSION_STATUS=""
-fi
+NDB_MYSQL_VERSION_MAJOR=`echo $VERSION | cut -d. -f1`
+NDB_MYSQL_VERSION_MINOR=`echo $VERSION | cut -d. -f2`
+NDB_MYSQL_VERSION_BUILD=`echo $VERSION | cut -d. -f3 | cut -d- -f1`
+
 TEST_NDBCLUSTER=""
 
 dnl for build ndb docs
@@ -293,6 +288,17 @@
                      [NDB build version])
   AC_DEFINE_UNQUOTED([NDB_VERSION_STATUS], ["$NDB_VERSION_STATUS"],
                      [NDB status version])
+
+
+  AC_SUBST(NDB_MYSQL_VERSION_MAJOR)
+  AC_SUBST(NDB_MYSQL_VERSION_MINOR)
+  AC_SUBST(NDB_MYSQL_VERSION_BUILD)
+  AC_DEFINE_UNQUOTED([NDB_MYSQL_VERSION_MAJOR], [$NDB_MYSQL_VERSION_MAJOR],
+                     [MySQL major version])
+  AC_DEFINE_UNQUOTED([NDB_MYSQL_VERSION_MINOR], [$NDB_MYSQL_VERSION_MINOR],
+                     [MySQL minor version])
+  AC_DEFINE_UNQUOTED([NDB_MYSQL_VERSION_BUILD], [$NDB_MYSQL_VERSION_BUILD],
+                     [MySQL build version])
 
   AC_SUBST(ndbcluster_includes)
   AC_SUBST(ndbcluster_libs)
--- New file ---
+++ cluster_change_hist.txt	06/12/19 11:46:38

---------------------------------------------------

mysql-5.1.14-ndb-6.1.0 

  bug#25059
  bug#25090
  bug#19956
  bug#19956
  bug#24949
  bug#25001
  bug#24664
  bug#24917
  bug#24914
  bug#21948
  bug#21948 & bug#17605
  bug#22773
  bug#24664
  bug#24166



--- 1.1/storage/ndb/src/kernel/blocks/diskpage.cpp	2006-12-19 13:02:05 +01:00
+++ 1.2/storage/ndb/src/kernel/blocks/diskpage.cpp	2006-12-19 13:02:05 +01:00
@@ -35,7 +35,7 @@
   char buf[256];
   out << "page size:   " << obj.m_page_size << endl;
   out << "ndb version: " << obj.m_ndb_version << ", " <<
-    getVersionString(obj.m_ndb_version, 0, buf, sizeof(buf)) << endl;
+    getVersionString(obj.m_ndb_version, 0, 0, buf, sizeof(buf)) << endl;
   out << "ndb node id: " << obj.m_node_id << endl;
   out << "file type:   " << obj.m_file_type << endl;
   out << "time:        " << obj.m_time << ", " 

--- 1.11/storage/ndb/src/kernel/blocks/restore.cpp	2006-12-19 13:02:05 +01:00
+++ 1.12/storage/ndb/src/kernel/blocks/restore.cpp	2006-12-19 13:02:05 +01:00
@@ -1257,7 +1257,7 @@
   {
     char buf[255];
     char verbuf[255];
-    getVersionString(file_version, 0, verbuf, sizeof(verbuf));
+    getVersionString(file_version, 0, 0, verbuf, sizeof(verbuf));
     BaseString::snprintf(buf, sizeof(buf),
 			 "Unsupported version of LCP files found on disk, "
 			 " found: %s", verbuf);

--- 1.12/storage/ndb/include/ndb_version.h.in	2006-12-19 13:02:05 +01:00
+++ 1.13/storage/ndb/include/ndb_version.h.in	2006-12-19 13:02:05 +01:00
@@ -20,21 +20,20 @@
 #include <ndb_global.h>
 #include <version.h>
 
-/* NDB build version */
-#define NDB_VERSION_BUILD @NDB_VERSION_BUILD@
-
-/* NDB major version */
 #define NDB_VERSION_MAJOR @NDB_VERSION_MAJOR@
-
-/* NDB minor version */
 #define NDB_VERSION_MINOR @NDB_VERSION_MINOR@
+#define NDB_VERSION_BUILD @NDB_VERSION_BUILD@
 
 /* NDB status version */
 #define NDB_VERSION_STATUS "@NDB_VERSION_STATUS@"
 
+#define NDB_MYSQL_VERSION_MAJOR @NDB_MYSQL_VERSION_MAJOR@
+#define NDB_MYSQL_VERSION_MINOR @NDB_MYSQL_VERSION_MINOR@
+#define NDB_MYSQL_VERSION_BUILD @NDB_MYSQL_VERSION_BUILD@
 
 #define MAKE_VERSION(A,B,C) (((A) << 16) | ((B) << 8)  | ((C) << 0))
 
+#define NDB_MYSQL_VERSION_D MAKE_VERSION(NDB_MYSQL_VERSION_MAJOR,
NDB_MYSQL_VERSION_MINOR, NDB_MYSQL_VERSION_BUILD)
 #define NDB_VERSION_D MAKE_VERSION(NDB_VERSION_MAJOR, NDB_VERSION_MINOR,
NDB_VERSION_BUILD)
 #define NDB_VERSION_STRING_BUF_SZ 100
 #ifdef __cplusplus
@@ -43,7 +42,8 @@
 extern
 #endif
 char ndb_version_string_buf[NDB_VERSION_STRING_BUF_SZ];
-#define NDB_VERSION_STRING (getVersionString(NDB_VERSION, NDB_VERSION_STATUS, \
+#define NDB_VERSION_STRING (getVersionString(NDB_VERSION, NDB_MYSQL_VERSION_D,\
+					     NDB_VERSION_STATUS, \
                                              ndb_version_string_buf, \
                                              sizeof(ndb_version_string_buf)))
 
@@ -71,6 +71,8 @@
 #define NDBD_UPDATE_FRAG_DIST_KEY_51 MAKE_VERSION(5,1,12)
 
 #define NDBD_QMGR_SINGLEUSER_VERSION_5 MAKE_VERSION(5,0,25)
+
+#define NDBD_SPLIT_VERSION MAKE_VERSION(6,1,0)
 
 #endif
  

--- 1.12/storage/ndb/include/debugger/EventLogger.hpp	2006-12-19 13:02:05 +01:00
+++ 1.13/storage/ndb/include/debugger/EventLogger.hpp	2006-12-19 13:02:05 +01:00
@@ -38,7 +38,7 @@
    * threshold - is in range [0-15]
    * severity  - DEBUG to ALERT (Type of log message)
    */  
-  typedef void (* EventTextFunction)(char *,size_t,const Uint32*);
+  typedef void (* EventTextFunction)(char *,size_t,const Uint32*, Uint32 len);
 
   struct EventRepLogLevelMatrix {
     Ndb_logevent_type       eventType;
@@ -132,7 +132,7 @@
    * @param theData the event data.
    * @param nodeId the node id of event origin.
    */
-  virtual void log(int, const Uint32*, NodeId = 0,const class LogLevel * = 0);
+  virtual void log(int, const Uint32*, Uint32 len, NodeId = 0,const class LogLevel * =
0);
 
   
   /**
@@ -145,7 +145,8 @@
    */
   static const char* getText(char * dst, size_t dst_len,
 			     EventTextFunction textF,
-			     const Uint32* theData, NodeId nodeId = 0);
+			     const Uint32* theData, Uint32 len, 
+			     NodeId nodeId = 0);
   
   /**
    * Returns the log level that is used to filter an event. The event will not

--- 1.5/storage/ndb/include/kernel/NodeInfo.hpp	2006-12-19 13:02:05 +01:00
+++ 1.6/storage/ndb/include/kernel/NodeInfo.hpp	2006-12-19 13:02:05 +01:00
@@ -35,8 +35,8 @@
   };
   NodeType getType() const;
   
-  Uint32 m_version;       ///< Node version
-  Uint32 m_signalVersion; ///< Signal version
+  Uint32 m_version;       ///< Ndb version
+  Uint32 m_mysql_version; ///< MySQL version
   Uint32 m_type;          ///< Node type
   Uint32 m_connectCount;  ///< No of times connected
   bool   m_connected;     ///< Node is connected
@@ -49,7 +49,7 @@
 inline
 NodeInfo::NodeInfo(){
   m_version = 0;
-  m_signalVersion = 0;
+  m_mysql_version = 0;
   m_type = INVALID;
   m_connectCount = 0;
   m_heartbeat_cnt= 0;
@@ -83,8 +83,8 @@
     break;
   }
 
-  ndbout << " version: " << info.m_version
-	 << " sig. version; " << info.m_signalVersion
+  ndbout << " ndb version: " << info.m_version
+	 << " mysql version; " << info.m_mysql_version
 	 << " connect count: " << info.m_connectCount
 	 << "]";
   return ndbout;

--- 1.4/storage/ndb/include/kernel/signaldata/ApiRegSignalData.hpp	2006-12-19 13:02:05
+01:00
+++ 1.5/storage/ndb/include/kernel/signaldata/ApiRegSignalData.hpp	2006-12-19 13:02:05
+01:00
@@ -31,11 +31,12 @@
   friend class Qmgr;
 
 public:
-  STATIC_CONST( SignalLength = 2 );
+  STATIC_CONST( SignalLength = 3 );
 
 private:
   Uint32 ref;
   Uint32 version; // Version of API node
+  Uint32 mysql_version;
 };
 
 /**
@@ -53,7 +54,7 @@
   friend class ClusterMgr;
 
 public:
-  STATIC_CONST( SignalLength = 3 );
+  STATIC_CONST( SignalLength = 4 );
   
   enum ErrorCode {
     WrongType = 1,
@@ -63,6 +64,7 @@
   Uint32 ref; // Qmgr ref
   Uint32 version; // Version of NDB node
   Uint32 errorCode;
+  Uint32 mysql_version;
 };
 
 /**
@@ -80,12 +82,13 @@
   friend class ClusterMgr;
 
 public:
-  STATIC_CONST( SignalLength = 3 + NodeState::DataLength );
+  STATIC_CONST( SignalLength = 4 + NodeState::DataLength );
 private:
   
   Uint32 qmgrRef;
   Uint32 version; // Version of NDB node
   Uint32 apiHeartbeatFrequency;
+  Uint32 mysql_version;
   NodeState nodeState;
 };
 

--- 1.3/storage/ndb/include/kernel/signaldata/ApiVersion.hpp	2006-12-19 13:02:05 +01:00
+++ 1.4/storage/ndb/include/kernel/signaldata/ApiVersion.hpp	2006-12-19 13:02:05 +01:00
@@ -28,12 +28,11 @@
    */
   friend class Qmgr;  
 public:
-  STATIC_CONST( SignalLength = 3 );
+  STATIC_CONST( SignalLength = 4 );
   Uint32 senderRef; 
   Uint32 nodeId; //api node id
   Uint32 version; // Version of API node
-
-  
+  Uint32 mysql_version; // MySQL version
 };
 
 
@@ -49,11 +48,12 @@
    */
   friend class MgmtSrv;  
 public:
-  STATIC_CONST( SignalLength = 4 );
+  STATIC_CONST( SignalLength = 5 );
   Uint32 senderRef; 
   Uint32 nodeId; //api node id
   Uint32 version; // Version of API node
   Uint32 inet_addr;
+  Uint32 mysql_version; // MySQL version
 };
 
 #endif

--- 1.4/storage/ndb/include/kernel/signaldata/CmRegSignalData.hpp	2006-12-19 13:02:05
+01:00
+++ 1.5/storage/ndb/include/kernel/signaldata/CmRegSignalData.hpp	2006-12-19 13:02:05
+01:00
@@ -30,12 +30,13 @@
   friend class Qmgr;
   
 public:
-  STATIC_CONST( SignalLength = 5 + NdbNodeBitmask::Size );
+  STATIC_CONST( SignalLength = 6 + NdbNodeBitmask::Size );
 private:
   
   Uint32 blockRef;
   Uint32 nodeId;
   Uint32 version;    // See ndb_version.h
+  Uint32 mysql_version;
 
   Uint32 start_type; // As specified by cmd-line or mgm, NodeState::StartType
   Uint32 latest_gci; // 0 means no fs
@@ -53,12 +54,13 @@
   friend class Qmgr;
   
 public:
-  STATIC_CONST( SignalLength = 4 + NdbNodeBitmask::Size );
+  STATIC_CONST( SignalLength = 5 + NdbNodeBitmask::Size );
 private:
   
   Uint32 presidentBlockRef;
   Uint32 presidentNodeId;
   Uint32 presidentVersion;
+  Uint32 presidentMysqlVersion;
 
   /**
    * The dynamic id that the node reciving this signal has
@@ -123,7 +125,7 @@
   friend class Qmgr;
   
 public:
-  STATIC_CONST( SignalLength = 3 );
+  STATIC_CONST( SignalLength = 4 );
   
 private:
   enum RequestType {
@@ -135,6 +137,7 @@
   Uint32 requestType;
   Uint32 startingNodeId;
   Uint32 startingVersion;
+  Uint32 startingMysqlVersion;
 };
 
 class CmAckAdd {
@@ -159,7 +162,7 @@
   friend class Qmgr;
   
 public:
-  STATIC_CONST( SignalLength = 3 );
+  STATIC_CONST( SignalLength = 4 );
   
 private:
   /**
@@ -168,6 +171,7 @@
   Uint32 nodeId;
   Uint32 dynamicId;
   Uint32 version;
+  Uint32 mysql_version;
 };
 
 class CmNodeInfoRef {
@@ -195,12 +199,13 @@
   friend class Qmgr;
   
 public:
-  STATIC_CONST( SignalLength = 3 );
+  STATIC_CONST( SignalLength = 4 );
   
 private:
   Uint32 nodeId;
   Uint32 dynamicId;
   Uint32 version;
+  Uint32 mysql_version;
 };
 
 #endif

--- 1.59/storage/ndb/include/mgmapi/mgmapi.h	2006-12-19 13:02:05 +01:00
+++ 1.60/storage/ndb/include/mgmapi/mgmapi.h	2006-12-19 13:02:05 +01:00
@@ -355,8 +355,11 @@
 			 sizeof("000.000.000.000")+1
 #endif
     ];
-  };
 
+    /** MySQL version number */
+    int mysql_version;
+  };
+  
   /**
    *   State of all nodes in the cluster; returned from 
    *   ndb_mgm_get_status()

--- 1.5/storage/ndb/include/util/version.h	2006-12-19 13:02:05 +01:00
+++ 1.6/storage/ndb/include/util/version.h	2006-12-19 13:02:05 +01:00
@@ -30,7 +30,8 @@
 
   Uint32 makeVersion(Uint32 major, Uint32 minor, Uint32 build);
 
-  const char* getVersionString(Uint32 version, const char * status,
+  const char* getVersionString(Uint32 version, Uint32 mysql_version,
+			       const char * status,
 			       char *buf, unsigned sz);
   
   void ndbPrintVersion();

--- 1.30/storage/ndb/src/common/debugger/EventLogger.cpp	2006-12-19 13:02:05 +01:00
+++ 1.31/storage/ndb/src/common/debugger/EventLogger.cpp	2006-12-19 13:02:05 +01:00
@@ -23,6 +23,7 @@
 #include <signaldata/ArbitSignalData.hpp>
 #include <NodeState.hpp>
 #include <version.h>
+#include <ndb_version.h>
 
 #include <ndbd_exit_codes.h>
 
@@ -34,7 +35,7 @@
   
 }
 
-#define QQQQ char *m_text, size_t m_text_len, const Uint32* theData
+#define QQQQ char *m_text, size_t m_text_len, const Uint32* theData, Uint32 len
 
 void getTextConnected(QQQQ) {
   BaseString::snprintf(m_text, m_text_len, 
@@ -42,13 +43,17 @@
 		       theData[1]);
 }
 void getTextConnectedApiVersion(QQQQ) {
+  char tmp[100];
+  Uint32 mysql_version = theData[3];
+  if (theData[2] < NDBD_SPLIT_VERSION)
+  mysql_version = 0;
   BaseString::snprintf(m_text, m_text_len, 
-		       "Node %u: API version %d.%d.%d",
+		       "Node %u: API %s",
 		       theData[1],
-		       getMajor(theData[2]),
-		       getMinor(theData[2]),
-		       getBuild(theData[2]));
+		       getVersionString(theData[2], mysql_version, 0,
+					tmp, sizeof(tmp)));
 }
+
 void getTextDisconnected(QQQQ) {
   BaseString::snprintf(m_text, m_text_len, 
 		       "Node %u Disconnected", 
@@ -74,11 +79,15 @@
   //-----------------------------------------------------------------------
   // Start of NDB has been initiated.
   //-----------------------------------------------------------------------
-  BaseString::snprintf(m_text, m_text_len, 
-		       "Start initiated (version %d.%d.%d)", 
-		       getMajor(theData[1]),
-		       getMinor(theData[1]),
-		       getBuild(theData[1]));
+
+  char tmp[100];
+  Uint32 mysql_version = theData[2];
+  if (theData[1] < NDBD_SPLIT_VERSION)
+    mysql_version = 0;
+  BaseString::snprintf(m_text, m_text_len, 
+		       "Start initiated (%s)", 
+		       getVersionString(theData[1], mysql_version, 0,
+					tmp, sizeof(tmp)));
 }
 void getTextNDBStopStarted(QQQQ) {
   BaseString::snprintf(m_text, m_text_len,
@@ -143,12 +152,17 @@
   //-----------------------------------------------------------------------
   // Start of NDB has been completed.
   //-----------------------------------------------------------------------
-  BaseString::snprintf(m_text, m_text_len, 
-		       "Started (version %d.%d.%d)", 
-		       getMajor(theData[1]),
-		       getMinor(theData[1]),
-		       getBuild(theData[1]));
+
+  char tmp[100];
+  Uint32 mysql_version = theData[2];
+  if (theData[1] < NDBD_SPLIT_VERSION)
+    mysql_version = 0;
+  BaseString::snprintf(m_text, m_text_len, 
+		       "Started (%s)", 
+		       getVersionString(theData[1], mysql_version, 0,
+					tmp, sizeof(tmp)));
 }
+
 void getTextSTTORRYRecieved(QQQQ) {
   //-----------------------------------------------------------------------
   // STTORRY recevied after restart finished.
@@ -533,7 +547,7 @@
 		       theData[2]);
 }
 void getTextTransporterWarning(QQQQ) {
-  getTextTransporterError(m_text, m_text_len, theData);
+  getTextTransporterError(m_text, m_text_len, theData, len);
 }
 void getTextMissedHeartbeat(QQQQ) {
   //-----------------------------------------------------------------------
@@ -982,7 +996,7 @@
 const char*
 EventLogger::getText(char * dst, size_t dst_len,
 		     EventTextFunction textF,
-		     const Uint32* theData, NodeId nodeId )
+		     const Uint32* theData, Uint32 len, NodeId nodeId )
 {
   int pos= 0;
   if (nodeId != 0)
@@ -991,13 +1005,13 @@
     pos= strlen(dst);
   }
   if (dst_len-pos > 0)
-    textF(dst+pos,dst_len-pos,theData);
+    textF(dst+pos, dst_len-pos, theData, len);
   return dst;
 }
 
 void 
-EventLogger::log(int eventType, const Uint32* theData, NodeId nodeId,
-		 const LogLevel* ll)
+EventLogger::log(int eventType, const Uint32* theData, Uint32 len,
+		 NodeId nodeId, const LogLevel* ll)
 {
   Uint32 threshold = 0;
   Logger::LoggerLevel severity = Logger::LL_WARNING;
@@ -1017,7 +1031,7 @@
     DBUG_PRINT("info",("m_logLevel.getLogLevel=%d", m_logLevel.getLogLevel(cat)));
 
   if (threshold <= set){
-    getText(log_text,sizeof(log_text),textF,theData,nodeId);
+    getText(log_text, sizeof(log_text), textF, theData, len, nodeId);
 
     switch (severity){
     case Logger::LL_ALERT:

--- 1.25/storage/ndb/src/common/util/version.c	2006-12-19 13:02:05 +01:00
+++ 1.26/storage/ndb/src/common/util/version.c	2006-12-19 13:02:05 +01:00
@@ -39,22 +39,35 @@
 }
 
 char ndb_version_string_buf[NDB_VERSION_STRING_BUF_SZ];
-const char * getVersionString(Uint32 version, const char * status,
+const char * getVersionString(Uint32 version, Uint32 mysql_version, 
+			      const char * status,
 			      char *buf, unsigned sz)
 {
+  char tmp[100];
   if (status && status[0] != 0)
-	  basestring_snprintf(buf, sz,
-	     "Version %d.%d.%d (%s)",
-	     getMajor(version),
-	     getMinor(version),
-	     getBuild(version),
-	     status);
+    basestring_snprintf(tmp, sizeof(tmp), "%s", status);
   else
-    basestring_snprintf(buf, sz,
-	     "Version %d.%d.%d",
-	     getMajor(version),
-	     getMinor(version),
-	     getBuild(version));
+    tmp[0] = 0;
+
+  if (mysql_version)
+  {
+    basestring_snprintf(buf, sz, "mysql-%d.%d.%d ndb-%d.%d.%d%s",
+			getMajor(mysql_version),
+			getMinor(mysql_version),
+			getBuild(mysql_version),
+			getMajor(version),
+			getMinor(version),
+			getBuild(version),
+			tmp);
+  }
+  else
+  {
+    basestring_snprintf(buf, sz, "ndb-%d.%d.%d%s",
+			getMajor(version),
+			getMinor(version),
+			getBuild(version),
+			tmp);
+  }
   return buf;
 }
 

--- 1.50/storage/ndb/tools/restore/restore_main.cpp	2006-12-19 13:02:05 +01:00
+++ 1.51/storage/ndb/tools/restore/restore_main.cpp	2006-12-19 13:02:05 +01:00
@@ -486,7 +486,7 @@
   
   char buf[NDB_VERSION_STRING_BUF_SZ];
   info << "Ndb version in backup files: " 
-	 <<  getVersionString(version, 0, buf, sizeof(buf)) << endl;
+	 <<  getVersionString(version, 0, 0, buf, sizeof(buf)) << endl;
 
   /**
    * check wheater we can restore the backup (right version).
@@ -496,9 +496,9 @@
   if (version >= MAKE_VERSION(5,1,3) && version <= MAKE_VERSION(5,1,9))
   {
     err << "Restore program incompatible with backup versions between "
-        << getVersionString(MAKE_VERSION(5,1,3), 0, buf, sizeof(buf))
+        << getVersionString(MAKE_VERSION(5,1,3), 0, 0, buf, sizeof(buf))
         << " and "
-        << getVersionString(MAKE_VERSION(5,1,9), 0, buf, sizeof(buf))
+        << getVersionString(MAKE_VERSION(5,1,9), 0, 0, buf, sizeof(buf))
         << endl;
     exitHandler(NDBT_FAILED);
   }

--- 1.37/storage/ndb/src/kernel/blocks/cmvmi/Cmvmi.cpp	2006-12-19 13:02:05 +01:00
+++ 1.38/storage/ndb/src/kernel/blocks/cmvmi/Cmvmi.cpp	2006-12-19 13:02:05 +01:00
@@ -129,6 +129,7 @@
 
   setNodeInfo(getOwnNodeId()).m_connected = true;
   setNodeInfo(getOwnNodeId()).m_version = ndbGetOwnVersion();
+  setNodeInfo(getOwnNodeId()).m_mysql_version = NDB_MYSQL_VERSION_D;
 }
 
 Cmvmi::~Cmvmi()
@@ -228,8 +229,9 @@
   }
 
   // Print the event info
-  g_eventLogger.log(eventReport->getEventType(), signal->theData);
-
+  g_eventLogger.log(eventReport->getEventType(), 
+		    signal->theData, signal->getLength());
+  
   return;
 }//execEVENT_REP()
 
@@ -505,8 +507,9 @@
   signal->theData[0] = NDB_LE_ConnectedApiVersion;
   signal->theData[1] = tStartingNode;
   signal->theData[2] = getNodeInfo(tStartingNode).m_version;
-
-  sendSignal(CMVMI_REF, GSN_EVENT_REP, signal, 3, JBB);
+  signal->theData[3] = getNodeInfo(tStartingNode).m_mysql_version;
+  
+  sendSignal(CMVMI_REF, GSN_EVENT_REP, signal, 4, JBB);
   //-----------------------------------------------------
   
   jamEntry();
@@ -556,7 +559,7 @@
   const NodeInfo::NodeType type = (NodeInfo::NodeType)getNodeInfo(hostId).m_type;
   ndbrequire(type != NodeInfo::INVALID);
   globalData.m_nodeInfo[hostId].m_version = 0;
-  globalData.m_nodeInfo[hostId].m_signalVersion = 0;
+  globalData.m_nodeInfo[hostId].m_mysql_version = 0;
   
   if(type == NodeInfo::DB || globalData.theStartLevel >= NodeState::SL_STARTED){
     jam();

--- 1.41/storage/ndb/src/kernel/blocks/ndbcntr/NdbcntrMain.cpp	2006-12-19 13:02:05 +01:00
+++ 1.42/storage/ndb/src/kernel/blocks/ndbcntr/NdbcntrMain.cpp	2006-12-19 13:02:05 +01:00
@@ -2785,7 +2785,8 @@
 void Ndbcntr::Missra::execSTART_ORD(Signal* signal){
   signal->theData[0] = NDB_LE_NDBStartStarted;
   signal->theData[1] = NDB_VERSION;
-  cntr.sendSignal(CMVMI_REF, GSN_EVENT_REP, signal, 2, JBB);
+  signal->theData[2] = NDB_MYSQL_VERSION_D;
+  cntr.sendSignal(CMVMI_REF, GSN_EVENT_REP, signal, 3, JBB);
 
   currentBlockIndex = 0;
   sendNextREAD_CONFIG_REQ(signal);
@@ -2928,7 +2929,8 @@
 
   signal->theData[0] = NDB_LE_NDBStartCompleted;
   signal->theData[1] = NDB_VERSION;
-  cntr.sendSignal(CMVMI_REF, GSN_EVENT_REP, signal, 2, JBB);
+  signal->theData[2] = NDB_MYSQL_VERSION_D;
+  cntr.sendSignal(CMVMI_REF, GSN_EVENT_REP, signal, 3, JBB);
   
   NodeState newState(NodeState::SL_STARTED);
   cntr.updateNodeState(signal, newState);

--- 1.42/storage/ndb/src/kernel/blocks/qmgr/QmgrMain.cpp	2006-12-19 13:02:05 +01:00
+++ 1.43/storage/ndb/src/kernel/blocks/qmgr/QmgrMain.cpp	2006-12-19 13:02:05 +01:00
@@ -535,6 +535,7 @@
   req->blockRef = reference();
   req->nodeId = getOwnNodeId();
   req->version = NDB_VERSION;
+  req->mysql_version = NDB_MYSQL_VERSION_D;
   req->latest_gci = c_start.m_latest_gci;
   req->start_type = c_start.m_start_type;
   c_start.m_skip_nodes.copyto(NdbNodeBitmask::Size, req->skip_nodes);
@@ -604,6 +605,7 @@
   CmRegReq * const cmRegReq = (CmRegReq *)&signal->theData[0];
   const BlockReference Tblockref = cmRegReq->blockRef;
   const Uint32 startingVersion = cmRegReq->version;
+  Uint32 startingMysqlVersion = cmRegReq->mysql_version;
   addNodePtr.i = cmRegReq->nodeId;
   Uint32 gci = 1;
   Uint32 start_type = ~0;
@@ -617,6 +619,11 @@
     skip_nodes.assign(NdbNodeBitmask::Size, cmRegReq->skip_nodes);
   }
   
+  if (startingVersion < NDBD_SPLIT_VERSION)
+  {
+    startingMysqlVersion = 0;
+  }
+  
   if (creadyDistCom == ZFALSE) {
     jam();
     /* NOT READY FOR DISTRIBUTED COMMUNICATION.*/
@@ -765,6 +772,7 @@
    */
   UintR TdynId = ++c_maxDynamicId;
   setNodeInfo(addNodePtr.i).m_version = startingVersion;
+  setNodeInfo(addNodePtr.i).m_mysql_version = startingMysqlVersion;
   addNodePtr.p->ndynamicId = TdynId;
   
   /**
@@ -774,6 +782,7 @@
   cmRegConf->presidentBlockRef = reference();
   cmRegConf->presidentNodeId   = getOwnNodeId();
   cmRegConf->presidentVersion  = getNodeInfo(getOwnNodeId()).m_version;
+  cmRegConf->presidentMysqlVersion = getNodeInfo(getOwnNodeId()).m_mysql_version;
   cmRegConf->dynamicId         = TdynId;
   c_clusterNodes.copyto(NdbNodeBitmask::Size, cmRegConf->allNdbNodes);
   sendSignal(Tblockref, GSN_CM_REGCONF, signal, 
@@ -792,6 +801,7 @@
   cmAdd->requestType = CmAdd::Prepare;
   cmAdd->startingNodeId = addNodePtr.i; 
   cmAdd->startingVersion = startingVersion;
+  cmAdd->startingMysqlVersion = startingMysqlVersion;
   sendSignal(rg, GSN_CM_ADD, signal, CmAdd::SignalLength, JBA);
   DEBUG_START2(GSN_CM_ADD, rg, "Prepare");
   
@@ -989,6 +999,7 @@
   req->nodeId = getOwnNodeId();
   req->dynamicId = self->ndynamicId;
   req->version = getNodeInfo(getOwnNodeId()).m_version;
+  req->mysql_version = getNodeInfo(getOwnNodeId()).m_mysql_version;
   const Uint32 ref = calcQmgrBlockRef(nodeId);
   sendSignal(ref,GSN_CM_NODEINFOREQ, signal, CmNodeInfoReq::SignalLength, JBB);
   DEBUG_START(GSN_CM_NODEINFOREQ, nodeId, "");
@@ -1486,6 +1497,12 @@
   const Uint32 nodeId = conf->nodeId;
   const Uint32 dynamicId = conf->dynamicId;
   const Uint32 version = conf->version;
+  Uint32 mysql_version = conf->mysql_version;
+  if (version < NDBD_SPLIT_VERSION)
+  {
+    jam();
+    mysql_version = 0;
+  }
 
   NodeRecPtr nodePtr;  
   nodePtr.i = getOwnNodeId();
@@ -1503,6 +1520,7 @@
   replyNodePtr.p->ndynamicId = dynamicId;
   replyNodePtr.p->blockRef = signal->getSendersBlockRef();
   setNodeInfo(replyNodePtr.i).m_version = version;
+  setNodeInfo(replyNodePtr.i).m_mysql_version = mysql_version;
 
   if(!c_start.m_nodes.done()){
     jam();
@@ -1554,6 +1572,12 @@
   addNodePtr.p->ndynamicId = req->dynamicId;
   addNodePtr.p->blockRef = signal->getSendersBlockRef();
   setNodeInfo(addNodePtr.i).m_version = req->version;
+
+  Uint32 mysql_version = req->mysql_version;
+  if (req->version < NDBD_SPLIT_VERSION)
+    mysql_version = 0;
+  
+  setNodeInfo(addNodePtr.i).m_mysql_version = mysql_version;
   c_maxDynamicId = req->dynamicId;
 
   cmAddPrepare(signal, addNodePtr, nodePtr.p);
@@ -1608,6 +1632,7 @@
   conf->nodeId = getOwnNodeId();
   conf->dynamicId = self->ndynamicId;
   conf->version = getNodeInfo(getOwnNodeId()).m_version;
+  conf->mysql_version = getNodeInfo(getOwnNodeId()).m_mysql_version;
   sendSignal(nodePtr.p->blockRef, GSN_CM_NODEINFOCONF, signal,
 	     CmNodeInfoConf::SignalLength, JBB);
   DEBUG_START(GSN_CM_NODEINFOCONF, refToNode(nodePtr.p->blockRef), "");
@@ -1836,6 +1861,7 @@
     cmAdd->requestType = CmAdd::AddCommit;
     cmAdd->startingNodeId = addNodePtr.i; 
     cmAdd->startingVersion = getNodeInfo(addNodePtr.i).m_version;
+    cmAdd->startingMysqlVersion = getNodeInfo(addNodePtr.i).m_mysql_version;
     NodeReceiverGroup rg(QMGR, c_clusterNodes);
     sendSignal(rg, GSN_CM_ADD, signal, CmAdd::SignalLength, JBA);
     DEBUG_START2(GSN_CM_ADD, rg, "AddCommit");
@@ -1856,7 +1882,7 @@
     cmAdd->requestType = CmAdd::CommitNew;
     cmAdd->startingNodeId = addNodePtr.i; 
     cmAdd->startingVersion = getNodeInfo(addNodePtr.i).m_version;
-    
+    cmAdd->startingMysqlVersion = getNodeInfo(addNodePtr.i).m_mysql_version;
     sendSignal(calcQmgrBlockRef(addNodePtr.i), GSN_CM_ADD, signal, 
 	       CmAdd::SignalLength, JBA);
     DEBUG_START(GSN_CM_ADD, addNodePtr.i, "CommitNew");
@@ -2118,6 +2144,7 @@
     execARBIT_CFG(signal);
   }
   setNodeInfo(getOwnNodeId()).m_version = NDB_VERSION;
+  setNodeInfo(getOwnNodeId()).m_mysql_version = NDB_MYSQL_VERSION_D;
 }//Qmgr::initData()
 
 
@@ -2667,6 +2694,10 @@
   const Uint32 version = req->version;
   const BlockReference ref = req->ref;
   
+  Uint32 mysql_version = req->mysql_version;
+  if (version < NDBD_SPLIT_VERSION)
+    mysql_version = 0;
+
   NodeRecPtr apiNodePtr;
   apiNodePtr.i = refToNode(ref);
   ptrCheckGuard(apiNodePtr, MAX_NODES, nodeRec);
@@ -2699,7 +2730,9 @@
 	      "incompatible with %s",
 	      type == NodeInfo::API ? "api or mysqld" : "management server",
 	      apiNodePtr.i,
-	      getVersionString(version,"",buf,sizeof(buf)),
+	      getVersionString(version, mysql_version, 0,
+			       buf, 
+			       sizeof(buf)),
 	      NDB_VERSION_STRING);
     apiNodePtr.p->phase = ZAPI_INACTIVE;
     sendApiRegRef(signal, ref, ApiRegRef::UnsupportedVersion);
@@ -2707,13 +2740,14 @@
   }
 
   setNodeInfo(apiNodePtr.i).m_version = version;
-
+  setNodeInfo(apiNodePtr.i).m_mysql_version = mysql_version;
   setNodeInfo(apiNodePtr.i).m_heartbeat_cnt= 0;
 
   ApiRegConf * const apiRegConf = (ApiRegConf *)&signal->theData[0];
   apiRegConf->qmgrRef = reference();
   apiRegConf->apiHeartbeatFrequency = (chbApiDelay / 10);
   apiRegConf->version = NDB_VERSION;
+  apiRegConf->mysql_version = NDB_MYSQL_VERSION_D;
   NodeState state= apiRegConf->nodeState = getNodeState();
   {
     NodeRecPtr nodePtr;
@@ -2766,7 +2800,8 @@
   ApiVersionConf * conf = (ApiVersionConf *)req;
   if(getNodeInfo(nodeId).m_connected)
   {
-    conf->version =  getNodeInfo(nodeId).m_version;
+    conf->version = getNodeInfo(nodeId).m_version;
+    conf->mysql_version = getNodeInfo(nodeId).m_mysql_version;
     struct in_addr in= globalTransporterRegistry.get_connect_address(nodeId);
     conf->inet_addr= in.s_addr;
   }
@@ -2816,6 +2851,7 @@
   ApiRegRef* ref = (ApiRegRef*)signal->getDataPtrSend();
   ref->ref = reference();
   ref->version = NDB_VERSION;
+  ref->mysql_version = NDB_MYSQL_VERSION_D;
   ref->errorCode = err;
   sendSignal(Tref, GSN_API_REGREF, signal, ApiRegRef::SignalLength, JBB);
 }

--- 1.80/storage/ndb/src/mgmapi/mgmapi.cpp	2006-12-19 13:02:05 +01:00
+++ 1.81/storage/ndb/src/mgmapi/mgmapi.cpp	2006-12-19 13:02:05 +01:00
@@ -724,6 +724,8 @@
     state->node_group = atoi(value);
   } else if(strcmp("version", field) == 0){
     state->version = atoi(value);
+  } else if(strcmp("mysql_version", field) == 0){
+    state->mysql_version = atoi(value);
   } else if(strcmp("connect_count", field) == 0){
     state->connect_count = atoi(value);    
   } else if(strcmp("address", field) == 0){
@@ -1274,13 +1276,13 @@
     MGM_ARG(clusterlog_severity_names[5], Int, Mandatory, ""),
     MGM_ARG(clusterlog_severity_names[6], Int, Mandatory, ""),
   };
-  CHECK_HANDLE(handle, NULL);
-  CHECK_CONNECTED(handle, NULL);
+  CHECK_HANDLE(handle, -1);
+  CHECK_CONNECTED(handle, -1);
 
   Properties args;
   const Properties *reply;
   reply = ndb_mgm_call(handle, getinfo_reply, "get info clusterlog", &args);
-  CHECK_REPLY(reply, NULL);
+  CHECK_REPLY(reply, -1);
   
   for(unsigned int i=0; i < severity_size; i++) {
     reply->get(clusterlog_severity_names[severity[i].category],
&severity[i].value);
@@ -1431,13 +1433,13 @@
     MGM_ARG(clusterlog_names[10], Int, Mandatory, ""),
     MGM_ARG(clusterlog_names[11], Int, Mandatory, ""),
   };
-  CHECK_HANDLE(handle, NULL);
-  CHECK_CONNECTED(handle, NULL);
+  CHECK_HANDLE(handle, -1);
+  CHECK_CONNECTED(handle, -1);
 
   Properties args;
   const Properties *reply;
   reply = ndb_mgm_call(handle, getloglevel_reply, "get cluster loglevel", &args);
-  CHECK_REPLY(reply, NULL);
+  CHECK_REPLY(reply, -1);
 
   for(int i=0; i < loglevel_count; i++) {
     reply->get(clusterlog_names[loglevel[i].category], &loglevel[i].value);

--- 1.79/storage/ndb/src/mgmclient/CommandInterpreter.cpp	2006-12-19 13:02:05 +01:00
+++ 1.80/storage/ndb/src/mgmclient/CommandInterpreter.cpp	2006-12-19 13:02:05 +01:00
@@ -1422,10 +1422,12 @@
 	  ndbout << " ";
 	else
 	  ndbout << "\t@" << hostname;
-	ndbout << "  (Version: "
-	       << getMajor(node_state->version) << "."
-	       << getMinor(node_state->version) << "."
-	       << getBuild(node_state->version);
+
+	char tmp[100];
+	ndbout << "  (" << getVersionString(node_state->version,
+					    node_state->mysql_version,
+					    0,
+					    tmp, sizeof(tmp));
 	if (type == NDB_MGM_NODE_TYPE_NDB) {
 	  if (node_state->node_status != NDB_MGM_NODE_STATUS_STARTED) {
 	    ndbout << ", " << status_string(node_state->node_status);

--- 1.113/storage/ndb/src/mgmsrv/MgmtSrvr.cpp	2006-12-19 13:02:05 +01:00
+++ 1.114/storage/ndb/src/mgmsrv/MgmtSrvr.cpp	2006-12-19 13:02:05 +01:00
@@ -730,9 +730,11 @@
  *****************************************************************************/
 
 int 
-MgmtSrvr::versionNode(int nodeId, Uint32 &version, const char **address)
+MgmtSrvr::versionNode(int nodeId, Uint32 &version, Uint32& mysql_version,
+		      const char **address)
 {
   version= 0;
+  mysql_version = 0;
   if (getOwnNodeId() == nodeId)
   {
     /**
@@ -745,8 +747,9 @@
      * If we don't get an address (i.e. no db nodes),
      * we get the address from the configuration.
      */
-    sendVersionReq(nodeId, version, address);
+    sendVersionReq(nodeId, version, mysql_version, address);
     version= NDB_VERSION;
+    mysql_version = NDB_MYSQL_VERSION_D;
     if(!*address)
     {
       ndb_mgm_configuration_iterator
@@ -766,20 +769,26 @@
   {
     ClusterMgr::Node node= theFacade->theClusterMgr->getNodeInfo(nodeId);
     if(node.connected)
+    {
       version= node.m_info.m_version;
+      mysql_version = node.m_info.m_mysql_version;
+    }
     *address= get_connect_address(nodeId);
   }
   else if (getNodeType(nodeId) == NDB_MGM_NODE_TYPE_API ||
 	   getNodeType(nodeId) == NDB_MGM_NODE_TYPE_MGM)
   {
-    return sendVersionReq(nodeId, version, address);
+    return sendVersionReq(nodeId, version, mysql_version, address);
   }
 
   return 0;
 }
 
 int 
-MgmtSrvr::sendVersionReq(int v_nodeId, Uint32 &version, const char **address)
+MgmtSrvr::sendVersionReq(int v_nodeId, 
+			 Uint32 &version, 
+			 Uint32& mysql_version,
+			 const char **address)
 {
   SignalSender ss(theFacade);
   ss.lock();
@@ -832,6 +841,9 @@
 	CAST_CONSTPTR(ApiVersionConf, signal->getDataPtr());
       assert((int) conf->nodeId == v_nodeId);
       version = conf->version;
+      mysql_version = conf->mysql_version;
+      if (version < NDBD_SPLIT_VERSION)
+	mysql_version = 0;
       struct in_addr in;
       in.s_addr= conf->inet_addr;
       *address= inet_ntoa(in);
@@ -1331,10 +1343,11 @@
     while (s != NDB_MGM_NODE_STATUS_NOT_STARTED && waitTime > 0)
     {
       Uint32 startPhase = 0, version = 0, dynamicId = 0, nodeGroup = 0;
+      Uint32 mysql_version = 0;
       Uint32 connectCount = 0;
       bool system;
       const char *address;
-      status(nodeId, &s, &version, &startPhase, 
+      status(nodeId, &s, &version, &mysql_version, &startPhase, 
              &system, &dynamicId, &nodeGroup, &connectCount,
&address);
       NdbSleep_MilliSleep(100);  
       waitTime = (maxTime - NdbTick_CurrentMillisecond());
@@ -1402,10 +1415,11 @@
 #endif
     while (s != NDB_MGM_NODE_STATUS_NOT_STARTED && waitTime > 0) {
       Uint32 startPhase = 0, version = 0, dynamicId = 0, nodeGroup = 0;
+      Uint32 mysql_version = 0;
       Uint32 connectCount = 0;
       bool system;
       const char *address;
-      status(nodeId, &s, &version, &startPhase, 
+      status(nodeId, &s, &version, &mysql_version, &startPhase, 
 	     &system, &dynamicId, &nodeGroup, &connectCount, &address);
       NdbSleep_MilliSleep(100);  
       waitTime = (maxTime - NdbTick_CurrentMillisecond());
@@ -1484,6 +1498,7 @@
 MgmtSrvr::status(int nodeId, 
                  ndb_mgm_node_status * _status, 
 		 Uint32 * version,
+		 Uint32 * mysql_version,
 		 Uint32 * _phase, 
 		 bool * _system,
 		 Uint32 * dynamic,
@@ -1493,7 +1508,7 @@
 {
   if (getNodeType(nodeId) == NDB_MGM_NODE_TYPE_API ||
       getNodeType(nodeId) == NDB_MGM_NODE_TYPE_MGM) {
-    versionNode(nodeId, *version, address);
+    versionNode(nodeId, *version, *mysql_version, address);
   } else {
     *address= get_connect_address(nodeId);
   }
@@ -1508,6 +1523,7 @@
   
   if (getNodeType(nodeId) == NDB_MGM_NODE_TYPE_NDB) {
     * version = node.m_info.m_version;
+    * mysql_version = node.m_info.m_mysql_version;
   }
 
   * dynamic = node.m_state.dynamicId;
@@ -1888,7 +1904,7 @@
     break;
   case GSN_EVENT_REP:
   {
-    eventReport(signal->getDataPtr());
+    eventReport(signal->getDataPtr(), signal->getLength());
     break;
   }
 
@@ -1929,7 +1945,7 @@
     }
   }
   rep->setNodeId(_ownNodeId);
-  eventReport(theData);
+  eventReport(theData, 1);
   DBUG_VOID_RETURN;
 }
 
@@ -2436,14 +2452,14 @@
 #include "Services.hpp"
 
 void
-MgmtSrvr::eventReport(const Uint32 * theData)
+MgmtSrvr::eventReport(const Uint32 * theData, Uint32 len)
 {
   const EventReport * const eventReport = (EventReport *)&theData[0];
   
   NodeId nodeId = eventReport->getNodeId();
   Ndb_logevent_type type = eventReport->getEventType();
   // Log event
-  g_eventLogger.log(type, theData, nodeId, 
+  g_eventLogger.log(type, theData, len, nodeId, 
 		    &m_event_listner[0].m_logLevel);  
   m_event_listner.log(type, theData, nodeId);
 }

--- 1.49/storage/ndb/src/mgmsrv/MgmtSrvr.hpp	2006-12-19 13:02:05 +01:00
+++ 1.50/storage/ndb/src/mgmsrv/MgmtSrvr.hpp	2006-12-19 13:02:05 +01:00
@@ -216,6 +216,7 @@
   int status(int nodeId,
 	     ndb_mgm_node_status * status,
 	     Uint32 * version,
+	     Uint32 * mysql_version,
 	     Uint32 * phase,
 	     bool * systemShutdown,
 	     Uint32 * dynamicId,
@@ -271,7 +272,8 @@
    *   @param   processId: Id of the DB process to stop
    *   @return  0 if succeeded, otherwise: as stated above, plus:
    */
-  int versionNode(int nodeId, Uint32 &version, const char **address);
+  int versionNode(int nodeId, Uint32 &version, Uint32 &version,
+		  const char **address);
 
   /**
    *   Maintenance on the system
@@ -620,7 +622,7 @@
   /**
    * An event from <i>nodeId</i> has arrived
    */
-  void eventReport(const Uint32 * theData);
+  void eventReport(const Uint32 * theData, Uint32 len);
  
 
   //**************************************************************************
@@ -646,7 +648,8 @@
   char m_local_mgm_connect_string[20];
   class TransporterFacade * theFacade;
 
-  int  sendVersionReq( int processId, Uint32 &version, const char **address);
+  int  sendVersionReq( int processId, Uint32 &version, Uint32& mysql_version,
+		       const char **address);
   int translateStopRef(Uint32 errCode);
   
   bool _isStopThread;

--- 1.82/storage/ndb/src/mgmsrv/Services.cpp	2006-12-19 13:02:05 +01:00
+++ 1.83/storage/ndb/src/mgmsrv/Services.cpp	2006-12-19 13:02:05 +01:00
@@ -734,7 +734,11 @@
   m_output->println("id: %d", NDB_VERSION);
   m_output->println("major: %d", getMajor(NDB_VERSION));
   m_output->println("minor: %d", getMinor(NDB_VERSION));
+  m_output->println("build: %d", getBuild(NDB_VERSION));
   m_output->println("string: %s", NDB_VERSION_STRING);
+  m_output->println("mysql_major: %d", getMajor(NDB_MYSQL_VERSION_D));
+  m_output->println("mysql_minor: %d", getMinor(NDB_MYSQL_VERSION_D));
+  m_output->println("mysql_build: %d", getBuild(NDB_MYSQL_VERSION_D));
   m_output->println("");
 }
 
@@ -1029,13 +1033,13 @@
   while(mgmsrv.getNextNodeId(&nodeId, type)) {
     enum ndb_mgm_node_status status;
     Uint32 startPhase = 0, 
-      version = 0, 
+      version = 0, mysql_version = 0,
       dynamicId = 0, 
       nodeGroup = 0,
       connectCount = 0;
     bool system;
     const char *address= NULL;
-    mgmsrv.status(nodeId, &status, &version, &startPhase,
+    mgmsrv.status(nodeId, &status, &version, &mysql_version, &startPhase,
 		  &system, &dynamicId, &nodeGroup, &connectCount,
 		  &address);
     output->println("node.%d.type: %s",
@@ -1043,8 +1047,9 @@
 		      ndb_mgm_get_node_type_string(type));
     output->println("node.%d.status: %s",
 		      nodeId,
-		      ndb_mgm_get_node_status_string(status));
+		    ndb_mgm_get_node_status_string(status));
     output->println("node.%d.version: %d", nodeId, version);
+    output->println("node.%d.mysql_version: %d", nodeId, mysql_version);
     output->println("node.%d.startphase: %d", nodeId, startPhase);
     output->println("node.%d.dynamic_id: %d", nodeId, dynamicId);
     output->println("node.%d.node_group: %d", nodeId, nodeGroup);
@@ -1730,7 +1735,7 @@
     sscanf(item[i].c_str(), "%u", data+i);
   }
 
-  m_mgmsrv.eventReport(data);
+  m_mgmsrv.eventReport(data, length);
   m_output->println("report event reply");
   m_output->println("result: ok");
   m_output->println("");

--- 1.31/storage/ndb/src/ndbapi/ClusterMgr.cpp	2006-12-19 13:02:05 +01:00
+++ 1.32/storage/ndb/src/ndbapi/ClusterMgr.cpp	2006-12-19 13:02:05 +01:00
@@ -192,6 +192,7 @@
     ApiRegReq * req = CAST_PTR(ApiRegReq, signal.getDataPtrSend());
     req->ref = numberToRef(API_CLUSTERMGR, theFacade.ownId());
     req->version = NDB_VERSION;
+    req->mysql_version = NDB_MYSQL_VERSION_D;
 
     int nodeId= 0;
     for(int i=0;
@@ -224,7 +225,7 @@
   ApiRegReq * req = CAST_PTR(ApiRegReq, signal.getDataPtrSend());
   req->ref = numberToRef(API_CLUSTERMGR, theFacade.ownId());
   req->version = NDB_VERSION;
-
+  req->mysql_version = NDB_MYSQL_VERSION_D;
   
   Uint32 timeSlept = 100;
   Uint64 now = NdbTick_CurrentMillisecond();
@@ -357,6 +358,7 @@
   ApiRegConf * const conf = CAST_PTR(ApiRegConf, signal.getDataPtrSend());
   conf->qmgrRef = numberToRef(API_CLUSTERMGR, theFacade.ownId());
   conf->version = NDB_VERSION;
+  conf->mysql_version = NDB_MYSQL_VERSION_D;
   conf->apiHeartbeatFrequency = node.hbFrequency;
   theFacade.sendSignalUnCond(&signal, nodeId);
 }
@@ -380,6 +382,10 @@
 
   if(node.m_info.m_version != apiRegConf->version){
     node.m_info.m_version = apiRegConf->version;
+    node.m_info.m_mysql_version = apiRegConf->mysql_version;
+    if (node.m_info.m_version < NDBD_SPLIT_VERSION)
+      node.m_info.m_mysql_version = 0;
+        
     if (global_mgmt_server_check == 1)
       node.compatible = ndbCompatible_mgmt_ndb(NDB_VERSION,
 					       node.m_info.m_version);

--- 1.19/storage/ndb/include/util/ndb_opts.h	2006-12-19 13:02:05 +01:00
+++ 1.20/storage/ndb/include/util/ndb_opts.h	2006-12-19 13:02:05 +01:00
@@ -102,7 +102,7 @@
 static void ndb_std_print_version()
 {
   printf("MySQL distrib %s, for %s (%s)\n",
-	 MYSQL_SERVER_VERSION,SYSTEM_TYPE,MACHINE_TYPE);
+	 NDB_VERSION_STRING,SYSTEM_TYPE,MACHINE_TYPE);
 }
 
 static void usage();
Thread
bk commit into 5.1 tree (jonas:1.2368)jonas19 Dec