| 2698 | } |
| 2699 | |
| 2700 | JRequest* JAttachment::compileRequest(CheckStatusWrapper* user_status, |
| 2701 | unsigned int blr_length, const unsigned char* blr) |
| 2702 | { |
| 2703 | /************************************** |
| 2704 | * |
| 2705 | * g d s _ $ c o m p i l e |
| 2706 | * |
| 2707 | ************************************** |
| 2708 | * |
| 2709 | * Functional description |
| 2710 | * |
| 2711 | **************************************/ |
| 2712 | Statement* stmt = NULL; |
| 2713 | |
| 2714 | try |
| 2715 | { |
| 2716 | EngineContextHolder tdbb(user_status, this, FB_FUNCTION); |
| 2717 | check_database(tdbb); |
| 2718 | |
| 2719 | TraceBlrCompile trace(tdbb, blr_length, blr); |
| 2720 | try |
| 2721 | { |
| 2722 | stmt = CMP_compile(tdbb, blr, blr_length, false, 0, nullptr); |
| 2723 | |
| 2724 | const auto attachment = tdbb->getAttachment(); |
| 2725 | const auto rootRequest = stmt->getRequest(tdbb, 0); |
| 2726 | rootRequest->setAttachment(attachment); |
| 2727 | attachment->att_requests.add(rootRequest); |
| 2728 | |
| 2729 | trace.finish(stmt, ITracePlugin::RESULT_SUCCESS); |
| 2730 | } |
| 2731 | catch (const Exception& ex) |
| 2732 | { |
| 2733 | const ISC_STATUS exc = transliterateException(tdbb, ex, user_status, "JAttachment::compileRequest"); |
| 2734 | const bool no_priv = (exc == isc_no_priv); |
| 2735 | trace.finish(NULL, no_priv ? ITracePlugin::RESULT_UNAUTHORIZED : ITracePlugin::RESULT_FAILED); |
| 2736 | |
| 2737 | return NULL; |
| 2738 | } |
| 2739 | } |
| 2740 | catch (const Exception& ex) |
| 2741 | { |
| 2742 | ex.stuffException(user_status); |
| 2743 | return NULL; |
| 2744 | } |
| 2745 | |
| 2746 | successful_completion(user_status); |
| 2747 | |
| 2748 | JRequest* jr = FB_NEW JRequest(stmt, getStable()); |
| 2749 | jr->addRef(); |
| 2750 | return jr; |
| 2751 | } |
| 2752 | |
| 2753 | |
| 2754 | JBlob* JAttachment::createBlob(CheckStatusWrapper* user_status, ITransaction* tra, ISC_QUAD* blob_id, |
nothing calls this directly
no test coverage detected