summaryrefslogtreecommitdiff
path: root/storage/innobase
diff options
context:
space:
mode:
authorunknown <antony@pcg5ppc.xiphis.org>2007-08-29 13:02:02 -0700
committerunknown <antony@pcg5ppc.xiphis.org>2007-08-29 13:02:02 -0700
commit053c9d1c473df4e1457992ee6a39da3e0cb39bdd (patch)
tree9e6f8d3a376befdc1a54203ac9def407c7717c5b /storage/innobase
parent3e82da7a7218dfc59c0093e7c9dbb8d52027c35c (diff)
downloadmariadb-git-053c9d1c473df4e1457992ee6a39da3e0cb39bdd.tar.gz
Fix pushbuild test failures which occur on big-endian systems.
Do not convert innodb autoincrement value to little endian when on big endian systems. storage/innobase/row/row0sel.c: Do not convert innodb autoincrement value to little endian when on big endian systems.
Diffstat (limited to 'storage/innobase')
-rw-r--r--storage/innobase/row/row0sel.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/storage/innobase/row/row0sel.c b/storage/innobase/row/row0sel.c
index ee79bc94906..9cb4e0f6f20 100644
--- a/storage/innobase/row/row0sel.c
+++ b/storage/innobase/row/row0sel.c
@@ -4555,6 +4555,15 @@ row_search_autoinc_read_column(
ut_a(len != UNIV_SQL_NULL);
ut_a(len <= sizeof value);
+#ifdef WORDS_BIGENDIAN
+ /* Copy integer data and restore sign bit */
+
+ memcpy((ptr = dest), data, len);
+
+ if (!unsigned_type) {
+ dest[0] ^= 128;
+ }
+#else
/* Convert integer data from Innobase to a little-endian format,
sign bit restored to normal */
@@ -4566,6 +4575,7 @@ row_search_autoinc_read_column(
if (!unsigned_type) {
dest[len - 1] ^= 128;
}
+#endif
/* The assumption here is that the AUTOINC value can't be negative.*/
switch (len) {