diff options
author | unknown <ram@mysql.r18.ru> | 2003-09-02 21:09:28 +0500 |
---|---|---|
committer | unknown <ram@mysql.r18.ru> | 2003-09-02 21:09:28 +0500 |
commit | e1af4a65dcfd53db807bf08fb4f06a465073cb57 (patch) | |
tree | 64dd3eb7aacee6048ce2101a1dcda308b5ed9dfd /sql/ha_berkeley.cc | |
parent | d63ce665c7dc2e0308950267eee7059c7f1b3ce5 (diff) | |
download | mariadb-git-e1af4a65dcfd53db807bf08fb4f06a465073cb57.tar.gz |
Fix for the bug #971: ORDER BY DESC doesn't return correct num of rows with BDB and an indexed column.
Diffstat (limited to 'sql/ha_berkeley.cc')
-rw-r--r-- | sql/ha_berkeley.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sql/ha_berkeley.cc b/sql/ha_berkeley.cc index 2154fbd7a32..78704a18052 100644 --- a/sql/ha_berkeley.cc +++ b/sql/ha_berkeley.cc @@ -1420,6 +1420,8 @@ int ha_berkeley::index_read(byte * buf, const byte * key, bzero((char*) &row,sizeof(row)); if (key_len == key_info->key_length) { + if (find_flag == HA_READ_AFTER_KEY) + key_info->handler.bdb_return_if_eq= 1; error=read_row(cursor->c_get(cursor, pack_key(&last_key, active_index, key_buff, @@ -1428,6 +1430,7 @@ int ha_berkeley::index_read(byte * buf, const byte * key, (find_flag == HA_READ_KEY_EXACT ? DB_SET : DB_SET_RANGE)), (char*) buf, active_index, &row, (DBT*) 0, 0); + key_info->handler.bdb_return_if_eq= 0; } else { |