List:Commits« Previous MessageNext Message »
From:dli Date:August 21 2006 4:54am
Subject:bk commit into 4.1 tree (dli:1.2533) BUG#21345
View as plain text  
Below is the list of changes that have just been committed into a local
4.1 repository of root. When root 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-08-21 12:54:37+08:00, dli@stripped +1 -0
  Bug#21345, fixed the cluster log file rotation code, let the cluster log
  file be renamed correctly when the main log file exceeds the configured
  maximum size.

  ndb/src/common/logger/FileLogHandler.cpp@stripped, 2006-08-21 12:54:35+08:00, dli@stripped +5 -12
    Fixed the cluster log file rotation code.

# 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/lisj/mysql/mysql-4.1/bug-21345

--- 1.10/ndb/src/common/logger/FileLogHandler.cpp	2006-08-21 12:54:41 +08:00
+++ 1.11/ndb/src/common/logger/FileLogHandler.cpp	2006-08-21 12:54:41 +08:00
@@ -145,22 +145,15 @@
 FileLogHandler::createNewFile()
 {
   bool rc = true;	
-  int fileNo = 1;
+  static int fileNo = 1;
   char newName[PATH_MAX];
 
-  do
+  if (fileNo >= m_maxNoFiles)
   {
-    if (fileNo >= m_maxNoFiles)
-    {
-      fileNo = 1;
-      BaseString::snprintf(newName, sizeof(newName),
-		 "%s.%d", m_pLogFile->getName(), fileNo);
-      break;
-    }		
-    BaseString::snprintf(newName, sizeof(newName),
+    fileNo = 1;
+  }		
+  BaseString::snprintf(newName, sizeof(newName),
 	       "%s.%d", m_pLogFile->getName(), fileNo++); 
-    
-  } while (File_class::exists(newName));
   
   m_pLogFile->close();	
   if (!File_class::rename(m_pLogFile->getName(), newName))
Thread
bk commit into 4.1 tree (dli:1.2533) BUG#21345dli21 Aug