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-11-21 17:10:31-05:00, jas@rowvwade. +8 -0
Made incompatible change to page header to record page number
on page for error detection and, maybe, double writes.
Also simplified serial log version tracking.
storage/falcon/Cache.cpp@stripped, 2007-11-21 17:10:18-05:00, jas@rowvwade. +3 -1
Check page number when reading page.
storage/falcon/Page.cpp@stripped, 2007-11-21 17:10:19-05:00, jas@rowvwade. +4 -1
Set page number on database pages.
storage/falcon/Page.h@stripped, 2007-11-21 17:10:19-05:00, jas@rowvwade. +5 -4
Make Page::pageNumber conditional on storage engine builds for
backwards compatibility.
storage/falcon/SRLVersion.cpp@stripped, 2007-11-21 17:10:19-05:00, jas@rowvwade. +1 -1
Phase out SRLVersion in favor of version number in the
serial log block header.
storage/falcon/SerialLog.cpp@stripped, 2007-11-21 17:10:20-05:00, jas@rowvwade. +1 -0
Track current version in serial log block.
storage/falcon/SerialLog.h@stripped, 2007-11-21 17:10:20-05:00, jas@rowvwade. +1 -0
Add version to serial log block header.
storage/falcon/SerialLogControl.cpp@stripped, 2007-11-21 17:10:20-05:00, jas@rowvwade. +4 -1
Give up on SRLVersion (but keep the class).
storage/falcon/SerialLogControl.h@stripped, 2007-11-21 17:10:21-05:00, jas@rowvwade. +1 -1
Get rid of obsolete serial log verion tracking mechanism.
diff -Nrup a/storage/falcon/Cache.cpp b/storage/falcon/Cache.cpp
--- a/storage/falcon/Cache.cpp 2007-11-10 14:12:52 -05:00
+++ b/storage/falcon/Cache.cpp 2007-11-21 17:10:18 -05:00
@@ -265,7 +265,9 @@ Bdb* Cache::fetchPage(Dbb *dbb, int32 pa
priority.schedule(PRIORITY_MEDIUM);
dbb->readPage(bdb);
priority.finished();
-
+#ifdef HAVE_PAGE_NUMBER
+ ASSERT(bdb->buffer->pageNumber == pageNumber);
+#endif
if (actual != lockType)
bdb->downGrade(lockType);
}
diff -Nrup a/storage/falcon/Page.cpp b/storage/falcon/Page.cpp
--- a/storage/falcon/Page.cpp 2007-10-25 18:06:45 -04:00
+++ b/storage/falcon/Page.cpp 2007-11-21 17:10:19 -05:00
@@ -40,5 +40,8 @@ Page::~Page()
void Page::setType(short type, int32 page)
{
pageType = type;
- //checksum = (short) page;
+
+#ifdef HAVE_PAGE_NUMBER
+ pageNumber = page;
+#endif
}
diff -Nrup a/storage/falcon/Page.h b/storage/falcon/Page.h
--- a/storage/falcon/Page.h 2007-10-24 13:45:53 -04:00
+++ b/storage/falcon/Page.h 2007-11-21 17:10:19 -05:00
@@ -26,6 +26,10 @@
#include "PageType.h"
+#ifdef STORAGE_ENGINE
+#define HAVE_PAGE_NUMBER
+#endif
+
// Hardwired page numbers
#define HEADER_PAGE 0
@@ -40,15 +44,12 @@ class Dbb;
class Page
{
public:
- //Page();
- //~Page();
-
void setType(short pageType, int32 pageNumber);
short pageType;
short checksum;
-#ifdef DEBUG_INDEX_PAGE
+#ifdef HAVE_PAGE_NUMBER
int32 pageNumber;
#endif
diff -Nrup a/storage/falcon/SRLVersion.cpp b/storage/falcon/SRLVersion.cpp
--- a/storage/falcon/SRLVersion.cpp 2007-09-20 11:42:26 -04:00
+++ b/storage/falcon/SRLVersion.cpp 2007-11-21 17:10:19 -05:00
@@ -38,6 +38,6 @@ SRLVersion::~SRLVersion()
void SRLVersion::read()
{
version = getInt();
- control->setVersion(version);
+ //control->setVersion(version);
}
diff -Nrup a/storage/falcon/SerialLog.cpp b/storage/falcon/SerialLog.cpp
--- a/storage/falcon/SerialLog.cpp 2007-11-10 14:12:53 -05:00
+++ b/storage/falcon/SerialLog.cpp 2007-11-21 17:10:20 -05:00
@@ -967,6 +967,7 @@ void SerialLog::initializeWriteBlock(Ser
writePtr = writeBlock->data;
writeBlock->blockNumber = nextBlockNumber++;
writeBlock->creationTime = (uint32) creationTime;
+ writeBlock->version = srlCurrentVersion;
writeBlock->length = (int) (writePtr - (UCHAR*) writeBlock);
writeWindow->setLastBlock(writeBlock);
writeWarningTrack = writeWindow->warningTrack;
diff -Nrup a/storage/falcon/SerialLog.h b/storage/falcon/SerialLog.h
--- a/storage/falcon/SerialLog.h 2007-10-31 13:05:13 -04:00
+++ b/storage/falcon/SerialLog.h 2007-11-21 17:10:20 -05:00
@@ -47,6 +47,7 @@ struct SerialLogBlock
uint64 readBlockNumber;
uint32 length;
uint32 creationTime;
+ uint16 version;
UCHAR data[1];
};
diff -Nrup a/storage/falcon/SerialLogControl.cpp b/storage/falcon/SerialLogControl.cpp
--- a/storage/falcon/SerialLogControl.cpp 2007-11-01 16:28:43 -04:00
+++ b/storage/falcon/SerialLogControl.cpp 2007-11-21 17:10:20 -05:00
@@ -197,6 +197,7 @@ void SerialLogControl::setWindow(SerialL
inputBlock = block;
input = inputBlock->data;
inputEnd = (const UCHAR*) inputBlock + block->length;
+ version = inputBlock->version;
singleBlock = false;
if (inputBlock == log->writeBlock && log->recordIncomplete)
@@ -313,7 +314,7 @@ SerialLogRecord* SerialLogControl::nextR
recordStart = input;
UCHAR type = getInt();
- while ((type == srlEnd) || (type == srlVersion))
+ while ((type == srlEnd))
{
if (debug)
Log::debug("Recovery %s\n", (type == srlEnd) ? "end" : "version");
@@ -400,10 +401,12 @@ void SerialLogControl::validate(SerialLo
}
}
+/***
void SerialLogControl::setVersion(int newVersion)
{
version = newVersion;
}
+***/
void SerialLogControl::fini(void)
{
diff -Nrup a/storage/falcon/SerialLogControl.h b/storage/falcon/SerialLogControl.h
--- a/storage/falcon/SerialLogControl.h 2007-11-01 16:28:44 -04:00
+++ b/storage/falcon/SerialLogControl.h 2007-11-21 17:10:21 -05:00
@@ -71,7 +71,7 @@ public:
SerialLogControl(SerialLog *serialLog);
virtual ~SerialLogControl();
- void setVersion (int newVersion);
+ //void setVersion (int newVersion);
void validate(SerialLogWindow *window, SerialLogBlock *block);
uint64 getBlockNumber();
int getOffset();
| Thread |
|---|
| • bk commit into 6.0 tree (jas:1.2684) | U-ROWVWADEjas | 21 Nov |