Subject Alter Table bug?
Author Jason Dodson
Hey all,

I have just attempted to add a computed field to one of our tables.
Consistantly, it sends the server process to 100% cpu utilization. All
current connections stop working (They don't drop, they just "freeze"),
and the server no longer can accept connections (It doesn't outright
refuse them, it just never connects). On windows, the server is so
unresponsive that it doesn't cooperate with the Services manager. It is
signaled to stop, but just sits there, tearing up the cpu, constantly
with the status message "stopping".

Here is my SQL, though it won't be of perticular use by itself (I don't

Alter Table NAInvoices Add MaintInvoiceTotal Computed By (Case When
Coalesce(CustDiv, "") = "" Then (Select MaintInvoiceTotal From
GetInvoiceTotalsByCompany(NAInvoices.InvNo, NAInvoices.CustID)) Else
(Select MaintInvoiceTotal From
GetInvoiceTotalsByCompanyDiv(NAInvoices.InvNo, NAInvoices.CustID,
NAInvoices.CustDiv)) End)

Now, up until forever ago, I would loop through the NAInvoices table,
and execute the procedure
GetInvoiceTotalsByCompany/GetInvoiceTotalsByCompanyDiv for each row.
This took seconds. Nothing is complex, and the amount of data is small.

I can accept that maybe I have bad indexes or too much data, or
something along those lines... but here is the kicker. Even when I am
logged in as a user with absolutely no privledges to NAInvoices, it
STILL locks up as explained above.

Is this a bug? Or is there an obvious no-no that I am touching on?

Tested with Firebird 1.5.1 on Gentoo Linux 2005.0 and Firebird on Windows XP.