summaryrefslogtreecommitdiff
path: root/ndb/src
diff options
context:
space:
mode:
authorunknown <tomas@whalegate.ndb.mysql.com>2007-03-26 17:57:00 +0200
committerunknown <tomas@whalegate.ndb.mysql.com>2007-03-26 17:57:00 +0200
commitd24dab182f8366e1e0ee74248ab38d6df26abcd3 (patch)
tree3db75170d1da346fddb2fe789ef148a9590885f1 /ndb/src
parent05a352bb99e7f5889f19df74b915bc929ca3a419 (diff)
downloadmariadb-git-d24dab182f8366e1e0ee74248ab38d6df26abcd3.tar.gz
correct medium int printout
correct cit printout correct bit store retrieve ndb/include/ndbapi/NdbRecAttr.hpp: correct medium int printout ndb/src/ndbapi/NdbRecAttr.cpp: correct cit printout sql/ha_ndbcluster.cc: correct bit store retrieve
Diffstat (limited to 'ndb/src')
-rw-r--r--ndb/src/ndbapi/NdbRecAttr.cpp23
1 files changed, 6 insertions, 17 deletions
diff --git a/ndb/src/ndbapi/NdbRecAttr.cpp b/ndb/src/ndbapi/NdbRecAttr.cpp
index a0c394603c5..90808a706d4 100644
--- a/ndb/src/ndbapi/NdbRecAttr.cpp
+++ b/ndb/src/ndbapi/NdbRecAttr.cpp
@@ -236,24 +236,13 @@ ndbrecattr_print_formatted(NdbOut& out, const NdbRecAttr &r,
break;
case NdbDictionary::Column::Bit:
out << f.hex_prefix << "0x";
- if (length < 33)
{
- out.print("%X", r.u_32_value());
- }
- else if (length < 65)
- {
- out.print("%llX", r.u_64_value());
- }
- else
- {
- const unsigned char *buf = (unsigned char *)r.aRef();
- int k = 4*((length+31)/32);
- while (k > 0 && (*(buf + --k) == 0));
- do
- {
- out.print("%X", (Uint32)*(buf + k--));
- }
- while (k >= 0);
+ const Uint32 *buf = (Uint32 *)r.aRef();
+ int k = (length+31)/32;
+ while (k > 0 && (buf[--k] == 0));
+ out.print("%X", buf[k]);
+ while (k > 0)
+ out.print("%.8X", buf[--k]);
}
break;
case NdbDictionary::Column::Unsigned: