From: cpowers Date: April 8 2008 7:06am Subject: bk commit into 6.0 tree (cpowers:1.2630) List-Archive: http://lists.mysql.com/commits/45034 Message-Id: <20080408070654.6FC101DB06FC@xeno.mysql.com> Below is the list of changes that have just been committed into a local 6.0 repository of cpowers. When cpowers 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-04-08 02:06:49-05:00, cpowers@stripped +11 -0 Corrected format of debug log messages. Several messages include database->deltaTime, which is a 64-bit value on some systems. Fixed two compiler warnings in StorageHandler.cpp. storage/falcon/BackLog.cpp@stripped, 2008-04-08 02:06:46-05:00, cpowers@stripped +1 -1 Corrected format of debug log message. storage/falcon/Cache.cpp@stripped, 2008-04-08 02:06:46-05:00, cpowers@stripped +3 -3 Corrected format of debug log message. storage/falcon/Database.cpp@stripped, 2008-04-08 02:06:46-05:00, cpowers@stripped +2 -2 Corrected format of debug log message. storage/falcon/Dbb.cpp@stripped, 2008-04-08 02:06:46-05:00, cpowers@stripped +1 -1 Corrected format of debug log message. storage/falcon/DeferredIndex.cpp@stripped, 2008-04-08 02:06:46-05:00, cpowers@stripped +2 -2 Corrected format of debug log message. storage/falcon/RecordVersion.cpp@stripped, 2008-04-08 02:06:46-05:00, cpowers@stripped +2 -1 Corrected format of debug log message. storage/falcon/SRLUpdateIndex.cpp@stripped, 2008-04-08 02:06:46-05:00, cpowers@stripped +5 -4 Corrected format of debug log message. storage/falcon/SerialLog.cpp@stripped, 2008-04-08 02:06:47-05:00, cpowers@stripped +2 -2 Corrected format of debug log message. storage/falcon/StorageHandler.cpp@stripped, 2008-04-08 02:06:47-05:00, cpowers@stripped +4 -4 Fixed compile warnings. storage/falcon/Transaction.cpp@stripped, 2008-04-08 02:06:47-05:00, cpowers@stripped +4 -4 Corrected format of debug log message. storage/falcon/TransactionManager.cpp@stripped, 2008-04-08 02:06:47-05:00, cpowers@stripped +1 -1 Corrected format of debug log message. diff -Nrup a/storage/falcon/BackLog.cpp b/storage/falcon/BackLog.cpp --- a/storage/falcon/BackLog.cpp 2008-03-06 14:14:55 -06:00 +++ b/storage/falcon/BackLog.cpp 2008-04-08 02:06:46 -05:00 @@ -138,6 +138,6 @@ void BackLog::reportStatistics(void) priorBacklogged = recordsBacklogged; priorReconstituted = recordsReconstituted; - Log::log (LogInfo, "%d: Backlog: %d records backlogged, %d records reconstituted\n", + Log::log (LogInfo, I64FORMAT": Backlog: %d records backlogged, %d records reconstituted\n", database->deltaTime, deltaBacklogged, deltaReconstituted); } diff -Nrup a/storage/falcon/Cache.cpp b/storage/falcon/Cache.cpp --- a/storage/falcon/Cache.cpp 2008-03-27 01:08:55 -05:00 +++ b/storage/falcon/Cache.cpp 2008-04-08 02:06:46 -05:00 @@ -735,7 +735,7 @@ void Cache::syncFile(Dbb *dbb, const cha time_t delta = database->timestamp - start; if (delta > 1) - Log::log(LogInfo, "%d: %s %s sync: %d pages in %d seconds\n", database->deltaTime, fileName, text, writes, delta); + Log::log(LogInfo, I64FORMAT": %s %s sync: %d pages in %d seconds\n", database->deltaTime, fileName, text, writes, delta); } } @@ -908,7 +908,7 @@ void Cache::ioThread(void) syncWait.unlock(); if (writes > 0 && Log::isActive(LogInfo)) - Log::log(LogInfo, "%d: Cache flush: %d pages, %d writes in %d seconds (%d pps)\n", + Log::log(LogInfo, I64FORMAT": Cache flush: %d pages, %d writes in "I64FORMAT" seconds (%d pps)\n", database->deltaTime, pages, writes, delta, pages / MAX(delta, 1)); database->pageCacheFlushed(flushArg); @@ -996,7 +996,7 @@ void Cache::analyzeFlush(void) if (!dbb) return; - fprintf(traceFile, "-------- time %ld -------\n", database->deltaTime); + fprintf(traceFile, "-------- time "I64FORMAT" -------\n", database->deltaTime); for (int pageNumber = 0; (pageNumber = flushBitmap->nextSet(pageNumber)) >= 0;) if ( (bdb = findBdb(dbb, pageNumber)) ) diff -Nrup a/storage/falcon/Database.cpp b/storage/falcon/Database.cpp --- a/storage/falcon/Database.cpp 2008-04-05 17:09:13 -05:00 +++ b/storage/falcon/Database.cpp 2008-04-08 02:06:46 -05:00 @@ -1552,7 +1552,7 @@ void Database::execute(const char * sql) void Database::shutdown() { - Log::log("%d: Falcon shutdown\n", deltaTime); + Log::log(I64FORMAT": Falcon shutdown\n", deltaTime); if (shuttingDown) return; @@ -1831,7 +1831,7 @@ void Database::retireRecords(bool forced lowMemory = false; ***/ - Log::log(LogScavenge, "%d: Scavenged %d records, " I64FORMAT " bytes in %d seconds\n", + Log::log(LogScavenge, I64FORMAT": Scavenged %d records, " I64FORMAT " bytes in %d seconds\n", deltaTime, recordScavenge.recordsReclaimed, recordScavenge.spaceReclaimed, deltaTime - scavengeStart); total = recordScavenge.spaceRemaining; diff -Nrup a/storage/falcon/Dbb.cpp b/storage/falcon/Dbb.cpp --- a/storage/falcon/Dbb.cpp 2008-03-27 01:09:00 -05:00 +++ b/storage/falcon/Dbb.cpp 2008-04-08 02:06:46 -05:00 @@ -1155,7 +1155,7 @@ void Dbb::reportStatistics() if (!deltaReads && !deltaWrites && !deltaFetches) return; - Log::log (LogInfo, "%d: Activity on %s: %d fetches, %d reads, %d writes, %d flushWrites\n", database->deltaTime, + Log::log (LogInfo, I64FORMAT": Activity on %s: %d fetches, %d reads, %d writes, %d flushWrites\n", database->deltaTime, (const char*) fileName, deltaFetches, deltaReads, deltaWrites, deltaFlushWrites); priorReads = reads; diff -Nrup a/storage/falcon/DeferredIndex.cpp b/storage/falcon/DeferredIndex.cpp --- a/storage/falcon/DeferredIndex.cpp 2008-03-11 10:16:31 -05:00 +++ b/storage/falcon/DeferredIndex.cpp 2008-04-08 02:06:46 -05:00 @@ -861,8 +861,8 @@ void DeferredIndex::chill(Dbb *dbb) root = leaf; count = 0; - Log::debug("Def Index Chill: trxId=%-5ld indexId=%-7ld bytes=%8ld addr=%p vofs=%llx\n", - transaction->transactionId, index->indexId, sizeEstimate, this, virtualOffset); + Log::debug(I64FORMAT": Index chill: transaction %ld, index %ld, %ld bytes, address %p, vofs %llx\n", + dbb->database->deltaTime, transaction->transactionId, index->indexId, sizeEstimate, this, virtualOffset); } DINode* DeferredIndex::findMaxValue(void) diff -Nrup a/storage/falcon/RecordVersion.cpp b/storage/falcon/RecordVersion.cpp --- a/storage/falcon/RecordVersion.cpp 2008-03-31 17:00:52 -05:00 +++ b/storage/falcon/RecordVersion.cpp 2008-04-08 02:06:46 -05:00 @@ -382,7 +382,8 @@ int RecordVersion::thaw() if (table->debugThawedBytes >= table->database->configuration->recordChillThreshold) { - Log::debug("Record Thaw/Fetch: table=%-5ld records=%7ld bytes=%8ld\n",table->tableId, table->debugThawedRecords, table->debugThawedBytes); + Log::debug(I64FORMAT": Record thaw (fetch): table %d, %ld records, %ld bytes\n", this->format->table->database->deltaTime, + table->tableId, table->debugThawedRecords, table->debugThawedBytes); table->debugThawedRecords = 0; table->debugThawedBytes = 0; } diff -Nrup a/storage/falcon/SRLUpdateIndex.cpp b/storage/falcon/SRLUpdateIndex.cpp --- a/storage/falcon/SRLUpdateIndex.cpp 2008-03-11 11:15:40 -05:00 +++ b/storage/falcon/SRLUpdateIndex.cpp 2008-04-08 02:06:46 -05:00 @@ -15,6 +15,7 @@ #include #include "Engine.h" +#include "Database.h" #include "SRLUpdateIndex.h" #include "DeferredIndex.h" #include "Index.h" @@ -215,8 +216,8 @@ void SRLUpdateIndex::thaw(DeferredIndex* TransId transId = trans->transactionId; indexId = deferredIndex->index->indexId; - Log::debug("Def Index Thaw: trxId=%-5ld indexId=%-7ld bytes=%8ld addr=%p vofs=%llx\n", - transId, indexId, deferredIndex->sizeEstimate, this, virtualOffset); + Log::debug(I64FORMAT": Index thaw: transaction %ld, index %ld, %ld bytes, address %p, vofs %llx\n", + log->database->deltaTime, transId, indexId, deferredIndex->sizeEstimate, this, virtualOffset); // Find the window where the DeferredIndex is stored using the virtualOffset, // then activate the window, reading from disk if necessary. @@ -268,8 +269,8 @@ void SRLUpdateIndex::thaw(DeferredIndex* ASSERT(indexId == deferredIndex->index->indexId); ASSERT(indexVersion == deferredIndex->index->indexVersion); - Log::debug("Def Index Thaw: trxId=%-5ld indexId=%-7ld bytes=%8ld addr=%p version=%ld\n", - transactionId, indexId, dataLength, this, indexVersion); + Log::debug(I64FORMAT": Index thaw: transaction %ld, index %ld, %ld bytes, address %p, version %ld\n", + log->database->deltaTime, transactionId, indexId, dataLength, this, indexVersion); IndexKey indexKey(deferredIndex->index); diff -Nrup a/storage/falcon/SerialLog.cpp b/storage/falcon/SerialLog.cpp --- a/storage/falcon/SerialLog.cpp 2008-03-24 22:54:45 -05:00 +++ b/storage/falcon/SerialLog.cpp 2008-04-08 02:06:47 -05:00 @@ -598,7 +598,7 @@ void SerialLog::createNewWindow(void) } if (fileOffset == 0 && Log::isActive(LogInfo)) - Log::log(LogInfo, "%d: Switching log files (%d used)\n", database->deltaTime, file->highWater); + Log::log(LogInfo, I64FORMAT": Switching log files (%d used)\n", database->deltaTime, file->highWater); writeWindow->deactivateWindow(); writeWindow = allocWindow(file, fileOffset); @@ -1343,7 +1343,7 @@ void SerialLog::reportStatistics(void) if (count != priorCount || (uint64) delta != priorDelta || priorWrites != writes) { - Log::log(LogInfo, "%d: SerialLog: %d reads, %d writes, %d transactions, %d completed, %d stalls, " I64FORMAT " blocks, %d windows\n", + Log::log(LogInfo, I64FORMAT": SerialLog: %d reads, %d writes, %d transactions, %d completed, %d stalls, " I64FORMAT " blocks, %d windows\n", database->deltaTime, reads, writes, count, commits, stalls, delta, windows); priorCount = count; priorDelta = delta; diff -Nrup a/storage/falcon/StorageHandler.cpp b/storage/falcon/StorageHandler.cpp --- a/storage/falcon/StorageHandler.cpp 2008-04-05 17:09:14 -05:00 +++ b/storage/falcon/StorageHandler.cpp 2008-04-08 02:06:47 -05:00 @@ -94,11 +94,11 @@ int init() { const char *p; - for (p = WHITE_SPACE; *p;) - charTable[*p++] = 1; + for (p = WHITE_SPACE; *p; p++) + charTable[(unsigned char)*p] = 1; - for (p = PUNCTUATION_CHARS; *p;) - charTable[*p++] = 1; + for (p = PUNCTUATION_CHARS; *p; p++) + charTable[(unsigned char)*p] = 1; return 1; } diff -Nrup a/storage/falcon/Transaction.cpp b/storage/falcon/Transaction.cpp --- a/storage/falcon/Transaction.cpp 2008-03-12 08:15:24 -05:00 +++ b/storage/falcon/Transaction.cpp 2008-04-08 02:06:47 -05:00 @@ -247,7 +247,7 @@ void Transaction::commit() TransactionManager *transactionManager = database->transactionManager; addRef(); - Log::log(LogXARecovery, "%d: Commit transaction %d\n", database->deltaTime, transactionId); + Log::log(LogXARecovery, I64FORMAT": Commit transaction %d\n", database->deltaTime, transactionId); if (state == Active) { @@ -547,8 +547,8 @@ void Transaction::chillRecords() if (database->lowMemory) backlogRecords(); - Log::debug("%d: Record Chill: trxId=%-5ld records=%7ld bytes=%8ld\n", database->deltaTime, - transactionId, chilledRecords-chilledBefore, (uint32)(totalDataBefore-totalRecordData), committedRecords); + Log::debug(I64FORMAT": Record chill: transaction %ld, %ld records, %ld bytes\n", database->deltaTime, transactionId, chilledRecords-chilledBefore, + (uint32)(totalDataBefore-totalRecordData), committedRecords); } int Transaction::thaw(RecordVersion * record) @@ -581,7 +581,7 @@ int Transaction::thaw(RecordVersion * re { // Log::debug("%06ld Record Thaw/SRL: recId:%8ld addr:%p vofs:%8llx trxId:%6ld total recs:%7ld chilled:%7ld thawed:%7ld bytes:%8ld commits:%6ld\n", // (uint32)clock(), record->recordNumber, record, record->virtualOffset, transactionId, totalRecords, chilledRecords, thawedRecords, (uint32)totalRecordData, committedRecords); - Log::debug("Record Thaw/SRL: trxId=%-5ld records=%7ld bytes=%8ld\n", transactionId, debugThawedRecords, debugThawedBytes); + Log::debug(I64FORMAT": Record thaw: transaction %ld, %ld records, %ld bytes\n", database->deltaTime, transactionId, debugThawedRecords, debugThawedBytes); debugThawedRecords = 0; debugThawedBytes = 0; } diff -Nrup a/storage/falcon/TransactionManager.cpp b/storage/falcon/TransactionManager.cpp --- a/storage/falcon/TransactionManager.cpp 2008-03-11 10:16:31 -05:00 +++ b/storage/falcon/TransactionManager.cpp 2008-04-08 02:06:47 -05:00 @@ -365,7 +365,7 @@ void TransactionManager::reportStatistic priorRolledBack = rolledBack; if ((active || numberCommitted || numberRolledBack) && Log::isActive(LogInfo)) - Log::log (LogInfo, "%d: Transactions: %d committed, %d rolled back, %d active, %d post-commit, oldest %d seconds\n", + Log::log (LogInfo, I64FORMAT": Transactions: %d committed, %d rolled back, %d active, %d post-commit, oldest %d seconds\n", database->deltaTime, numberCommitted, numberRolledBack, active, pendingCleanup, maxTime); }