Subject deadlock in waiting transaction
Author Arkadiusz Hahn
Hi

I'm working with IBX components,C++Builder 6.0 and Firebird-1.5.2.4731-0_RC5-Win32

I have TIBSQL component connected to TIBTransaction with parameters set to "concurrency ,wait", there are also property IdleTimer=1 and DefaultAction=TARollback.
Suppose we have a deadlock (or only lock, depending in witch way a will finish the first transaction) - I started an "update" transaction in IBExpert (changed a value in one field without doing commit) and then executed "update" command using IBSQL (example below). I want IBSQL will rollback the transaction after 1 second, now it waits for infinity. In my opinion it shouldn't wait for infinity it should be a way to set the timeout of the transaction and posibility to catch some exception.

Additionally there is probably something wrong with the firebird server when a large number of such transactions is started and not finished (by killing application process), server starts working very slow, sometimes it is even impossible to connect to database with IBExpert..

IdleTimer property description from Borland Help is:

"Specifies how long the transaction should wait before automatically committing or rolling back. Use IdleTimer to indicate how long a transaction should be allowed to remain idle before automatically committing or rolling back the data. Use DefaultAction to determine which action the transaction should take"

an example of code:

try {
IBSQL->Close();
IBSQL->Transaction->StartTransaction();
IBSQL->SQL->Text = "UPDATE table_name SET filed_name=1 WHERE id=1";
IBSQL->ExecQuery();
IBSQL->Transaction->Commit();
} catch (Exception &E) {;}


I think it is probably an academic problem but it happend to me. Now I changed te transaction propery to "nowait" but sometimes this is not a good solution.


Thanks


[Non-text portions of this message have been removed]