Fix swapping key numeric values on Big Endian machines.

Fix typo error in CntIndexRange for big endian swapping
  modified:   storage/connect/connect.cc
This commit is contained in:
Olivier Bertrand 2015-06-03 11:38:34 +02:00
parent 37a803c805
commit 4821cd949e

View file

@ -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