#At file:///C:/Work/bzr/Merge/MYSQL-~1.0-F/ based on revid:kevin.lewis@stripped
2767 Kevin Lewis 2009-08-20
Bug#46377 - Record::setEncodedRecord() asserts if a newly thawed record is not the same length as what was chilled. This was happening because Transaction::thawAll was not thawing ALL old records a complete-time. It was skipping records that were older than the oldest active, which could easily happen if the gophers get a little behind. This patch changes Transaction::thawAll to thaw all older record versions. In addition, RecordVersion::thaw() is changed to thaw from the serial log any time the virtualOffset still exists. If that portion of the serial log is no longer available, the virstualOffset is reset to zero in SRLUpdateRecords::thaw()
modified:
storage/falcon/RecordVersion.cpp
storage/falcon/Transaction.cpp
=== modified file 'storage/falcon/RecordVersion.cpp'
--- a/storage/falcon/RecordVersion.cpp 2009-07-14 14:09:58 +0000
+++ b/storage/falcon/RecordVersion.cpp 2009-08-20 14:59:55 +0000
@@ -419,17 +419,17 @@ char *RecordVersion::thaw()
if (recordData != recordIsChilled)
return recordData;
- // First, try to thaw from the serial log. If transaction->writePending is
- // true, then the record data can be restored from the serial log. If writePending
- // is false, then the record data has been written to the data pages.
-
- Transaction *trans = findTransaction();
- if (trans)
+ // First, try to thaw from the serial log if there is a virtual offset.
+
+ if (virtualOffset)
{
- if (trans->writePending && virtualOffset)
+ Transaction *trans = findTransaction();
+ if (trans)
+ {
recordData = trans->thaw(this, &bytesReallocated);
- trans->release();
+ trans->release();
+ }
}
// Second, try reading from the page.
=== modified file 'storage/falcon/Transaction.cpp'
--- a/storage/falcon/Transaction.cpp 2009-08-18 22:01:40 +0000
+++ b/storage/falcon/Transaction.cpp 2009-08-20 14:59:55 +0000
@@ -1653,9 +1653,6 @@ void Transaction::thawAll(void)
for (int n = 1; recordData == recordIsChilled; ++n)
{
- if (transactionId < oldestActiveTransaction)
- return; // Nothing needs to be thawed now.
-
try
{
recordData = record->getRecordData();
Attachment: [text/bzr-bundle] bzr/kevin.lewis@sun.com-20090820145955-ccyfv116xqxhqjd9.bundle