Fix pushbuild test failures which occur on big-endian systems.

  Do not convert innodb autoincrement value to little endian when on
  big endian systems.
parent f85fa9c0
...@@ -4555,6 +4555,15 @@ row_search_autoinc_read_column( ...@@ -4555,6 +4555,15 @@ row_search_autoinc_read_column(
ut_a(len != UNIV_SQL_NULL); ut_a(len != UNIV_SQL_NULL);
ut_a(len <= sizeof value); 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, /* Convert integer data from Innobase to a little-endian format,
sign bit restored to normal */ sign bit restored to normal */
...@@ -4566,6 +4575,7 @@ row_search_autoinc_read_column( ...@@ -4566,6 +4575,7 @@ row_search_autoinc_read_column(
if (!unsigned_type) { if (!unsigned_type) {
dest[len - 1] ^= 128; dest[len - 1] ^= 128;
} }
#endif
/* The assumption here is that the AUTOINC value can't be negative.*/ /* The assumption here is that the AUTOINC value can't be negative.*/
switch (len) { switch (len) {
......
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