Subject HELP! Stored procedure with infinite loop killed the database
Author wperdigao
If anyone can help, that would be great.

I created a stored procedure that used a WHILE...DO loop and the
first time I tried running it, the query never returned data and hung
IBExpert. I had to kill the process in Windows XP.

I suspect that the WHILE...DO loop was caught in an infinite loop. I
read somewhere that Firebird doesn't have a timeout value for stored
proc's.

Anyway, ever since then I can't connect to the database -- it
complained first of something like "exclusive lock permits further
execution of commands" or something similar in IBExpert when I first
tried to reconnect.

Now IBExpert just hangs. Using GFIX returns with an "unavailable
database" message.

Any ideas how to recover the database? I'd seriously like to use
Firebird in a production environment, but I'm a little cautious now.
A silly (and pretty common scenario during unit testing) thing like
an infinte loop in a stored proc has brought down my test server and
I haven't been able to find any info on how to recover from it.

Any help or suggestions would be greatly appreciated!