db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Julius Stroffek <Julius.Strof...@Sun.COM>
Subject Re: Should be a statement with error allowed to do a rollback of the active transaction
Date Fri, 08 Dec 2006 12:17:47 GMT
In this case, user may have troubles - for example when executing an sql 
script through ij with autocommit off - the part of the transaction code 
would be rollbacked and part of the code will be committed by the 
following commit.

When an error is produced by the transaction transaction may get to the 
abort state and the following commit or rollback will always perform a 
rollback of the transaction. This ensures that the whole transaction 
would be rollbacked. The statements following after the statement with 
the error will always throw an exception (something like the 
"Transaction is in abort state").

Cheers

Julo

Daniel John Debrunner wrote:
> Some exceptions are transaction level, such as deadlock or lock 
> timeout, thus an error from a statement can rollback the transaction.
>

Mime
View raw message