| 4746 | |
| 4747 | |
| 4748 | void JAttachment::transactRequest(CheckStatusWrapper* user_status, ITransaction* tra, |
| 4749 | unsigned int blr_length, const unsigned char* blr, |
| 4750 | unsigned int in_msg_length, const unsigned char* in_msg, |
| 4751 | unsigned int out_msg_length, unsigned char* out_msg) |
| 4752 | { |
| 4753 | /************************************** |
| 4754 | * |
| 4755 | * i s c _ t r a n s a c t _ r e q u e s t |
| 4756 | * |
| 4757 | ************************************** |
| 4758 | * |
| 4759 | * Functional description |
| 4760 | * Execute a procedure. |
| 4761 | * |
| 4762 | **************************************/ |
| 4763 | try |
| 4764 | { |
| 4765 | JTransaction* const jt = getTransactionInterface(user_status, tra); |
| 4766 | EngineContextHolder tdbb(user_status, this, FB_FUNCTION); |
| 4767 | |
| 4768 | jrd_tra* transaction = jt->getHandle(); |
| 4769 | validateHandle(tdbb, transaction); |
| 4770 | check_database(tdbb); |
| 4771 | |
| 4772 | try |
| 4773 | { |
| 4774 | Jrd::Attachment* const att = transaction->tra_attachment; |
| 4775 | |
| 4776 | const MessageNode* inMessage = NULL; |
| 4777 | const MessageNode* outMessage = NULL; |
| 4778 | |
| 4779 | Request* request = NULL; |
| 4780 | MemoryPool* new_pool = att->createPool(); |
| 4781 | |
| 4782 | try |
| 4783 | { |
| 4784 | Jrd::ContextPoolHolder context(tdbb, new_pool); |
| 4785 | |
| 4786 | CompilerScratch* csb = PAR_parse(tdbb, reinterpret_cast<const UCHAR*>(blr), |
| 4787 | blr_length, false); |
| 4788 | |
| 4789 | for (FB_SIZE_T i = 0; i < csb->csb_rpt.getCount(); i++) |
| 4790 | { |
| 4791 | if (const auto node = csb->csb_rpt[i].csb_message) |
| 4792 | { |
| 4793 | if (node->messageNumber == 0) |
| 4794 | inMessage = node; |
| 4795 | else if (node->messageNumber == 1) |
| 4796 | outMessage = node; |
| 4797 | } |
| 4798 | } |
| 4799 | |
| 4800 | request = Statement::makeRequest(tdbb, csb, false); |
| 4801 | request->getStatement()->verifyAccess(tdbb); |
| 4802 | } |
| 4803 | catch (const Exception&) |
| 4804 | { |
| 4805 | if (request) |
nothing calls this directly
no test coverage detected