Below is the list of changes that have just been committed into a local
5.1-falcon repository of jas. When jas 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-04-16 11:53:48-04:00, jas@stripped +4 -0
Fix bug where in-use record could be scavenged.
storage/falcon/Record.cpp@stripped, 2007-04-16 11:53:44-04:00, jas@stripped +2 -2
Print record useCount and ageGroup for debugging.
storage/falcon/RecordLeaf.cpp@stripped, 2007-04-16 11:53:44-04:00, jas@stripped +1 -1
Don't scavenge records in use.
storage/falcon/RecordVersion.cpp@stripped, 2007-04-16 11:53:44-04:00, jas@stripped +3 -2
Print record useCount and ageGroup for debugging.
storage/falcon/StorageTable.cpp@stripped, 2007-04-16 11:53:44-04:00, jas@stripped +2 -1
Assert fetched records have plausible use counts.
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: jas
# Host: fluffy.netfrastructure.com
# Root: /home/mysql/mysql-5.1-falcon
--- 1.33/storage/falcon/Record.cpp 2007-04-16 11:53:54 -04:00
+++ 1.34/storage/falcon/Record.cpp 2007-04-16 11:53:54 -04:00
@@ -880,8 +880,8 @@
void Record::print(void)
{
- printf(" %p\tId %d, encoding %d, state %d\n",
- this, recordNumber, encoding, state);
+ printf(" %p\tId %d, enc %d, state %d, use %d, grp %d\n",
+ this, recordNumber, encoding, state, useCount, ageGroup);
}
void Record::printRecord(const char* header)
--- 1.20/storage/falcon/RecordLeaf.cpp 2007-04-16 11:53:54 -04:00
+++ 1.21/storage/falcon/RecordLeaf.cpp 2007-04-16 11:53:54 -04:00
@@ -133,7 +133,7 @@
else
++count;
}
- else if (record->ageGroup <= age)
+ else if (record->ageGroup <= age && record->useCount == 1)
{
*ptr = NULL;
#ifdef CHECK_RECORD_ACTIVITY
--- 1.29/storage/falcon/RecordVersion.cpp 2007-04-16 11:53:54 -04:00
+++ 1.30/storage/falcon/RecordVersion.cpp 2007-04-16 11:53:54 -04:00
@@ -283,8 +283,9 @@
void RecordVersion::print(void)
{
- printf(" %p\tId %d, encoding %d, state %d, tid %d, prior %p\n",
- this, recordNumber, encoding, state, transactionId, priorVersion);
+ printf(" %p\tId %d, enc %d, state %d, tid %d, use %d, grp %d, prior %p\n",
+ this, recordNumber, encoding, state, transactionId, useCount,
+ ageGroup, priorVersion);
if (priorVersion)
priorVersion->print();
--- 1.43/storage/falcon/StorageTable.cpp 2007-04-16 11:53:54 -04:00
+++ 1.44/storage/falcon/StorageTable.cpp 2007-04-16 11:53:54 -04:00
@@ -103,7 +103,7 @@
{
try
{
- //storageDatabase->updateRow(storageConnection, share->table, recordNumber, &insertStream);
+ ASSERT(record->useCount >= 2);
storageDatabase->updateRow(storageConnection, share->table, record, &insertStream);
}
catch (SQLException& exception)
@@ -293,6 +293,7 @@
if (record)
record->release();
+ ASSERT(newRecord->useCount >= 2);
record = newRecord;
dataStream.setData((const UCHAR*) record->getEncodedRecord());
}
| Thread |
|---|
| • bk commit into 5.1-falcon tree (jas:1.2600) | Jim Starkey | 16 Apr |