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

Method doDetach

src/jrd/WorkerAttachment.cpp:500–525  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

498}
499
500void WorkerAttachment::doDetach(FbStatusVector* status, StableAttachmentPart* sAtt)
501{
502 status->init();
503
504 AutoPlugin<JProvider> provider;
505 {
506 AttSyncLockGuard guard(*sAtt->getSync(), FB_FUNCTION);
507
508 Attachment* attachment = sAtt->getHandle();
509 if (attachment)
510 provider.reset(attachment->getProvider());
511 }
512
513 // if (att->att_flags & ATT_system)
514 if (Config::getServerMode() == MODE_SUPER)
515 {
516 WorkerStableAttachment* wrk = reinterpret_cast<WorkerStableAttachment*>(sAtt);
517 wrk->fini();
518 }
519 else
520 {
521 JAttachment* jAtt = sAtt->getInterface();
522 jAtt->detach(status);
523 }
524 sAtt->release(); // !!
525}
526
527} // namespace Jrd

Callers

nothing calls this directly

Calls 9

initMethod · 0.45
getSyncMethod · 0.45
getHandleMethod · 0.45
resetMethod · 0.45
getProviderMethod · 0.45
finiMethod · 0.45
getInterfaceMethod · 0.45
detachMethod · 0.45
releaseMethod · 0.45

Tested by

no test coverage detected