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

Fixed bug CORE-5537 : Assign DB access_mode to RW (by using gfix or fbsvcmgr) leads FB 4.0 Classic to create new firebird-process on every such attempt

This commit is contained in:
hvlad 2017-05-15 13:47:50 +03:00
parent b7fe93cb77
commit 425192a720

View File

@ -1717,6 +1717,14 @@ void PAG_set_db_readonly(thread_db* tdbb, bool flag)
// for WRITE operations
header->hdr_flags &= ~hdr_read_only;
dbb->dbb_flags &= ~DBB_read_only;
// This is necessary as dbb's Next could be less than OAT.
// And this is safe as we currently in exclusive attachment and
// all executed transactions was read-only.
dbb->dbb_next_transaction = Ods::getNT(header);
dbb->dbb_oldest_transaction = Ods::getOIT(header);
dbb->dbb_oldest_active = Ods::getOAT(header);
dbb->dbb_oldest_snapshot = Ods::getOST(header);
}
CCH_MARK_MUST_WRITE(tdbb, &window);