diff options
author | unknown <tomas@whalegate.ndb.mysql.com> | 2007-09-04 22:25:23 +0200 |
---|---|---|
committer | unknown <tomas@whalegate.ndb.mysql.com> | 2007-09-04 22:25:23 +0200 |
commit | 5231a4d90bd9766beb0c5ae9c216ea49b31cd8d4 (patch) | |
tree | 0aa369e0a997c10934df6dc7824680396f77fae9 /storage | |
parent | 39a892aa3f2c1d8638bcb56c385105adc3cd5db1 (diff) | |
parent | 7de80833d907420b30b58028c565df8bcf9e95f5 (diff) | |
download | mariadb-git-5231a4d90bd9766beb0c5ae9c216ea49b31cd8d4.tar.gz |
Merge whalegate.ndb.mysql.com:/home/tomas/mysql-5.1-target-5.1.22
into whalegate.ndb.mysql.com:/home/tomas/mysql-5.1-new-ndb
Diffstat (limited to 'storage')
-rw-r--r-- | storage/innobase/row/row0sel.c | 10 |
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) { |