From: Date: October 13 2006 12:09pm Subject: bk commit into 5.0 tree (jonas:1.2259) BUG#23203 List-Archive: http://lists.mysql.com/commits/13648 X-Bug: 23203 Message-Id: <20061013100944.F29D259BF49@perch.ndb.mysql.com> Below is the list of changes that have just been committed into a local 5.0 repository of jonas. When jonas 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, 2006-10-13 12:09:41+02:00, jonas@stripped +4 -0 ndb - bug#23203 1) Handle not started nodes in dump 1000 (check for division by 0) 2) Make sure to init variables in constructor ndb/src/common/debugger/EventLogger.cpp@stripped, 2006-10-13 12:09:39+02:00, jonas@stripped +2 -2 Handle not started nodes ndb/src/kernel/blocks/dbacc/DbaccInit.cpp@stripped, 2006-10-13 12:09:39+02:00, jonas@stripped +1 -0 Init variables in constructor ndb/src/kernel/blocks/dbacc/DbaccMain.cpp@stripped, 2006-10-13 12:09:39+02:00, jonas@stripped +1 -1 Handle not started nodes ndb/src/kernel/blocks/dbtup/DbtupGen.cpp@stripped, 2006-10-13 12:09:39+02:00, jonas@stripped +2 -1 Init variables in constructor Handle not started nodes # 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: jonas # Host: perch.ndb.mysql.com # Root: /home/jonas/src/50-work --- 1.26/ndb/src/common/debugger/EventLogger.cpp 2006-10-13 12:09:44 +02:00 +++ 1.27/ndb/src/common/debugger/EventLogger.cpp 2006-10-13 12:09:44 +02:00 @@ -647,8 +647,8 @@ const int used = theData[3]; const int total = theData[4]; const int block = theData[5]; - const int percent = (used*100)/total; - + const int percent = total ? (used*100)/total : 0; + BaseString::snprintf(m_text, m_text_len, "%s usage %s %d%s(%d %dK pages of total %d)", (block==DBACC ? "Index" : (block == DBTUP ?"Data":"")), --- 1.15/ndb/src/kernel/blocks/dbacc/DbaccInit.cpp 2006-10-13 12:09:44 +02:00 +++ 1.16/ndb/src/kernel/blocks/dbacc/DbaccInit.cpp 2006-10-13 12:09:44 +02:00 @@ -53,6 +53,7 @@ tabrec = 0; undopage = 0; + cnoOfAllocatedPages = cpagesize = 0; // Records with constant sizes }//Dbacc::initData() --- 1.59/ndb/src/kernel/blocks/dbacc/DbaccMain.cpp 2006-10-13 12:09:44 +02:00 +++ 1.60/ndb/src/kernel/blocks/dbacc/DbaccMain.cpp 2006-10-13 12:09:44 +02:00 @@ -177,7 +177,7 @@ case ZREPORT_MEMORY_USAGE:{ jam(); static int c_currentMemUsed = 0; - int now = (cnoOfAllocatedPages * 100)/cpagesize; + int now = cpagesize ? (cnoOfAllocatedPages * 100)/cpagesize : 0; const int thresholds[] = { 99, 90, 80, 0}; Uint32 i = 0; --- 1.19/ndb/src/kernel/blocks/dbtup/DbtupGen.cpp 2006-10-13 12:09:44 +02:00 +++ 1.20/ndb/src/kernel/blocks/dbtup/DbtupGen.cpp 2006-10-13 12:09:44 +02:00 @@ -142,6 +142,7 @@ tablerec = 0; tableDescriptor = 0; undoPage = 0; + cnoOfPage = cnoOfAllocatedPages = 0; }//Dbtup::Dbtup() Dbtup::~Dbtup() @@ -526,7 +527,7 @@ case ZREPORT_MEMORY_USAGE:{ ljam(); static int c_currentMemUsed = 0; - int now = (cnoOfAllocatedPages * 100)/cnoOfPage; + int now = cnoOfPage ? (cnoOfAllocatedPages * 100)/cnoOfPage : 0; const int thresholds[] = { 100, 90, 80, 0 }; Uint32 i = 0;