summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlivier Bertrand <bertrandop@gmail.com>2015-06-03 10:07:33 +0200
committerOlivier Bertrand <bertrandop@gmail.com>2015-06-03 10:07:33 +0200
commit65ed25446807efc0fe4482b69f6d76bf830c29f8 (patch)
tree4d0a806f8f99ea6f55e01c286f396600d89a3b25
parent70d80305a87e04d8cea577a19666489b828f346c (diff)
downloadmariadb-git-65ed25446807efc0fe4482b69f6d76bf830c29f8.tar.gz
Fix swapping key numeric values on Big Endian machines.
Change the preprocessor variable used from BIG_ENDIAN_ORDER (only used by taoscript) to WORDS_BIGENDIAN. modified: storage/connect/connect.cc
-rw-r--r--storage/connect/connect.cc16
1 files changed, 8 insertions, 8 deletions
diff --git a/storage/connect/connect.cc b/storage/connect/connect.cc
index fd5cb164e05..cc95ff0cacc 100644
--- a/storage/connect/connect.cc
+++ b/storage/connect/connect.cc
@@ -709,7 +709,7 @@ int CntIndexInit(PGLOBAL g, PTDB ptdb, int id, bool sorted)
return (tdbp->To_Kindex->IsMul()) ? 2 : 1;
} // end of CntIndexInit
-#if defined(BIG_ENDIAN_ORDER)
+#if defined(WORDS_BIGENDIAN)
/***********************************************************************/
/* Swap bytes of the key that are written in little endian order. */
/***********************************************************************/
@@ -729,7 +729,7 @@ static void SetSwapValue(PVAL valp, char *kp)
valp->SetBinValue((void*)kp);
} // end of SetSwapValue
-#endif //LITTLE ENDIAN
+#endif // WORDS_BIGENDIAN
/***********************************************************************/
/* IndexRead: fetch a record having the index value. */
@@ -819,11 +819,11 @@ RCODE CntIndexRead(PGLOBAL g, PTDB ptdb, OPVAL op,
} // endif b
} else
-#if defined(BIG_ENDIAN_ORDER)
+#if defined(WORDS_BIGENDIAN)
SetSwapValue(valp, kp);
-#else // LITTLE ENDIAN
+#else // !WORDS_BIGENDIAN
valp->SetBinValue((void*)kp);
-#endif //LITTLE ENDIAN
+#endif //!WORDS_BIGENDIAN
kp+= valp->GetClen();
@@ -938,11 +938,11 @@ int CntIndexRange(PGLOBAL g, PTDB ptdb, const uchar* *key, uint *len,
} // endif b
} else
-#if defined(BIG_ENDIAN_ORDER)
+#if defined(WORDS_BIGENDIAN)
SetSwapValue(valp, (char*)kp);
-#else // LITTLE ENDIAN
+#else // !WORDS_BIGENDIAN
valp->SetBinValue((void*)kp);
-#endif //LITTLE ENDIAN
+#endif // !WORDS_BIGENDIAN
if (trace) {
char bf[32];