List:Internals« Previous MessageNext Message »
From:jonas.oreland Date:July 25 2005 10:42am
Subject:bk commit into 4.1 tree (joreland:1.2335)
View as plain text  
Below is the list of changes that have just been committed into a local
4.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
  1.2335 05/07/25 12:42:32 joreland@stripped +3 -0
  Merge mysql.com:/home/jonas/src/mysql-4.1
  into  mysql.com:/home/jonas/src/mysql-4.1-push

  ndb/src/mgmsrv/ConfigInfo.hpp
    1.10 05/07/25 12:42:28 joreland@stripped +0 -0
    Auto merged

  ndb/src/mgmsrv/ConfigInfo.cpp
    1.59 05/07/25 12:42:28 joreland@stripped +0 -0
    Auto merged

  ndb/src/mgmapi/mgmapi.cpp
    1.29 05/07/25 12:42:28 joreland@stripped +0 -0
    Auto merged

# 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:	joreland
# Host:	eel.(none)
# Root:	/home/jonas/src/mysql-4.1-push/RESYNC

--- 1.58/ndb/src/mgmsrv/ConfigInfo.cpp	2005-07-19 16:34:54 +02:00
+++ 1.59/ndb/src/mgmsrv/ConfigInfo.cpp	2005-07-25 12:42:28 +02:00
@@ -915,7 +915,7 @@
     STR_VALUE(MAX_INT_RNIL) },
 
   {
-    KEY_INTERNAL,
+    CFG_DB_LCP_DISC_PAGES_TUP_SR,
     "NoOfDiskPagesToDiskDuringRestartTUP",
     DB_TOKEN,
     "?",
@@ -927,7 +927,7 @@
     STR_VALUE(MAX_INT_RNIL) },
 
   {
-    KEY_INTERNAL,
+    CFG_DB_LCP_DISC_PAGES_TUP,
     "NoOfDiskPagesToDiskAfterRestartTUP",
     DB_TOKEN,
     "?",
@@ -939,7 +939,7 @@
     STR_VALUE(MAX_INT_RNIL) },
 
   {
-    KEY_INTERNAL,
+    CFG_DB_LCP_DISC_PAGES_ACC_SR,
     "NoOfDiskPagesToDiskDuringRestartACC",
     DB_TOKEN,
     "?",
@@ -951,7 +951,7 @@
     STR_VALUE(MAX_INT_RNIL) },
 
   {
-    KEY_INTERNAL,
+    CFG_DB_LCP_DISC_PAGES_ACC,
     "NoOfDiskPagesToDiskAfterRestartACC",
     DB_TOKEN,
     "?",

--- 1.9/ndb/src/mgmsrv/ConfigInfo.hpp	2005-07-19 16:34:54 +02:00
+++ 1.10/ndb/src/mgmsrv/ConfigInfo.hpp	2005-07-25 12:42:28 +02:00
@@ -127,14 +127,14 @@
   Properties               m_info;
   Properties               m_systemDefaults;
 
-  static const ParamInfo   m_ParamInfo[];
-  static const int         m_NoOfParams;
-  
   static const AliasPair   m_sectionNameAliases[];
   static const char*       m_sectionNames[];
   static const int         m_noOfSectionNames;
 
 public:
+  static const ParamInfo   m_ParamInfo[];
+  static const int         m_NoOfParams;
+  
   static const SectionRule m_SectionRules[];
   static const ConfigRule  m_ConfigRules[];
   static const int         m_NoOfRules;

--- 1.28/ndb/src/mgmapi/mgmapi.cpp	2005-07-14 18:07:55 +02:00
+++ 1.29/ndb/src/mgmapi/mgmapi.cpp	2005-07-25 12:42:28 +02:00
@@ -100,6 +100,7 @@
 #ifdef MGMAPI_LOG
   FILE* logfile;
 #endif
+  FILE *errstream;
 };
 
 #define SET_ERROR(h, e, s) setError(h, e, __LINE__, s)
@@ -153,6 +154,7 @@
   h->read_timeout    = 50000;
   h->write_timeout   = 100;
   h->cfg_i           = 0;
+  h->errstream       = stdout;
 
   strncpy(h->last_error_desc, "No error", NDB_MGM_MAX_ERR_DESC_SIZE);
 
@@ -213,6 +215,13 @@
   DBUG_VOID_RETURN;
 }
 
+extern "C" 
+void
+ndb_mgm_set_error_stream(NdbMgmHandle handle, FILE * file)
+{
+  handle->errstream = file;
+}
+
 /*****************************************************************************
  * Error handling
  *****************************************************************************/
@@ -382,8 +391,8 @@
       break;
     if (verbose > 0) {
       char buf[1024];
-      ndbout_c("Unable to connect with connect string: %s",
-	       cfg.makeConnectString(buf,sizeof(buf)));
+      fprintf(handle->errstream, "Unable to connect with connect string: %s\n",
+	      cfg.makeConnectString(buf,sizeof(buf)));
       verbose= -1;
     }
     if (no_retries == 0) {
@@ -392,32 +401,35 @@
 	       "Unable to connect with connect string: %s",
 	       cfg.makeConnectString(buf,sizeof(buf)));
       if (verbose == -2)
-	ndbout << ", failed." << endl;
+	fprintf(handle->errstream, ", failed.\n");
       return -1;
     }
     if (verbose == -1) {
-      ndbout << "Retrying every " << retry_delay_in_seconds << " seconds";
+      fprintf(handle->errstream, "Retrying every %d seconds", 
+	      retry_delay_in_seconds);
       if (no_retries > 0)
-	ndbout << ". Attempts left:";
+	fprintf(handle->errstream, ". Attempts left:");
       else
-	ndbout << ", until connected.";;	
-      ndbout << flush;
+	fprintf(handle->errstream, ", until connected.");
+      fflush(handle->errstream);
       verbose= -2;
     }
     if (no_retries > 0) {
       if (verbose == -2) {
-	ndbout << " " << no_retries;
-	ndbout << flush;
+	fprintf(handle->errstream, " %d", no_retries);
+	fflush(handle->errstream);
       }
       no_retries--;
     }
     NdbSleep_SecSleep(retry_delay_in_seconds);
   }
   if (verbose == -2)
-    ndbout << endl;
-
+  {
+    fprintf(handle->errstream, "\n");
+    fflush(handle->errstream);
+  }
   handle->cfg_i = i;
-
+  
   handle->socket    = sockfd;
   handle->connected = 1;
 
@@ -469,7 +481,9 @@
   for(int i = 0; i<no_of_type_values; i++)
     if(strcmp(type, type_values[i].str) == 0)
       return type_values[i].value;
-
+    else if(strcmp(type, type_values[i].alias) == 0)
+      return type_values[i].value;
+  
   return NDB_MGM_NODE_TYPE_UNKNOWN;
 }
 
@@ -1664,28 +1678,28 @@
   do {
     const char * buf;
     if(!prop->get("result", &buf) || strcmp(buf, "Ok") != 0){
-      ndbout_c("ERROR Message: %s\n", buf);
+      fprintf(handle->errstream, "ERROR Message: %s\n\n", buf);
       break;
     }
 
     buf = "<Unspecified>";
     if(!prop->get("Content-Type", &buf) || 
        strcmp(buf, "ndbconfig/octet-stream") != 0){
-      ndbout_c("Unhandled response type: %s", buf);
+      fprintf(handle->errstream, "Unhandled response type: %s\n", buf);
       break;
     }
 
     buf = "<Unspecified>";
     if(!prop->get("Content-Transfer-Encoding", &buf) 
        || strcmp(buf, "base64") != 0){
-      ndbout_c("Unhandled encoding: %s", buf);
+      fprintf(handle->errstream, "Unhandled encoding: %s\n", buf);
       break;
     }
 
     buf = "<Content-Length Unspecified>";
     Uint32 len = 0;
     if(!prop->get("Content-Length", &len)){
-      ndbout_c("Invalid response: %s\n", buf);
+      fprintf(handle->errstream, "Invalid response: %s\n\n", buf);
       break;
     }
 
@@ -1710,14 +1724,14 @@
     const int res = base64_decode(buf64, len-1, tmp);
     delete[] buf64; 
     if(res != 0){
-      ndbout_c("Failed to decode buffer");
+      fprintf(handle->errstream, "Failed to decode buffer\n");
       break;
     }
 
     ConfigValuesFactory cvf;
     const int res2 = cvf.unpack(tmp);
     if(!res2){
-      ndbout_c("Failed to unpack buffer");
+      fprintf(handle->errstream, "Failed to unpack buffer\n");
       break;
     }
 
@@ -1821,7 +1835,7 @@
     }
     Uint32 _nodeid;
     if(!prop->get("nodeid", &_nodeid) != 0){
-      ndbout_c("ERROR Message: <nodeid Unspecified>\n");
+      fprintf(handle->errstream, "ERROR Message: <nodeid Unspecified>\n");
       break;
     }
     nodeid= _nodeid;
@@ -1897,7 +1911,7 @@
   do {
     const char * buf;
     if(!prop->get("result", &buf) || strcmp(buf, "Ok") != 0){
-      ndbout_c("ERROR Message: %s\n", buf);
+      fprintf(handle->errstream, "ERROR Message: %s\n", buf);
       break;
     }
     res= 0;
@@ -1940,7 +1954,7 @@
   do {
     const char * buf;
     if(!prop->get("result", &buf) || strcmp(buf, "Ok") != 0){
-      ndbout_c("ERROR Message: %s\n", buf);
+      fprintf(handle->errstream, "ERROR Message: %s\n", buf);
       break;
     }
     res= 0;
@@ -1983,7 +1997,7 @@
   do {
     const char * buf;
     if(!prop->get("result", &buf) || strcmp(buf, "Ok") != 0){
-      ndbout_c("ERROR Message: %s\n", buf);
+      fprintf(handle->errstream, "ERROR Message: %s\n", buf);
       break;
     }
     res= 0;
@@ -2020,7 +2034,7 @@
   do {
     const char * buf;
     if(!prop->get("result", &buf) || strcmp(buf, "Ok") != 0){
-      ndbout_c("ERROR Message: %s\n", buf);
+      fprintf(handle->errstream, "ERROR Message: %s\n", buf);
       break;
     }
     if (purged) {
Thread
bk commit into 4.1 tree (joreland:1.2335)jonas.oreland25 Jul