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

Method transactRequest

src/jrd/jrd.cpp:4748–4861  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4746
4747
4748void 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)

Callers

nothing calls this directly

Calls 15

validateHandleFunction · 0.85
check_databaseFunction · 0.85
PAR_parseFunction · 0.85
CMP_releaseFunction · 0.85
GdsClass · 0.85
NumClass · 0.85
EXE_startFunction · 0.85
check_autocommitFunction · 0.85
transliterateExceptionFunction · 0.85
successful_completionFunction · 0.85
verifyAccessMethod · 0.80
ERR_postFunction · 0.70

Tested by

no test coverage detected