Subject ISC ERROR CODE:335544781 ISC ERROR CODE:3 35544781 ISC ERROR CODE:335544781 'ISC E RROR CODE:335544781 'ISC ERROR CODE:33554 4781 'ISC ERROR CODE:335544781 ISC Error Code:335544781/Stack overflow
Author Christian Gütter
Hi,

when updating a certain dataset, I the following error message is displayed

ISC ERROR MESSAGE:
Stack overflow. The resource requirements of the runtime stack have exceeded the memory available to it.

I was able to find out that this error is caused by the following update statement
which is executed by a trigger:

UPDATE T_Pa_Pos_Cm_Ergebnisse
SET Vertrag_gefunden = NEW.Vertrag_Gefunden,
[...]
Ergebnis_Gilt_Fuer_Gruppe = NEW.Ergebnis_Gilt_Fuer_Gruppe
WHERE PA_Pos_Zuordnung IN (
SELECT ID FROM T_Pa_Pos_Cm WHERE Plan_Ref_Number IN (
SELECT Plan_Ref_Number FROM T_Pa_Pos_Cm WHERE ID = NEW.Pa_Pos_Zuordnung));

The two subselects in the WHERE clause _always_ return less then 10 records,
so I am wondering why this statement causes a stack overflow and if there is
a way to work around it.
I am using Firebird 1.03.

It would be great if somone could shed some light on this.


TIA,

Christian