diff options
-rw-r--r-- | common/storage_lmdb.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/common/storage_lmdb.cpp b/common/storage_lmdb.cpp index 4ac5724..2f6e7e1 100644 --- a/common/storage_lmdb.cpp +++ b/common/storage_lmdb.cpp | |||
@@ -595,14 +595,17 @@ int DataStore::NamedDatabase::findAllInRange(const QByteArray &lowerBound, const | |||
595 | return 0; | 595 | return 0; |
596 | } | 596 | } |
597 | 597 | ||
598 | int count = 0; | ||
598 | do { | 599 | do { |
599 | const auto currentBAKey = QByteArray::fromRawData((char *)currentKey.mv_data, currentKey.mv_size); | 600 | const auto currentBAKey = QByteArray::fromRawData((char *)currentKey.mv_data, currentKey.mv_size); |
600 | const auto currentBAValue = QByteArray::fromRawData((char *)data.mv_data, data.mv_size); | 601 | const auto currentBAValue = QByteArray::fromRawData((char *)data.mv_data, data.mv_size); |
601 | resultHandler(currentBAKey, currentBAValue); | 602 | resultHandler(currentBAKey, currentBAValue); |
603 | count++; | ||
602 | } while (mdb_cursor_get(cursor, ¤tKey, &data, MDB_NEXT) == MDB_SUCCESS && | 604 | } while (mdb_cursor_get(cursor, ¤tKey, &data, MDB_NEXT) == MDB_SUCCESS && |
603 | mdb_cmp(d->transaction, d->dbi, ¤tKey, &idealLastKey) <= 0); | 605 | mdb_cmp(d->transaction, d->dbi, ¤tKey, &idealLastKey) <= 0); |
604 | 606 | ||
605 | mdb_cursor_close(cursor); | 607 | mdb_cursor_close(cursor); |
608 | return count; | ||
606 | } | 609 | } |
607 | 610 | ||
608 | qint64 DataStore::NamedDatabase::getSize() | 611 | qint64 DataStore::NamedDatabase::getSize() |