| 756 | } |
| 757 | |
| 758 | void InternalBlob::open(thread_db* tdbb, Transaction& tran, const dsc& desc, const UCharBuffer* bpb) |
| 759 | { |
| 760 | fb_assert(!m_blob); |
| 761 | fb_assert(sizeof(m_blob_id) == desc.dsc_length); |
| 762 | |
| 763 | JAttachment* att = m_connection.getJrdAtt(); |
| 764 | JTransaction* transaction = static_cast<InternalTransaction&>(tran).getJrdTran(); |
| 765 | memcpy(&m_blob_id, desc.dsc_address, sizeof(m_blob_id)); |
| 766 | |
| 767 | FbLocalStatus status; |
| 768 | |
| 769 | { |
| 770 | EngineCallbackGuard guard(tdbb, m_connection, FB_FUNCTION); |
| 771 | |
| 772 | USHORT bpb_len = bpb ? bpb->getCount() : 0; |
| 773 | const UCHAR* bpb_buff = bpb ? bpb->begin() : NULL; |
| 774 | |
| 775 | m_blob.assignRefNoIncr( |
| 776 | att->openBlob(&status, transaction, &m_blob_id, bpb_len, bpb_buff)); |
| 777 | } |
| 778 | |
| 779 | if (status->getState() & IStatus::STATE_ERRORS) |
| 780 | m_connection.raise(&status, tdbb, "JAttachment::openBlob"); |
| 781 | |
| 782 | fb_assert(m_blob); |
| 783 | } |
| 784 | |
| 785 | void InternalBlob::create(thread_db* tdbb, Transaction& tran, dsc& desc, const UCharBuffer* bpb) |
| 786 | { |
nothing calls this directly
no test coverage detected