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:08:50-04:00, jas@rowvwade. +1 -0
Fix IO::readHeader to match constraints of direct I/O.
storage/falcon/IO.cpp@stripped, 2007-10-30 11:08:44-04:00, jas@rowvwade. +7 -2
Fix IO::readHeader to match constraints of direct I/O.
diff -Nrup a/storage/falcon/IO.cpp b/storage/falcon/IO.cpp
--- a/storage/falcon/IO.cpp 2007-10-29 11:39:58 -04:00
+++ b/storage/falcon/IO.cpp 2007-10-30 11:08:44 -04:00
@@ -265,11 +265,16 @@ void IO::writePages(int32 pageNumber, in
void IO::readHeader(Hdr * header)
{
+ static const int sectorSize = 4096;
+ UCHAR temp[sectorSize * 2];
+ UCHAR *buffer = (UCHAR*) (((UIPTR) temp + sectorSize - 1) / sectorSize * sectorSize);
int n = lseek (fileId, 0, SEEK_SET);
- n = ::read (fileId, header, sizeof (Hdr));
+ n = ::read (fileId, buffer, sectorSize);
- if (n != sizeof (Hdr))
+ if (n < sizeof (Hdr))
FATAL ("read error on database header");
+
+ memcpy(header, buffer, sizeof(Hdr));
}
void IO::closeFile()
| Thread |
|---|
| • bk commit into 6.0 tree (jas:1.2661) | U-ROWVWADEjas | 30 Oct |