db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kim Haase (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (DERBY-4316) Embedded and client don't agree on whether to continue after error in batch
Date Thu, 24 Oct 2013 13:27:03 GMT

     [ https://issues.apache.org/jira/browse/DERBY-4316?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Kim Haase updated DERBY-4316:
-----------------------------

    Component/s: Documentation

Thanks for noticing that this has doc implications, Knut.

> Embedded and client don't agree on whether to continue after error in batch
> ---------------------------------------------------------------------------
>
>                 Key: DERBY-4316
>                 URL: https://issues.apache.org/jira/browse/DERBY-4316
>             Project: Derby
>          Issue Type: Bug
>          Components: Documentation, JDBC
>    Affects Versions: 10.5.1.1
>            Reporter: Knut Anders Hatlen
>            Priority: Minor
>              Labels: derby_triage10_5_2
>         Attachments: test.diff
>
>
> If an error happens in Statement.executeBatch(), the embedded driver
> will stop executing the batch, and
> BatchUpdateException.getUpdateCounts() will return an array whose
> length equals to the number of statements successfully executed. The
> client driver will continue executing the rest of the statements in
> the batch, and BatchUpdateException.getUpdateCounts() will return an
> array whose length is equal to the number of statements in the batch
> (including the failed ones).
> The JDBC specification allows both of the behaviours, but it requires
> that the behaviour is consistent within one DBMS. See the javadoc for
> java.sql.Statement.executeBatch() -
> http://java.sun.com/javase/6/docs/api/java/sql/Statement.html#executeBatch%28%29:
> > If one of the commands in a batch update fails to execute properly,
> > this method throws a BatchUpdateException, and a JDBC driver may or
> > may not continue to process the remaining commands in the
> > batch. However, the driver's behavior must be consistent with a
> > particular DBMS, either always continuing to process commands or
> > never continuing to process commands.
> I will add a test case to BatchUpdateTest that shows the difference.



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Mime
View raw message