diff --git a/src/jrd/met.epp b/src/jrd/met.epp index 12d0b9988e..0062bde900 100644 --- a/src/jrd/met.epp +++ b/src/jrd/met.epp @@ -2961,12 +2961,10 @@ jrd_prc* MET_procedure(thread_db* tdbb, int id, bool noscan, USHORT flags) if (!noscan) { - jrd_req* request = CMP_find_request(tdbb, irq_r_procedure, IRQ_REQUESTS); - jrd_req* request2 = CMP_find_request(tdbb, irq_r_params, IRQ_REQUESTS); - jrd_req* request3 = CMP_find_request(tdbb, irq_r_params2, IRQ_REQUESTS); - jrd_req* request4 = CMP_find_request(tdbb, irq_p_type, IRQ_REQUESTS); SSHORT valid_blr = TRUE; + jrd_req* request = CMP_find_request(tdbb, irq_r_procedure, IRQ_REQUESTS); + FOR(REQUEST_HANDLE request) P IN RDB$PROCEDURES WITH P.RDB$PROCEDURE_ID EQ procedure->prc_id @@ -3007,6 +3005,9 @@ jrd_prc* MET_procedure(thread_db* tdbb, int id, bool noscan, USHORT flags) vec* paramVector = 0; procedure->prc_defaults = 0; + + jrd_req* request2 = CMP_find_request(tdbb, irq_r_params, IRQ_REQUESTS); + FOR(REQUEST_HANDLE request2) PA IN RDB$PROCEDURE_PARAMETERS CROSS F IN RDB$FIELDS WITH F.RDB$FIELD_NAME = PA.RDB$FIELD_SOURCE @@ -3024,6 +3025,8 @@ jrd_prc* MET_procedure(thread_db* tdbb, int id, bool noscan, USHORT flags) if (ENCODE_ODS(dbb->dbb_ods_version, dbb->dbb_minor_original) >= ODS_11_1) { + jrd_req* request3 = CMP_find_request(tdbb, irq_r_params2, IRQ_REQUESTS); + FOR(REQUEST_HANDLE request3) PA2 IN RDB$PROCEDURE_PARAMETERS WITH PA2.RDB$PROCEDURE_NAME EQ PA.RDB$PROCEDURE_NAME AND @@ -3125,6 +3128,8 @@ jrd_prc* MET_procedure(thread_db* tdbb, int id, bool noscan, USHORT flags) if (ENCODE_ODS(dbb->dbb_ods_version, dbb->dbb_minor_original) >= ODS_11_1) { + jrd_req* request4 = CMP_find_request(tdbb, irq_p_type, IRQ_REQUESTS); + FOR(REQUEST_HANDLE request4) PT IN RDB$PROCEDURES WITH PT.RDB$PROCEDURE_ID EQ procedure->prc_id