Commit 4821cd94 authored by Olivier Bertrand's avatar Olivier Bertrand

Fix swapping key numeric values on Big Endian machines.

Fix typo error in CntIndexRange for big endian swapping
  modified:   storage/connect/connect.cc
parent 37a803c8
......@@ -925,8 +925,8 @@ int CntIndexRange(PGLOBAL g, PTDB ptdb, const uchar* *key, uint *len,
if (!valp->IsTypeNum()) {
if (colp->GetColUse(U_VAR)) {
#if defined(WORDS_BIGENDIAN)
((char*)&lg)[0]= ((char*)kp)[1];
((char*)&lg)[1]= ((char*)kp)[0];
((char*)&lg)[0]= ((char*)p)[1];
((char*)&lg)[1]= ((char*)p)[0];
#else // !WORDS_BIGENDIAN
lg= *(short*)p;
#endif //!WORDS_BIGENDIAN
......
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