db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Knut Anders Hatlen <Knut.Hat...@Sun.COM>
Subject Re: Should be a statement with error allowed to do a rollback of the active transaction
Date Tue, 12 Dec 2006 14:46:38 GMT
Julius Stroffek <Julius.Stroffek@Sun.COM> writes:

> Knut Anders Hatlen wrote:
>> Bryan Pendleton <bpendleton@amberpoint.com> writes:
>>>> The key question is whether the statement with error should (or
>>>> could) rollback the active transaction?       
>>> Does this same situation arise with an embedded configuration? If so, how
>>> does the embedded engine handle your test case?
>> With an embedded configuration, the result of executing the statement
>> which fails is exactly the same as not executing the statement. That
>> is, nothing is changed in the database regardless of autocommit mode
>> and whether commit() is called. Also, it doesn't roll back any other
>> uncommitted changes made by that transaction.
> Could we unify the behavior of the embedded configuration and a derby net ?

It is possible to make embedded behave like the network client by
doing the same delayed error reporting, but I don't think it is
desirable in this case. I would rather have too many uncommitted
changes rolled back than false data inserted into the database.

Knut Anders

View raw message