MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:Magnus Blåudd Date:November 13 2009 11:12am
Subject:bzr commit into mysql-5.1-telco-7.0 branch (magnus.blaudd:3229)
View as plain text  
#At file:///home/msvensson/mysql/7.0-bug48669/ based on revid:ja222676@loki27-20091113051610-62h1e8f5ghifqay6

 3229 Magnus Blåudd	2009-11-13
      ndb
       - fix bug in pretty printer for Bitmask causing only
         the first 63 bits to be printed. Size is given
         in number of words not bytes 

    modified:
      storage/ndb/src/common/util/BaseString.cpp
=== modified file 'storage/ndb/src/common/util/BaseString.cpp'
--- a/storage/ndb/src/common/util/BaseString.cpp	2009-07-16 16:36:20 +0000
+++ b/storage/ndb/src/common/util/BaseString.cpp	2009-11-13 11:11:12 +0000
@@ -500,9 +500,10 @@ BaseString
 BaseString::getPrettyText(unsigned size, const Uint32 data[])
 {
   const char* delimiter = "";
-  unsigned i, found = 0, MAX_BITS = 8 * size;
+  unsigned found = 0;
+  const unsigned MAX_BITS = sizeof(Uint32) * 8 * size;
   BaseString to;
-  for (i = 0; i < MAX_BITS; i++)
+  for (unsigned i = 0; i < MAX_BITS; i++)
   {
     if (BitmaskImpl::get(size, data, i))
     {
@@ -521,9 +522,9 @@ BaseString
 BaseString::getPrettyTextShort(unsigned size, const Uint32 data[])
 {
   const char* delimiter = "";
-  unsigned i, MAX_BITS = 8 * size;
+  const unsigned MAX_BITS = sizeof(Uint32) * 8 * size;
   BaseString to;
-  for (i = 0; i < MAX_BITS; i++)
+  for (unsigned i = 0; i < MAX_BITS; i++)
   {
     if (BitmaskImpl::get(size, data, i))
     {

Attachment: [text/bzr-bundle] bzr/magnus.blaudd@sun.com-20091113111112-3jvk5gik3cn21w5p.bundle
Thread
bzr commit into mysql-5.1-telco-7.0 branch (magnus.blaudd:3229)Magnus Blåudd13 Nov