List:Commits« Previous MessageNext Message »
From:Stewart Smith Date:January 19 2006 8:03am
Subject:bk commit into 5.0 tree (stewart:1.1986)
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of stewart. When stewart 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.1986 06/01/19 19:03:47 stewart@stripped +3 -0
  Merge mysql.com:/home/stewart/Documents/MySQL/4.1/main
  into  mysql.com:/home/stewart/Documents/MySQL/5.0/main

  sql/sql_select.cc
    1.386 06/01/19 19:03:43 stewart@stripped +0 -5
    Auto merged

  ndb/src/mgmsrv/MgmtSrvr.cpp
    1.93 06/01/19 19:03:42 stewart@stripped +0 -0
    Auto merged

  ndb/src/common/logger/Logger.cpp
    1.13 06/01/19 19:03:42 stewart@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:	stewart
# Host:	willster.(none)
# Root:	/home/stewart/Documents/MySQL/5.0/main/RESYNC

--- 1.12/ndb/src/common/logger/Logger.cpp	2005-06-13 19:48:30 +10:00
+++ 1.13/ndb/src/common/logger/Logger.cpp	2006-01-19 19:03:42 +11:00
@@ -167,7 +167,7 @@
 }
 
 bool
-Logger::addHandler(const BaseString &logstring) {
+Logger::addHandler(const BaseString &logstring, int *err, int len, char* errStr) {
   size_t i;
   Vector<BaseString> logdest;
   Vector<LogHandler *>loghandlers;
@@ -200,9 +200,18 @@
       handler = new ConsoleLogHandler();
     
     if(handler == NULL)
+    {
+      snprintf(errStr,len,"Could not create log destination: %s",
+               logdest[i].c_str());
       DBUG_RETURN(false);
+    }
     if(!handler->parseParams(params))
+    {
+      *err= handler->getErrorCode();
+      if(handler->getErrorStr())
+        strncpy(errStr, handler->getErrorStr(), len);
       DBUG_RETURN(false);
+    }
     loghandlers.push_back(handler);
   }
   

--- 1.92/ndb/src/mgmsrv/MgmtSrvr.cpp	2006-01-13 17:40:13 +11:00
+++ 1.93/ndb/src/mgmsrv/MgmtSrvr.cpp	2006-01-19 19:03:42 +11:00
@@ -179,6 +179,8 @@
   }
   
   const char * tmp;
+  char errStr[100];
+  int err= 0;
   BaseString logdest;
   char *clusterLog= NdbConfig_ClusterLogFileName(_ownNodeId);
   NdbAutoPtr<char> tmp_aptr(clusterLog);
@@ -192,9 +194,17 @@
     logdest.assfmt("FILE:filename=%s,maxsize=1000000,maxfiles=6", 
 		   clusterLog);
   }
-  if(!g_eventLogger.addHandler(logdest)) {
+  errStr[0]='\0';
+  if(!g_eventLogger.addHandler(logdest, &err, sizeof(errStr), errStr)) {
     ndbout << "Warning: could not add log destination \""
-	   << logdest.c_str() << "\"" << endl;
+           << logdest.c_str() << "\". Reason: ";
+    if(err)
+      ndbout << strerror(err);
+    if(err && errStr[0]!='\0')
+      ndbout << ", ";
+    if(errStr[0]!='\0')
+      ndbout << errStr;
+    ndbout << endl;
   }
 }
 
Thread
bk commit into 5.0 tree (stewart:1.1986)Stewart Smith19 Jan