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

Fixed missing monitoring for the crypt thread

This commit is contained in:
Dmitry Yemanov 2019-01-22 12:31:59 +03:00
parent b0f2529c3e
commit 145370dc59

View File

@ -920,16 +920,22 @@ namespace Jrd {
// Establish temp context
// Needed to take crypt thread lock
UserId user;
user.setUserName("(Crypt thread)");
user.setUserName("Database Crypter");
Jrd::Attachment* const attachment = Jrd::Attachment::create(&dbb);
RefPtr<SysStableAttachment> sAtt(FB_NEW SysStableAttachment(attachment));
attachment->setStable(sAtt);
attachment->att_filename = dbb.dbb_filename;
attachment->att_user = &user;
BackgroundContextHolder tempDbb(&dbb, attachment, &status_vector, FB_FUNCTION);
LCK_init(tempDbb, LCK_OWNER_attachment);
PAG_header(tempDbb, true);
PAG_attachment_id(tempDbb);
Monitoring::publishAttachment(tempDbb);
sAtt->initDone();
// Take exclusive threadLock