List:Commits« Previous MessageNext Message »
From:U-ROWVWADEjas Date:October 30 2007 3:38pm
Subject:bk commit into 6.0 tree (jas:1.2662)
View as plain text  
Below is the list of changes that have just been committed into a local
6.0 repository of . When  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, 2007-10-30 11:38:16-04:00, jas@rowvwade. +2 -0
  Re-instate serial log file zap to avoid recovery confusion
  (don't accidentally pick up old files).

  storage/falcon/Engine.h@stripped, 2007-10-30 11:38:09-04:00, jas@rowvwade. +2 -1
    Define macro to compute alignment within a buffer.

  storage/falcon/SerialLogFile.cpp@stripped, 2007-10-30 11:38:09-04:00, jas@rowvwade. +5 -3
    Re-instate serial log file zap to avoid recovery confusion
    (don't accidentally pick up old files).

diff -Nrup a/storage/falcon/Engine.h b/storage/falcon/Engine.h
--- a/storage/falcon/Engine.h	2007-10-23 16:50:14 -04:00
+++ b/storage/falcon/Engine.h	2007-10-30 11:38:09 -04:00
@@ -68,7 +68,8 @@ using namespace NAMESPACE;
 #define ISUPPER(c)			(c >= 'A' && c <= 'Z')
 #define ISDIGIT(c)			(c >= '0' && c <= '9')
 #define UPPER(c)			((ISLOWER (c)) ? c - 'a' + 'A' : c)
-#define ROUNDUP(n,b)		((n + b - 1) & ~(b - 1))
+#define ROUNDUP(n,b)		(((n) + b - 1) & ~(b - 1))
+#define ALIGN(ptr,b)		((UCHAR*) ROUNDUP((UIPTR) ptr, b))
 #define SQLEXCEPTION		SQLError
 
 typedef int				int32;
diff -Nrup a/storage/falcon/SerialLogFile.cpp b/storage/falcon/SerialLogFile.cpp
--- a/storage/falcon/SerialLogFile.cpp	2007-10-30 10:36:45 -04:00
+++ b/storage/falcon/SerialLogFile.cpp	2007-10-30 11:38:09 -04:00
@@ -279,9 +279,11 @@ uint32 SerialLogFile::read(int64 positio
 
 void SerialLogFile::zap()
 {
-	UCHAR *junk = new UCHAR[sectorSize];
-	memset(junk, 0, sectorSize);
-	//write(0, sectorSize, (SerialLogBlock*) junk);
+	UCHAR *junk = new UCHAR[sectorSize * 2];
+	//UCHAR *buffer = (UCHAR*) (((UIPTR) junk + sectorSize - 1) / sectorSize * sectorSize);
+	UCHAR *buffer = ALIGN(junk, sectorSize);
+	memset(buffer, 0, sectorSize);
+	write(0, sectorSize, (SerialLogBlock*) buffer);
 	delete junk;
 }
 
Thread
bk commit into 6.0 tree (jas:1.2662)U-ROWVWADEjas30 Oct