#At file:///C:/Work/bzr/Merge/mysql-6.0-falcon-team/
2888 Kevin Lewis 2008-10-29
Code Cleanup
modified:
storage/falcon/Database.cpp
storage/falcon/Index.cpp
storage/falcon/Record.cpp
storage/falcon/Record.h
storage/falcon/RecordScavenge.cpp
storage/falcon/RecordVersion.cpp
storage/falcon/RecordVersion.h
storage/falcon/RecoveryObjects.cpp
storage/falcon/RecoveryObjects.h
storage/falcon/SRLUpdateRecords.cpp
storage/falcon/ha_falcon.cpp
per-file messages:
storage/falcon/Database.cpp
Correct comment
storage/falcon/Index.cpp
Correct comment
storage/falcon/Record.cpp
variable 'force' is not used
storage/falcon/Record.h
variable 'force' is not used
storage/falcon/RecordScavenge.cpp
add parens
storage/falcon/RecordVersion.cpp
variable 'force' is not used
storage/falcon/RecordVersion.h
variable 'force' is not used
storage/falcon/RecoveryObjects.cpp
Use member function, not a global inline.
storage/falcon/RecoveryObjects.h
Use member function, not a global inline.
storage/falcon/SRLUpdateRecords.cpp
track transaction->chilledBytes
storage/falcon/ha_falcon.cpp
white space
=== modified file 'storage/falcon/Database.cpp'
--- a/storage/falcon/Database.cpp 2008-10-23 07:58:38 +0000
+++ b/storage/falcon/Database.cpp 2008-10-29 23:25:13 +0000
@@ -1471,7 +1471,7 @@ void Database::truncateTable(Table *tabl
Sync syncDDLLock(&syncSysDDL, "Database::truncateTable(SysDDL)");
syncDDLLock.lock(Exclusive);
- // Lock syncScavenge before locking syncSysDDL, syncTables, or table->syncObject.
+ // Lock syncScavenge before locking syncTables, or table->syncObject.
// The scavenger locks syncScavenge and then syncTables
// If we run out of record memory, forceRecordScavenge will eventually call table->syncObject.
=== modified file 'storage/falcon/Index.cpp'
--- a/storage/falcon/Index.cpp 2008-10-16 02:53:35 +0000
+++ b/storage/falcon/Index.cpp 2008-10-29 23:25:13 +0000
@@ -582,7 +582,7 @@ void Index::update(Record * oldRecord, R
IndexKey key(this);
makeKey (record, &key);
- // If there is a duplicate in the old version chain, don't both with another
+ // If there is a duplicate in the old version chain, don't bother with another
if (duplicateKey (&key, oldRecord))
return;
=== modified file 'storage/falcon/Record.cpp'
--- a/storage/falcon/Record.cpp 2008-10-27 18:00:09 +0000
+++ b/storage/falcon/Record.cpp 2008-10-29 23:25:13 +0000
@@ -849,7 +849,7 @@ void Record::setPriorVersion(Record* rec
ASSERT(false);
}
-int Record::thaw(bool force)
+int Record::thaw(void)
{
return 0;
}
=== modified file 'storage/falcon/Record.h'
--- a/storage/falcon/Record.h 2008-10-24 05:35:38 +0000
+++ b/storage/falcon/Record.h 2008-10-29 23:25:13 +0000
@@ -88,7 +88,7 @@ public:
virtual Record* getPriorVersion();
virtual Record* getGCPriorVersion(void);
virtual void print(void);
- virtual int thaw(bool force = false);
+ virtual int thaw(void);
virtual const char* getEncodedRecord();
virtual int setRecordData(const UCHAR *dataIn, int dataLength);
virtual void serialize(Serialize* stream);
=== modified file 'storage/falcon/RecordScavenge.cpp'
--- a/storage/falcon/RecordScavenge.cpp 2008-10-24 05:06:52 +0000
+++ b/storage/falcon/RecordScavenge.cpp 2008-10-29 23:25:13 +0000
@@ -56,7 +56,7 @@ void RecordScavenge::inventoryRecord(Rec
uint64 age = baseGeneration - record->generation;
int size = record->size + sizeof(MemBigHeader);
- if (record->hasRecord(false) || record->state == recChilled)
+ if (record->hasRecord(false) || (record->state == recChilled))
size += sizeof(MemBigHeader);
if (age != UNDEFINED && age < AGE_GROUPS)
=== modified file 'storage/falcon/RecordVersion.cpp'
--- a/storage/falcon/RecordVersion.cpp 2008-10-24 05:35:38 +0000
+++ b/storage/falcon/RecordVersion.cpp 2008-10-29 23:25:13 +0000
@@ -353,7 +353,7 @@ uint64 RecordVersion::getVirtualOffset()
return (virtualOffset);
}
-int RecordVersion::thaw(bool force)
+int RecordVersion::thaw()
{
Sync syncThaw(format->table->getSyncThaw(this), "RecordVersion::thaw");
syncThaw.lock(Exclusive);
@@ -370,7 +370,7 @@ int RecordVersion::thaw(bool force)
// 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.
- if (trans && (trans->writePending || force))
+ if (trans && trans->writePending)
{
trans->addRef();
bytesRestored = trans->thaw(this);
=== modified file 'storage/falcon/RecordVersion.h'
--- a/storage/falcon/RecordVersion.h 2008-10-24 05:06:52 +0000
+++ b/storage/falcon/RecordVersion.h 2008-10-29 23:25:13 +0000
@@ -53,7 +53,7 @@ public:
virtual void setPriorVersion (Record *oldVersion);
virtual void setVirtualOffset(uint64 offset);
virtual uint64 getVirtualOffset();
- virtual int thaw(bool force = false);
+ virtual int thaw(void);
virtual void print(void);
virtual int getSize(void);
virtual void serialize(Serialize* stream);
=== modified file 'storage/falcon/RecoveryObjects.cpp'
--- a/storage/falcon/RecoveryObjects.cpp 2008-09-03 22:17:54 +0000
+++ b/storage/falcon/RecoveryObjects.cpp 2008-10-29 23:25:13 +0000
@@ -99,7 +99,7 @@ bool RecoveryObjects::isObjectActive(int
return object->pass1Count == object->currentCount;
}
-static inline RecoveryPage * findInHashBucket(RecoveryPage *head, int objectNumber, int tableSpaceId)
+RecoveryPage* RecoveryObjects::findInHashBucket(RecoveryPage *head, int objectNumber, int tableSpaceId)
{
for (RecoveryPage *object = head ; object; object = object->collision)
if (object->objectNumber == objectNumber && object->tableSpaceId == tableSpaceId)
=== modified file 'storage/falcon/RecoveryObjects.h'
--- a/storage/falcon/RecoveryObjects.h 2008-07-18 21:24:52 +0000
+++ b/storage/falcon/RecoveryObjects.h 2008-10-29 23:25:13 +0000
@@ -40,6 +40,7 @@ public:
void reset();
bool bumpIncarnation(int objectNumber, int tableSpaceId, int state, bool pass1);
void clear();
+ RecoveryPage* findInHashBucket(RecoveryPage *head, int objectNumber, int tableSpaceId);
RecoveryPage* findRecoveryObject(int objectNumber, int tableSpaceId);
void setActive(int objectNumber, int tableSpaceId);
void setInactive(int objectNumber, int tableSpaceId);
=== modified file 'storage/falcon/SRLUpdateRecords.cpp'
--- a/storage/falcon/SRLUpdateRecords.cpp 2008-10-24 05:06:52 +0000
+++ b/storage/falcon/SRLUpdateRecords.cpp 2008-10-29 23:25:13 +0000
@@ -250,6 +250,7 @@ void SRLUpdateRecords::append(Transactio
log->chilledRecords += chilledRecordsWindow;
log->chilledBytes += chilledBytesWindow;
transaction->chilledRecords += chilledRecordsWindow;
+ transaction->chilledBytes += chilledBytesWindow;
windowNumber = (uint32)log->writeWindow->virtualOffset / SRL_WINDOW_SIZE;
}
} // next window
=== modified file 'storage/falcon/ha_falcon.cpp'
--- a/storage/falcon/ha_falcon.cpp 2008-10-26 08:45:22 +0000
+++ b/storage/falcon/ha_falcon.cpp 2008-10-29 23:25:13 +0000
@@ -1561,7 +1561,7 @@ int StorageInterface::rename_table(const
ret = storageShare->renameTable(storageConnection, to);
if (!ret)
- remapIndexes(table);
+ remapIndexes(table);
storageShare->unlock();
storageShare->unlockIndexes();
| Thread |
|---|
| • bzr commit into mysql-6.0-falcon-team branch (klewis:2888) | Kevin Lewis | 30 Oct |