diff options
author | unknown <jonas@perch.ndb.mysql.com> | 2007-01-12 15:50:51 +0100 |
---|---|---|
committer | unknown <jonas@perch.ndb.mysql.com> | 2007-01-12 15:50:51 +0100 |
commit | f97eae8a9fc1749b2fe351c81d8fbfaa75c60acc (patch) | |
tree | 0145ee5503cddf166fe5ffc4cf4ac6fa93e836c7 /storage/ndb/src/ndbapi/NdbScanOperation.cpp | |
parent | f3488d3a6989fd4e9b22ec1dd39cc36c71ec57eb (diff) | |
parent | 6226586c466891989fd35a7d129d632e597ec1e1 (diff) | |
download | mariadb-git-f97eae8a9fc1749b2fe351c81d8fbfaa75c60acc.tar.gz |
Merge perch.ndb.mysql.com:/home/jonas/src/51-work
into perch.ndb.mysql.com:/home/jonas/src/mysql-5.1-new-ndb
storage/ndb/src/ndbapi/NdbScanOperation.cpp:
Auto merged
Diffstat (limited to 'storage/ndb/src/ndbapi/NdbScanOperation.cpp')
-rw-r--r-- | storage/ndb/src/ndbapi/NdbScanOperation.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/storage/ndb/src/ndbapi/NdbScanOperation.cpp b/storage/ndb/src/ndbapi/NdbScanOperation.cpp index 9b26ba6f0ab..6e867df47a2 100644 --- a/storage/ndb/src/ndbapi/NdbScanOperation.cpp +++ b/storage/ndb/src/ndbapi/NdbScanOperation.cpp @@ -1187,25 +1187,31 @@ NdbIndexScanOperation::setBound(const NdbColumnImpl* tAttrInfo, const bool nobytes = (len & 0x3) == 0; const Uint32 totalLen = 2 + sizeInWords; Uint32 tupKeyLen = theTupKeyLen; + union { + Uint32 tempData[2000]; + Uint64 __align; + }; + Uint64 *valPtr; if(remaining > totalLen && aligned && nobytes){ Uint32 * dst = theKEYINFOptr + currLen; * dst ++ = type; * dst ++ = ahValue; memcpy(dst, aValue, 4 * sizeInWords); theTotalNrOfKeyWordInSignal = currLen + totalLen; + valPtr = (Uint64*)aValue; } else { if(!aligned || !nobytes){ - Uint32 tempData[2000]; tempData[0] = type; tempData[1] = ahValue; tempData[2 + (len >> 2)] = 0; memcpy(tempData+2, aValue, len); - insertBOUNDS(tempData, 2+sizeInWords); + valPtr = (Uint64*)(tempData+2); } else { Uint32 buf[2] = { type, ahValue }; insertBOUNDS(buf, 2); insertBOUNDS((Uint32*)aValue, sizeInWords); + valPtr = (Uint64*)aValue; } } theTupKeyLen = tupKeyLen + totalLen; @@ -1222,7 +1228,7 @@ NdbIndexScanOperation::setBound(const NdbColumnImpl* tAttrInfo, if(type == BoundEQ && tDistrKey) { theNoOfTupKeyLeft--; - return handle_distribution_key((Uint64*)aValue, sizeInWords); + return handle_distribution_key(valPtr, sizeInWords); } return 0; } else { |