MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / WorkerStableAttachment

Method WorkerStableAttachment

src/jrd/WorkerAttachment.cpp:52–75  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

50/// class WorkerStableAttachment
51
52WorkerStableAttachment::WorkerStableAttachment(FbStatusVector* status, Jrd::Attachment* attachment,
53 WorkerAttachment* workers) :
54 SysStableAttachment(attachment),
55 m_workers(workers)
56{
57 UserId user;
58 user.setUserName("<Worker>");
59 // user.usr_flags = USR_owner; // need owner privs ??
60
61 attachment->att_user = FB_NEW_POOL(*attachment->att_pool) UserId(*attachment->att_pool, user);
62 attachment->setStable(this);
63
64 BackgroundContextHolder tdbb(attachment->att_database, attachment, status, FB_FUNCTION);
65
66 LCK_init(tdbb, LCK_OWNER_attachment);
67 INI_init(tdbb);
68 PAG_header(tdbb, true);
69 PAG_attachment_id(tdbb);
70 TRA_init(attachment);
71 Monitoring::publishAttachment(tdbb);
72
73 initDone();
74 m_workers->incWorkers();
75}
76
77WorkerStableAttachment::~WorkerStableAttachment()
78{

Callers

nothing calls this directly

Calls 8

LCK_initFunction · 0.85
PAG_headerFunction · 0.85
PAG_attachment_idFunction · 0.85
TRA_initFunction · 0.85
setUserNameMethod · 0.80
setStableMethod · 0.80
incWorkersMethod · 0.80
UserIdClass · 0.70

Tested by

no test coverage detected