MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:David Li Date:September 28 2006 5:51am
Subject:bk commit into 5.1 tree (dli:1.2293) BUG#21519
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of dli. When dli 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-09-28 13:51:01+08:00, dli@stripped +3 -0
  fixed for BUG#21519, added date & time stamps for the messages that will be printed to the mysqld log file.

  storage/ndb/src/common/transporter/OSE_Receiver.cpp@stripped, 2006-09-28 13:50:58+08:00, dli@stripped +6 -6
    added date & time stamps for the messages.

  storage/ndb/src/common/transporter/TCP_Transporter.cpp@stripped, 2006-09-28 13:50:58+08:00, dli@stripped +14 -11
    added date & time stamps for the messages.

  storage/ndb/src/common/transporter/TransporterRegistry.cpp@stripped, 2006-09-28 13:50:58+08:00, dli@stripped +12 -12
    added date & time stamps for the messages.

# 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:	dli
# Host:	dev3-76.dev.cn.tlan
# Root:	/home/dli/mysql/mysql-5.1/mysql-5.1-bug-21519

--- 1.5/storage/ndb/src/common/transporter/OSE_Receiver.cpp	2006-09-28 13:51:09 +08:00
+++ 1.6/storage/ndb/src/common/transporter/OSE_Receiver.cpp	2006-09-28 13:51:09 +08:00
@@ -114,11 +114,11 @@
     if (waitStack[i]->dataSignal.senderNodeId == _nodeId && 
         waitStack[i]->dataSignal.sigId == nextSigId[_nodeId]){
       
-      ndbout_c("INFO: signal popped from waitStack, sigId = %d",
+      g_eventLogger.info("signal popped from waitStack, sigId = %d",
                waitStack[i]->dataSignal.sigId);	   
       
       if(isFull()){
-        ndbout_c("ERROR: receiveBuffer is full");
+        g_eventLogger.error("receiveBuffer is full");
 	reportError(callbackObj, _nodeId, TE_RECEIVE_BUFFER_FULL);
 	return false;
       }
@@ -172,7 +172,7 @@
     waitStack[waitStackCount] = _sig;
     waitStackCount++;
   } else {	    
-    ndbout_c("ERROR: waitStack is full");
+    g_eventLogger.error("waitStack is full");
     reportError(callbackObj, localNodeId, TE_WAIT_STACK_FULL);
   }
 }
@@ -231,14 +231,14 @@
 	} else {
 	  // Signal was not received in correct order
 	  // Check values and put it in the waitStack
-	  ndbout_c("WARNING: sigId out of order,"
+	  g_eventLogger.warning("sigId out of order,"
 		   " currSigId = %d, nextSigId = %d", 
 		   currSigId,  nextSigId[nodeId]);
 	  
 	  if (currSigId < nextSigId[nodeId]){
 	    // Current recieved sigId was smaller than nextSigId
 	    // There is no use to put it in the waitStack
-	    ndbout_c("ERROR: recieved sigId was smaller than nextSigId");
+	    g_eventLogger.error("recieved sigId was smaller than nextSigId");
 	    reportError(callbackObj, nodeId, TE_TOO_SMALL_SIGID);
 	    return false;
 	  }
@@ -246,7 +246,7 @@
 	  if (currSigId > (nextSigId[nodeId] + waitStackSize)){
 	    // Current sigId was larger than nextSigId + size of waitStack
 	    // we can never "save" so many signal's on the stack
-	    ndbout_c("ERROR: currSigId >  (nextSigId + size of waitStack)"); 
+	    g_eventLogger.error("currSigId >  (nextSigId + size of waitStack)"); 
 	    reportError(callbackObj, nodeId, TE_TOO_LARGE_SIGID);
 	    return false;
 	  }

--- 1.11/storage/ndb/src/common/transporter/TCP_Transporter.cpp	2006-09-28 13:51:09 +08:00
+++ 1.12/storage/ndb/src/common/transporter/TCP_Transporter.cpp	2006-09-28 13:51:09 +08:00
@@ -20,6 +20,9 @@
 #include "TCP_Transporter.hpp"
 #include <NdbOut.hpp>
 #include <NdbSleep.h>
+
+#include <EventLogger.hpp>
+extern EventLogger g_eventLogger;
 // End of stuff to be moved
 
 #if defined NDB_OSE || defined NDB_SOFTOSE
@@ -159,14 +162,14 @@
   if (setsockopt(theSocket, SOL_SOCKET, SO_RCVBUF,
                  (char*)&sockOptRcvBufSize, sizeof(sockOptRcvBufSize)) < 0) {
 #ifdef DEBUG_TRANSPORTER
-    ndbout_c("The setsockopt SO_RCVBUF error code = %d", InetErrno);
+    g_eventLogger.error("The setsockopt SO_RCVBUF error code = %d", InetErrno);
 #endif
   }//if
   
   if (setsockopt(theSocket, SOL_SOCKET, SO_SNDBUF,
                  (char*)&sockOptSndBufSize, sizeof(sockOptSndBufSize)) < 0) {
 #ifdef DEBUG_TRANSPORTER
-    ndbout_c("The setsockopt SO_SNDBUF error code = %d", InetErrno);
+    g_eventLogger.error("The setsockopt SO_SNDBUF error code = %d", InetErrno);
 #endif
   }//if
   
@@ -177,7 +180,7 @@
   if (setsockopt(theSocket, IPPROTO_TCP, TCP_NODELAY, 
                  (char*)&sockOptNodelay, sizeof(sockOptNodelay)) < 0) {
 #ifdef DEBUG_TRANSPORTER
-    ndbout_c("The setsockopt TCP_NODELAY error code = %d", InetErrno);
+    g_eventLogger.error("The setsockopt TCP_NODELAY error code = %d", InetErrno);
 #endif
   }//if
 }
@@ -191,7 +194,7 @@
   if(ioctlsocket(socket, FIONBIO, &ul))
   {
 #ifdef DEBUG_TRANSPORTER
-    ndbout_c("Set non-blocking server error3: %d", InetErrno);
+    g_eventLogger.error("Set non-blocking server error3: %d", InetErrno);
 #endif
   }//if
   return true;
@@ -205,13 +208,13 @@
   flags = fcntl(socket, F_GETFL, 0);
   if (flags < 0) {
 #ifdef DEBUG_TRANSPORTER
-    ndbout_c("Set non-blocking server error1: %s", strerror(InetErrno));
+    g_eventLogger.error("Set non-blocking server error1: %s", strerror(InetErrno));
 #endif
   }//if
   flags |= NDB_NONBLOCK;
   if (fcntl(socket, F_SETFL, flags) == -1) {
 #ifdef DEBUG_TRANSPORTER
-    ndbout_c("Set non-blocking server error2: %s", strerror(InetErrno));
+    g_eventLogger.error("Set non-blocking server error2: %s", strerror(InetErrno));
 #endif
   }//if
   return true;
@@ -349,7 +352,7 @@
     } else {
       // Send failed
 #if defined DEBUG_TRANSPORTER
-      ndbout_c("Send Failure(disconnect==%d) to node = %d nBytesSent = %d "
+      g_eventLogger.error("Send Failure(disconnect==%d) to node = %d nBytesSent = %d "
 	       "errno = %d strerror = %s",
 	       DISCONNECT_ERRNO(InetErrno, nBytesSent),
 	       remoteNodeId, nBytesSent, InetErrno, 
@@ -384,11 +387,11 @@
       
       if(receiveBuffer.sizeOfData > receiveBuffer.sizeOfBuffer){
 #ifdef DEBUG_TRANSPORTER
-	ndbout_c("receiveBuffer.sizeOfData(%d) > receiveBuffer.sizeOfBuffer(%d)",
+	g_eventLogger.error("receiveBuffer.sizeOfData(%d) > receiveBuffer.sizeOfBuffer(%d)",
 		 receiveBuffer.sizeOfData, receiveBuffer.sizeOfBuffer);
-	ndbout_c("nBytesRead = %d", nBytesRead);
+	g_eventLogger.error("nBytesRead = %d", nBytesRead);
 #endif
-	ndbout_c("receiveBuffer.sizeOfData(%d) > receiveBuffer.sizeOfBuffer(%d)",
+	g_eventLogger.error("receiveBuffer.sizeOfData(%d) > receiveBuffer.sizeOfBuffer(%d)",
 		 receiveBuffer.sizeOfData, receiveBuffer.sizeOfBuffer);
 	report_error(TE_INVALID_MESSAGE_LENGTH);
 	return 0;
@@ -405,7 +408,7 @@
       return nBytesRead;
     } else {
 #if defined DEBUG_TRANSPORTER
-      ndbout_c("Receive Failure(disconnect==%d) to node = %d nBytesSent = %d "
+      g_eventLogger.error("Receive Failure(disconnect==%d) to node = %d nBytesSent = %d "
 	       "errno = %d strerror = %s",
 	       DISCONNECT_ERRNO(InetErrno, nBytesRead),
 	       remoteNodeId, nBytesRead, InetErrno, 

--- 1.64/storage/ndb/src/common/transporter/TransporterRegistry.cpp	2006-09-28 13:51:09 +08:00
+++ 1.65/storage/ndb/src/common/transporter/TransporterRegistry.cpp	2006-09-28 13:51:09 +08:00
@@ -890,7 +890,7 @@
   
   tcpReadSelectReply = select(maxSocketValue, &tcpReadset, 0, 0, &timeout);  
   if(false && tcpReadSelectReply == -1 && errno == EINTR)
-    ndbout_c("woke-up by signal");
+    g_eventLogger.info("woke-up by signal");
 
 #ifdef NDB_WIN32
   if(tcpReadSelectReply == SOCKET_ERROR)
@@ -1313,12 +1313,12 @@
 	      }
 	      else if(ndb_mgm_is_connected(m_mgm_handle))
 	      {
-		ndbout_c("Failed to get dynamic port to connect to: %d", res);
+		g_eventLogger.info("Failed to get dynamic port to connect to: %d", res);
 		ndb_mgm_disconnect(m_mgm_handle);
 	      }
 	      else
 	      {
-		ndbout_c("Management server closed connection early. "
+		g_eventLogger.info("Management server closed connection early. "
 			 "It is probably being shut down (or has problems). "
 			 "We will retry the connection.");
 	      }
@@ -1416,7 +1416,7 @@
   DBUG_ENTER("TransporterRegistry::start_service");
   if (m_transporter_interface.size() > 0 && !nodeIdSpecified)
   {
-    ndbout_c("TransporterRegistry::startReceiving: localNodeId not specified");
+    g_eventLogger.error("TransporterRegistry::startReceiving: localNodeId not specified");
     DBUG_RETURN(false);
   }
 
@@ -1442,7 +1442,7 @@
 	 * If it wasn't a dynamically allocated port, or
 	 * our attempts at getting a new dynamic port failed
 	 */
-	ndbout_c("Unable to setup transporter service port: %s:%d!\n"
+	g_eventLogger.error("Unable to setup transporter service port: %s:%d!\n"
 		 "Please check if the port is already used,\n"
 		 "(perhaps the node is already running)",
 		 t.m_interface ? t.m_interface : "*", t.m_s_service_port);
@@ -1575,13 +1575,13 @@
 
   if(!mgm_nodeid)
   {
-    ndbout_c("%s: %d", __FILE__, __LINE__);
+    g_eventLogger.error("%s: %d", __FILE__, __LINE__);
     return false;
   }
   Transporter * t = theTransporters[mgm_nodeid];
   if (!t)
   {
-    ndbout_c("%s: %d", __FILE__, __LINE__);
+    g_eventLogger.error("%s: %d", __FILE__, __LINE__);
     return false;
   }
   DBUG_RETURN(t->connect_client(connect_ndb_mgmd(h)));
@@ -1597,7 +1597,7 @@
 
   if ( h==NULL || *h == NULL )
   {
-    ndbout_c("%s: %d", __FILE__, __LINE__);
+    g_eventLogger.error("%s: %d", __FILE__, __LINE__);
     return NDB_INVALID_SOCKET;
   }
 
@@ -1610,10 +1610,10 @@
 				   m_transporter_interface[i].m_s_service_port,
 				   &mgm_reply) < 0)
     {
-      ndbout_c("Error: %s: %d",
+      g_eventLogger.error("Error: %s: %d",
 	       ndb_mgm_get_latest_error_desc(*h),
 	       ndb_mgm_get_latest_error(*h));
-      ndbout_c("%s: %d", __FILE__, __LINE__);
+      g_eventLogger.error("%s: %d", __FILE__, __LINE__);
       ndb_mgm_destroy_handle(h);
       return NDB_INVALID_SOCKET;
     }
@@ -1625,10 +1625,10 @@
   NDB_SOCKET_TYPE sockfd= ndb_mgm_convert_to_transporter(h);
   if ( sockfd == NDB_INVALID_SOCKET)
   {
-    ndbout_c("Error: %s: %d",
+    g_eventLogger.error("Error: %s: %d",
 	     ndb_mgm_get_latest_error_desc(*h),
 	     ndb_mgm_get_latest_error(*h));
-    ndbout_c("%s: %d", __FILE__, __LINE__);
+    g_eventLogger.error("%s: %d", __FILE__, __LINE__);
     ndb_mgm_destroy_handle(h);
   }
   return sockfd;
Thread
bk commit into 5.1 tree (dli:1.2293) BUG#21519David Li28 Sep