db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Knut Anders Hatlen (JIRA)" <j...@apache.org>
Subject [jira] Commented: (DERBY-4316) Embedded and client don't agree on whether to continue after error in batch
Date Sun, 19 Jul 2009 14:46:14 GMT

    [ https://issues.apache.org/jira/browse/DERBY-4316?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12733007#action_12733007
] 

Knut Anders Hatlen commented on DERBY-4316:
-------------------------------------------

Committed test.diff to trunk with revision 795549.

> 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: JDBC
>    Affects Versions: 10.5.1.1
>            Reporter: Knut Anders Hatlen
>            Priority: Minor
>         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 is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message