Subject RE: [ib-support] Interpreting the iblockpr output..
Author Ann W. Harrison
Hmmm... gbak deadlock. There was a bug fix in restore.e -
commented even - that described such a situation. It's in
the routine restore. I have no idea why gbak is using two
transactions ... that seems like a recipe for disaster.
Have you traced the error to a particular statement?


The code is below - I HATE routines that start with
if (flag_xxx) - they're almost always bandages on suppurating
wounds.


Regards,

Ann
www.ibphoenix.com
We have answers.




/* This piece of code is to fix bug 10098: restore of database with
only domains and no relations aborts with the message ERROR: deadlock
This is because insertion of domains into RDB$FIELDS is happening in
the default transaction, whereas updation of RDB$FIELDS to add
constraints to the domains is done in tdgbl->global_trans. In case of
no relations, no COMMIT of default transaction occurs till this point
because of which rows in RDB$FIELDS for domains are still locked by
default transaction. The below code COMMITs the default transaction
in that particular situation */

if (flag_norel)
{
COMMIT;
ON_ERROR
general_on_error ();
END_ERROR;
EXEC SQL SET TRANSACTION NO_AUTO_UNDO;
if (gds__status [1])
EXEC SQL SET TRANSACTION;
}



Regards,

Ann
www.ibphoenix.com
We have answers.