Subject Re: Stored proc recursion problem
Author Svein Erling Tysvær
Just some guessing (I have never heard about this being a problem, but
then I've never heard about anyone doing what you are doing)...

>FOR SELECT KlasesID
>FROM Klases
>WHERE TevinesKlasesID = :KLASESID
>INTO :VaikineID DO BEGIN
>FOR SELECT KLASESID, GYLIS
>FROM KLASESAPACION(:VaikineID, :GAUTASGYLIS + 1)
>ORDER BY GYLIS
>INTO :KlasesID, :Gylis DO BEGIN
>SUSPEND;
>END

This part first uses KlasesID for the outer where clause, and for each
return value does a recursive call into the same variable. The first
thing I'd check if I were you was whether the same problem appeared if
you changed the name of one of these variables.

HTH,
Set
-now leaving for a week holiday!

--- In firebird-support@yahoogroups.com, "jasajona" <jon@o...> wrote:
> I am using 1.5.1 server. I wrote stored proc that is showing all
> nodes of the tree. The problem is that recursion do not work right
> in normal mode, but when I try to debug it is working right. Is it a
> FB 1.5.1 bug?