diff --git a/autotests/unit/engine/mtimedbtest.cpp b/autotests/unit/engine/mtimedbtest.cpp --- a/autotests/unit/engine/mtimedbtest.cpp +++ b/autotests/unit/engine/mtimedbtest.cpp @@ -47,6 +47,9 @@ QCOMPARE(db.get(5), QVector() << 1 << 2 << 3); db.del(5, 2); QCOMPARE(db.get(5), QVector() << 1 << 3); + + QCOMPARE(db.get(4), QVector()); + QCOMPARE(db.get(6), QVector()); } void testIter() { diff --git a/src/engine/mtimedb.cpp b/src/engine/mtimedb.cpp --- a/src/engine/mtimedb.cpp +++ b/src/engine/mtimedb.cpp @@ -94,7 +94,7 @@ mdb_cursor_open(m_txn, m_dbi, &cursor); MDB_val val{0, nullptr}; - int rc = mdb_cursor_get(cursor, &key, &val, MDB_SET_RANGE); + int rc = mdb_cursor_get(cursor, &key, &val, MDB_SET); if (rc) { if (rc != MDB_NOTFOUND) { qCWarning(ENGINE) << "MTimeDB::get" << mtime << mdb_strerror(rc);