List:Commits« Previous MessageNext Message »
From:Olav Sandstaa Date:June 12 2009 2:16pm
Subject:bzr push into mysql-6.0-falcon-team branch (olav:2726 to 2727) Bug#44744
Bug#45297
View as plain text  
 2727 Olav Sandstaa	2009-06-12
      In Bug#44744 and Bug#45297 a crash occures during recovery. In both
      these cases the crash occurs when a record in a data page is attempted
      updated and the record is not already present in the page. This patch
      does not solve this problem but will make the recovery fail when the
      invalid update to the data page occurs instead of failing later when
      the invalid data is used.
      
      Common for both recovery crashes is that DataPage::updateRecord() is
      called with a lineNumber that is equal to the page's maxLine. This is
      not a correct use of this function as DataPage::updateRecord should 
      only be called for already existing records (ie. lineNumber should be
      less than maxLine).
      
      Through repeatedly running recovery I see several cases where this
      happens but does not lead to a crash but instead likely leads to an
      inconsistency. To avoid this inconsistency and to make the recovery
      fail immediately instead of when the invalid data is used this patch
      adds an ASSERT that verify that the lineNumber is valid.

    modified:
      storage/falcon/DataPage.cpp
 2726 Bjorn Munch	2009-06-11
      Bug #42642 MTRv2 restricts valid values for --default-storage-engine option
      Convert provided option to lower case

    modified:
      mysql-test/lib/mtr_cases.pm
=== modified file 'storage/falcon/DataPage.cpp'

=== modified file 'storage/falcon/DataPage.cpp'
--- a/storage/falcon/DataPage.cpp	2009-04-21 10:43:08 +0000
+++ b/storage/falcon/DataPage.cpp	2009-06-12 13:34:24 +0000
@@ -43,6 +43,8 @@
 
 int DataPage::updateRecord(Section *section, int lineNumber, Stream *stream, TransId transId, bool earlyWrite)
 {
+	ASSERT(lineNumber < maxLine);
+
 	Dbb *dbb = section->dbb;
 	LineIndex *index = lineIndex + lineNumber;
 	int length = stream->totalLength;


Attachment: [text/bzr-bundle] bzr/olav@sun.com-20090612133424-o168pezk2hbk70qe.bundle
Thread
bzr push into mysql-6.0-falcon-team branch (olav:2726 to 2727) Bug#44744Bug#45297Olav Sandstaa12 Jun