1
0
Fork 0
forked from blue/lmdbal

cache change bugfix, covered that case with unit tests, unittests for forcing records

This commit is contained in:
Blue 2023-03-09 22:50:53 +03:00
parent a79dae8fd0
commit 6a8f67ac34
Signed by untrusted user: blue
GPG key ID: 9B203B252A63EE38
2 changed files with 60 additions and 1 deletions

View file

@ -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);