| 5044 | |
| 5045 | |
| 5046 | void SysStableAttachment::destroy(Attachment* attachment) |
| 5047 | { |
| 5048 | { |
| 5049 | Database* dbb = attachment->att_database; |
| 5050 | SyncLockGuard guard(&dbb->dbb_sys_attach, SYNC_EXCLUSIVE, "SysStableAttachment::destroy"); |
| 5051 | |
| 5052 | for (Jrd::Attachment** ptr = &dbb->dbb_sys_attachments; *ptr; ptr = &(*ptr)->att_next) |
| 5053 | { |
| 5054 | if (*ptr == attachment) |
| 5055 | { |
| 5056 | *ptr = attachment->att_next; |
| 5057 | break; |
| 5058 | } |
| 5059 | } |
| 5060 | } |
| 5061 | |
| 5062 | // Make Attachment::destroy() happy |
| 5063 | AttSyncLockGuard async(*getSync(true), FB_FUNCTION); |
| 5064 | AttSyncLockGuard sync(*getSync(), FB_FUNCTION); |
| 5065 | |
| 5066 | setInterface(NULL); |
| 5067 | Jrd::Attachment::destroy(attachment); |
| 5068 | } |
| 5069 | |
| 5070 | |
| 5071 | ITransaction* JStatement::execute(CheckStatusWrapper* user_status, ITransaction* apiTra, |
no test coverage detected