8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-22 22:43:03 +01:00

This should fix blockage reported by Ilya Eremin (@ilya071294) privately.

This commit is contained in:
Vlad Khorsun 2023-09-12 18:57:33 +03:00
parent daf72b15c6
commit 66f6030467

View File

@ -53,23 +53,32 @@ public:
{ {
Item* item = m_map.lookup(page); Item* item = m_map.lookup(page);
if (!item) if (item)
return nullptr; {
if (item->m_bdb->bdb_page == page)
{
// Move item into MRU position
if (m_list != item) if (m_list != item)
{ {
listRemove(item); listRemove(item);
listInsert(item); listInsert(item);
} }
return item->m_bdb; return item->m_bdb;
} }
// bdb was reassigned
remove(page);
}
return nullptr;
}
void put(BufferDesc* bdb) void put(BufferDesc* bdb)
{ {
Item* item = m_map.lookup(bdb->bdb_page); Item* item = m_map.lookup(bdb->bdb_page);
if (item) if (item)
{ {
fb_assert(item->m_bdb != bdb);
if (m_list != item) if (m_list != item)
listRemove(item); listRemove(item);
} }