Subject | Re: [ib-support] Serialization? |
---|---|
Author | Raul Chirea |
Post date | 2002-07-06T09:19:05Z |
Matteo,
From: "Matteo Giacomazzi" <matteo.giacomazzi@...>
can't handle transactions. A server procedure is alwais runned inside a
transaction.
SET TRANSACTION NAME TRANS_1 WAIT;
/* This will eventualy wait untill other thread is done */
ROLLBACK TRANS_1;
IB/FB is not a toy and handling transactions is it's one of the best parts !
Raul.
From: "Matteo Giacomazzi" <matteo.giacomazzi@...>
> But I wonder if it isn't a "bad thing" to build up a "procedure" onI hope you meant a client procedure not a server one ! A server procedure
> ROLLBACKs...
can't handle transactions. A server procedure is alwais runned inside a
transaction.
> Maybe, instead of ROLLBACK i could DELETE the row just inserted?No, there's no problem using rollback.
> SET TRANSACTION NAME TRANS_1 [...]/* This will be fine. */
SET TRANSACTION NAME TRANS_1 WAIT;
/* This will eventualy wait untill other thread is done */
> INSERT INTO ACTIVE_HOST (HOST_ID) [...]/* no need to delete + commit, rollback would do same thing */
> SET TRANSACTION NAME TRANS_2 [...]
> [...download the document...]
> COMMIT TRANS_2;
ROLLBACK TRANS_1;
> But, really, I don't like too much to keep a transaction opened for aI don't see this as a problem. The server can easily take it !
> so long time...
IB/FB is not a toy and handling transactions is it's one of the best parts !
Raul.