Commit 7c6b3d6c authored by tomas@poseidon.mysql.com's avatar tomas@poseidon.mysql.com

Merge poseidon.mysql.com:/home/tomas/mysql-5.0-telco-gca-ndb_restore

into  poseidon.mysql.com:/home/tomas/mysql-5.1-telco-gca-ndb_restore
parents da38893f e53f8734
...@@ -233,17 +233,26 @@ ndbrecattr_print_formatted(NdbOut& out, const NdbRecAttr &r, ...@@ -233,17 +233,26 @@ ndbrecattr_print_formatted(NdbOut& out, const NdbRecAttr &r,
out << r.u_64_value(); out << r.u_64_value();
break; break;
case NdbDictionary::Column::Bit: case NdbDictionary::Column::Bit:
for (j = (length-1)/32 + 1; j > 0; j--) out << f.hex_prefix << "0x";
if (*((Uint32*)r.aRef() + j - 1)) if (length < 33)
break;
if (j == 0)
{ {
out << "0x0"; out.print("%X", r.u_32_value());
break; }
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);
} }
out << f.hex_prefix << "0x";
for (; j > 0; j--)
out.print("%X", *((Uint32*)r.aRef() + j - 1));
break; break;
case NdbDictionary::Column::Unsigned: case NdbDictionary::Column::Unsigned:
if (length > 1) if (length > 1)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment