void InternalStatement::putExtBlob(thread_db* tdbb, dsc& src, dsc& dst) { if (isPermanentBlob(src) || (m_transaction->getScope() == traCommon && m_intConnection.isCurrent())) MOV_move(tdbb, &src, &dst); else Statement::putExtBlob(tdbb, src, dst); }
void ResultSet::moveDesc(thread_db* tdbb, unsigned param, dsc& desc) { fb_assert(param > 0); jrd_req* jrdRequest = stmt->getRequest()->req_request; // Setup tdbb info necessary for blobs. AutoSetRestore2<jrd_req*, thread_db> autoRequest( tdbb, &thread_db::getRequest, &thread_db::setRequest, jrdRequest); AutoSetRestore<jrd_tra*> autoRequestTrans(&jrdRequest->req_transaction, tdbb->getTransaction()); MOV_move(tdbb, &getDesc(param), &desc); }
void PreparedStatement::setDesc(thread_db* tdbb, unsigned param, const dsc& value) { fb_assert(param > 0); jrd_req* jrdRequest = getRequest()->req_request; // Setup tdbb info necessary for blobs. AutoSetRestore2<jrd_req*, thread_db> autoRequest( tdbb, &thread_db::getRequest, &thread_db::setRequest, jrdRequest); AutoSetRestore<jrd_tra*> autoRequestTrans(&jrdRequest->req_transaction, tdbb->getTransaction()); MOV_move(tdbb, const_cast<dsc*>(&value), &inValues[(param - 1) * 2]); const dsc* desc = &inValues[(param - 1) * 2 + 1]; fb_assert(desc->dsc_dtype == dtype_short); *reinterpret_cast<SSHORT*>(desc->dsc_address) = 0; }