#At file:///home/os136802/mysql/develop/repo/falcon-bug45970/ based on revid:john.embretsen@stripped
2763 Olav Sandstaa 2009-07-31
Patch for Bug#45970 Corrupt RecordLocatorPage structure reported during recovery
This crash happened when processing a UpdateRecords log record and a record to be deleted did not
exist in the data page. This was handled correctly in DataPage::deleteLine() after the fix for
Bug#44744/Bug#45297 but the return value from DataPage::deleteLine was wrong. 0 (page full) was returned
instead of the actual amount of available space. This triggered all entries for this page in the record
locator page to be "cleaned up" leading to a corrupted record locator page.
This patch fixes this problem by having DataPage::deleteLine() return the correct amount of available space
in the data page.
@ storage/falcon/DataPage.cpp
Return the correct amount of free space in the data page also in the case where the record to be
deleted did not exits in the data page.
modified:
storage/falcon/DataPage.cpp
=== modified file 'storage/falcon/DataPage.cpp'
--- a/storage/falcon/DataPage.cpp 2009-07-10 12:52:00 +0000
+++ b/storage/falcon/DataPage.cpp 2009-07-31 12:11:42 +0000
@@ -316,7 +316,7 @@ int DataPage::deleteLine (Dbb *dbb, int
if (line >= maxLine)
{
ASSERT(dbb->serialLog->recovering);
- return 0;
+ return computeSpaceAvailable(dbb->pageSize);
}
// Handle overflow pages first
@@ -485,7 +485,6 @@ void DataPage::analyze(Dbb *dbb, Section
int DataPage::computeSpaceAvailable(int pageSize)
{
- //int spaceUsed = sizeof(DataPage) - sizeof(LineIndex); // Page overhead
int spaceUsed = OFFSET(DataPage*, lineIndex);
for (int n = 0; n < maxLine; ++n)
Attachment: [text/bzr-bundle] bzr/olav@sun.com-20090731121142-7uka69l5xmbt16rw.bundle
| Thread |
|---|
| • bzr commit into mysql-6.0-falcon-team branch (olav:2763) Bug#45970 | Olav Sandstaa | 31 Jul |