From 1120684ffea763480982858b2fedb2fb51e3d045 Mon Sep 17 00:00:00 2001 From: asfernandes Date: Wed, 12 Jan 2011 00:15:13 +0000 Subject: [PATCH] Backported fix for CORE-3306 - Invariant sub-query is treated as variant thus causing multiple invokations of a nested stored procedure --- src/jrd/cmp.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/jrd/cmp.cpp b/src/jrd/cmp.cpp index 0aa57ed319..789d8b10a2 100644 --- a/src/jrd/cmp.cpp +++ b/src/jrd/cmp.cpp @@ -6446,6 +6446,11 @@ static bool stream_in_rse(USHORT stream, const RecordSelExpr* rse) return true; // do not mark as variant } break; + // procedures + case nod_procedure: + if (stream == (USHORT)(IPTR) sub->nod_arg[e_prc_stream]) + return true; // do not mark as variant + break; } }