Below is the list of changes that have just been committed into a local
6.0 repository of klewis. When klewis 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, 2008-05-09 14:58:50-05:00, klewis@klewis-mysql. +10 -0
Bug#36603 - Adjust age group values to uint32
storage/falcon/BDB.h@stripped, 2008-05-09 14:58:08-05:00, klewis@klewis-mysql. +1 -1
Bug#36603 - Adjust age group values to uint32
storage/falcon/Database.cpp@stripped, 2008-05-09 14:58:12-05:00, klewis@klewis-mysql. +1 -2
Cleanup
storage/falcon/Database.h@stripped, 2008-05-09 14:58:21-05:00, klewis@klewis-mysql. +0 -1
Cleanup
storage/falcon/Record.cpp@stripped, 2008-05-09 14:58:23-05:00, klewis@klewis-mysql. +2 -2
Bug#36603 - Adjust age group values to uint32
storage/falcon/Record.h@stripped, 2008-05-09 14:58:25-05:00, klewis@klewis-mysql. +1 -1
Bug#36603 - Adjust age group values to uint32
storage/falcon/RecordLeaf.cpp@stripped, 2008-05-09 14:58:28-05:00, klewis@klewis-mysql. +1
-1
Cleanup
storage/falcon/RecordScavenge.cpp@stripped, 2008-05-09 14:58:30-05:00, klewis@klewis-mysql.
+6 -6
Bug#36603 - Adjust age group values to uint32
storage/falcon/RecordScavenge.h@stripped, 2008-05-09 14:58:33-05:00, klewis@klewis-mysql. +6
-6
Bug#36603 - Adjust age group values to uint32
storage/falcon/Table.cpp@stripped, 2008-05-09 14:58:35-05:00, klewis@klewis-mysql. +2 -2
Cleanup
storage/falcon/TransactionManager.cpp@stripped, 2008-05-09 14:58:38-05:00,
klewis@klewis-mysql. +2 -2
Cleanup
diff -Nrup a/storage/falcon/BDB.h b/storage/falcon/BDB.h
--- a/storage/falcon/BDB.h 2008-05-08 15:37:14 -05:00
+++ b/storage/falcon/BDB.h 2008-05-09 14:58:08 -05:00
@@ -91,7 +91,7 @@ public:
Dbb *dbb;
int32 pageNumber;
TransId transactionId;
- int age;
+ uint64 age;
Page *buffer;
Bdb *prior; /* position in LRU que */
Bdb *next;
diff -Nrup a/storage/falcon/Database.cpp b/storage/falcon/Database.cpp
--- a/storage/falcon/Database.cpp 2008-04-26 22:13:21 -05:00
+++ b/storage/falcon/Database.cpp 2008-05-09 14:58:12 -05:00
@@ -1768,7 +1768,6 @@ void Database::retireRecords(bool forced
transactionManager->purgeTransactions();
TransId oldestActiveTransaction = transactionManager->findOldestActive();
- int threshold = 0;
uint64 total = recordDataPool->activeMemory;
RecordScavenge recordScavenge(this, oldestActiveTransaction, forced);
@@ -1791,7 +1790,7 @@ void Database::retireRecords(bool forced
for (table = tableList; table; table = table->next)
table->inventoryRecords(&recordScavenge);
- threshold = recordScavenge.computeThreshold(recordScavengeFloor);
+ recordScavenge.computeThreshold(recordScavengeFloor);
recordScavenge.printRecordMemory();
int count = 0;
int skipped = 0;
diff -Nrup a/storage/falcon/Database.h b/storage/falcon/Database.h
--- a/storage/falcon/Database.h 2008-04-11 21:22:42 -05:00
+++ b/storage/falcon/Database.h 2008-05-09 14:58:21 -05:00
@@ -35,7 +35,6 @@
#define ODS_MINOR_VERSION2 2 // Has SequencePages external to the section tree
#define ODS_MINOR_VERSION3 3 // Switch to variable length record numbers in index
#define ODS_MINOR_VERSION ODS_MINOR_VERSION3
-//#define AGE_GROUPS 32
#define COMBINED_VERSION(major,minor) (major * 100 + minor)
#define VERSION_CURRENT COMBINED_VERSION(ODS_VERSION, ODS_MINOR_VERSION)
diff -Nrup a/storage/falcon/Record.cpp b/storage/falcon/Record.cpp
--- a/storage/falcon/Record.cpp 2008-04-30 08:54:53 -05:00
+++ b/storage/falcon/Record.cpp 2008-05-09 14:58:23 -05:00
@@ -825,7 +825,7 @@ bool Record::isNull(int fieldId)
void Record::poke()
{
- int gen = format->table->database->currentGeneration;
+ uint64 gen = format->table->database->currentGeneration;
if (generation != gen)
generation = gen;
@@ -898,7 +898,7 @@ void Record::deleteData(void)
void Record::print(void)
{
- printf(" %p\tId %d, enc %d, state %d, use %d, grp %d\n",
+ printf(" %p\tId %d, enc %d, state %d, use %d, grp " I64FORMAT "\n",
this, recordNumber, encoding, state, useCount, generation);
}
diff -Nrup a/storage/falcon/Record.h b/storage/falcon/Record.h
--- a/storage/falcon/Record.h 2008-04-21 21:11:26 -05:00
+++ b/storage/falcon/Record.h 2008-05-09 14:58:25 -05:00
@@ -146,7 +146,7 @@ public:
Format *format;
int recordNumber;
int size;
- int generation;
+ uint64 generation;
short highWater;
UCHAR encoding;
UCHAR state;
diff -Nrup a/storage/falcon/RecordLeaf.cpp b/storage/falcon/RecordLeaf.cpp
--- a/storage/falcon/RecordLeaf.cpp 2008-04-09 09:51:51 -05:00
+++ b/storage/falcon/RecordLeaf.cpp 2008-05-09 14:58:28 -05:00
@@ -138,7 +138,7 @@ int RecordLeaf::retireRecords (Table *ta
syncPrior.lock(Shared);
if (record->scavenge(recordScavenge, Shared))
- break;
+ break;
else
++count;
}
diff -Nrup a/storage/falcon/RecordScavenge.cpp b/storage/falcon/RecordScavenge.cpp
--- a/storage/falcon/RecordScavenge.cpp 2008-04-26 22:13:21 -05:00
+++ b/storage/falcon/RecordScavenge.cpp 2008-05-09 14:58:30 -05:00
@@ -53,13 +53,13 @@ void RecordScavenge::inventoryRecord(Rec
{
++numberRecords;
recordSpace += record->size;
- int age = baseGeneration - record->generation;
+ uint64 age = baseGeneration - record->generation;
int size = record->size + sizeof(MemBigHeader);
if (record->hasRecord() || (record->state == recChilled))
size += sizeof(MemBigHeader);
- if (age >= 0 && age < AGE_GROUPS)
+ if (age != UNDEFINED && age < AGE_GROUPS)
ageGroups[age] += size;
else if (age >= AGE_GROUPS)
overflowSpace += size;
@@ -68,12 +68,12 @@ void RecordScavenge::inventoryRecord(Rec
}
}
-int RecordScavenge::computeThreshold(uint64 target)
+uint64 RecordScavenge::computeThreshold(uint64 target)
{
totalSpace = 0;
scavengeGeneration = 0;
- for (int n = 0; n < AGE_GROUPS; ++n)
+ for (uint64 n = 0; n < AGE_GROUPS; ++n)
{
totalSpace += ageGroups[n];
@@ -92,13 +92,13 @@ int RecordScavenge::computeThreshold(uin
void RecordScavenge::printRecordMemory(void)
{
Log::debug ("Record Memory usage for %s:\n", (const char*) database->name);
- int max;
+ uint64 max;
for (max = AGE_GROUPS - 1; max > 0; --max)
if (ageGroups[max])
break;
- for (int n = 0; n <= max; ++n)
+ for (uint64 n = 0; n <= max; ++n)
if (ageGroups [n])
Log::debug (" %d. %d\n", baseGeneration - n, ageGroups[n]);
diff -Nrup a/storage/falcon/RecordScavenge.h b/storage/falcon/RecordScavenge.h
--- a/storage/falcon/RecordScavenge.h 2008-04-26 22:13:21 -05:00
+++ b/storage/falcon/RecordScavenge.h 2008-05-09 14:58:33 -05:00
@@ -16,8 +16,8 @@
#ifndef _RECORD_SCAVENGE_H_
#define _RECORD_SCAVENGE_H_
-static const int AGE_GROUPS = 20;
-static const int UNDEFINED = -1;
+static const uint64 AGE_GROUPS = 20;
+static const uint64 UNDEFINED = -1;
class Database;
class Record;
@@ -27,8 +27,8 @@ class RecordScavenge
public:
Database *database;
TransId transactionId;
- int scavengeGeneration;
- int baseGeneration;
+ uint64 scavengeGeneration;
+ uint64 baseGeneration;
uint recordsReclaimed;
uint recordsRemaining;
uint numberRecords;
@@ -45,8 +45,8 @@ public:
~RecordScavenge(void);
void inventoryRecord(Record* record);
- int computeThreshold(uint64 target);
- void printRecordMemory(void);
+ uint64 computeThreshold(uint64 target);
+ void printRecordMemory(void);
};
#endif
diff -Nrup a/storage/falcon/Table.cpp b/storage/falcon/Table.cpp
--- a/storage/falcon/Table.cpp 2008-05-02 00:17:46 -05:00
+++ b/storage/falcon/Table.cpp 2008-05-09 14:58:35 -05:00
@@ -1449,7 +1449,7 @@ void Table::deleteRecord(Transaction * t
database->preUpdate();
Sync scavenge(&syncScavenge, "Table::deleteRecord");
- // syncPrior is not needed here. It is handled in fetchVersion()
+ // syncPrior is not needed here. It is handled in fetchVersion()
Record *candidate = fetch(orgRecord->recordNumber);
checkAncestor(candidate, orgRecord);
RecordVersion *record;
@@ -3448,7 +3448,7 @@ Record* Table::fetchForUpdate(Transactio
if (record->state != recLock)
return record;
- Sync syncPrior(getSyncPrior(record), "Table::fetchForUpdate(1)");
+ Sync syncPrior(getSyncPrior(record), "Table::fetchForUpdate");
syncPrior.lock(Shared);
Record *prior = record->getPriorVersion();
diff -Nrup a/storage/falcon/TransactionManager.cpp b/storage/falcon/TransactionManager.cpp
--- a/storage/falcon/TransactionManager.cpp 2008-04-24 12:26:17 -05:00
+++ b/storage/falcon/TransactionManager.cpp 2008-05-09 14:58:38 -05:00
@@ -325,8 +325,8 @@ void TransactionManager::reportStatistic
if (transaction->state == Active)
{
++active;
- time_t age = database->deltaTime - transaction->startTime;
- maxTime = MAX(age, maxTime);
+ time_t ageTime = database->deltaTime - transaction->startTime;
+ maxTime = MAX(ageTime, maxTime);
}
else if (transaction->state == Available)
{
| Thread |
|---|
| • bk commit into 6.0 tree (klewis:1.2671) BUG#36603 | klewis | 9 May 2008 |