forked from blue/lmdbal
cache change bugfix, covered that case with unit tests, unittests for forcing records
This commit is contained in:
parent
a79dae8fd0
commit
6a8f67ac34
2 changed files with 60 additions and 1 deletions
|
@ -90,7 +90,7 @@ void DataBase::Cache<K, V>::changeRecord(const K& key, const V& value) {
|
|||
|
||||
if (*mode == Mode::full) {
|
||||
typename std::map<K, V>::iterator itr = cache->find(key);
|
||||
if (itr != cache->end()) {
|
||||
if (itr == cache->end()) {
|
||||
throw NotFound(DataBase::_Table::toString(key), DataBase::Table<K, V>::db->name, DataBase::Table<K, V>::name);
|
||||
}
|
||||
Table<K, V>::changeRecord(key, value);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue