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

FiFixed bug CORE-3465 : Nbackup state lock could be not released after cache error. It results in "Can't lock state for write" bugcheck when backup state is going to be changed.

This commit is contained in:
hvlad 2011-05-05 17:40:54 +00:00
parent dc30e39fd7
commit 5bbff34ac1

View File

@ -2235,6 +2235,8 @@ void CCH_unwind(thread_db* tdbb, const bool punt)
if (bdb->bdb_flags & BDB_marked) { if (bdb->bdb_flags & BDB_marked) {
BUGCHECK(268); // msg 268 buffer marked during cache unwind BUGCHECK(268); // msg 268 buffer marked during cache unwind
} }
tdbb->getAttachment()->backupStateReadUnLock(tdbb);
bdb->bdb_flags &= ~(BDB_writer | BDB_faked | BDB_must_write); bdb->bdb_flags &= ~(BDB_writer | BDB_faked | BDB_must_write);
release_bdb(tdbb, bdb, true, false, false); release_bdb(tdbb, bdb, true, false, false);
} }
@ -2244,6 +2246,8 @@ void CCH_unwind(thread_db* tdbb, const bool punt)
SharedLatch* latch = findSharedLatch(tdbb, bdb); SharedLatch* latch = findSharedLatch(tdbb, bdb);
while (latch) while (latch)
{ {
tdbb->getAttachment()->backupStateReadUnLock(tdbb);
release_bdb(tdbb, bdb, true, false, false); release_bdb(tdbb, bdb, true, false, false);
latch = findSharedLatch(tdbb, bdb); latch = findSharedLatch(tdbb, bdb);
} }