diff options
author | sergefp@mysql.com <> | 2007-07-26 20:52:53 +0400 |
---|---|---|
committer | sergefp@mysql.com <> | 2007-07-26 20:52:53 +0400 |
commit | 9c8262da33ba0840dd6abc645e4e06e58ed0a493 (patch) | |
tree | e329846ca4795ac7e29eba12011f218496014ad8 /sql/ha_berkeley.cc | |
parent | 9bc5e92614bcb7f287bfb6438a75c98833f35408 (diff) | |
download | mariadb-git-9c8262da33ba0840dd6abc645e4e06e58ed0a493.tar.gz |
BUG#28591: make the fix work for BDB tables too:
- make ha_berkeley::cmp_ref() take into account that auto-generated PKs
are stored in LSB-first order.
- Remove the temporary code that made the bugfix work for innodb only
Diffstat (limited to 'sql/ha_berkeley.cc')
-rw-r--r-- | sql/ha_berkeley.cc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sql/ha_berkeley.cc b/sql/ha_berkeley.cc index 2a5fe775ca6..fbfd5031656 100644 --- a/sql/ha_berkeley.cc +++ b/sql/ha_berkeley.cc @@ -2646,7 +2646,11 @@ ha_rows ha_berkeley::estimate_rows_upper_bound() int ha_berkeley::cmp_ref(const byte *ref1, const byte *ref2) { if (hidden_primary_key) - return memcmp(ref1, ref2, BDB_HIDDEN_PRIMARY_KEY_LENGTH); + { + ulonglong a=uint5korr((char*) ref1); + ulonglong b=uint5korr((char*) ref2); + return a < b ? -1 : (a > b ? 1 : 0); + } int result; Field *field; |