db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bryan Pendleton (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (DERBY-6773) Derby throws plain SQLIntegrityConstraintViolationException
Date Tue, 10 Mar 2015 03:56:38 GMT

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

Bryan Pendleton updated DERBY-6773:
-----------------------------------
    Attachment: SharedException.diff

I did a little bit of work on prototyping an alternate version
of the patch, in which the new SQLException sub-class
is in the "shared" portion of the source tree, and is referenced
from the SQLExceptionFactory class in both the engine and
client libraries.

I also took a first stab at converting the standalone repro
script into a new test case in ConstraintCharacteristicsTest.

This patch doesn't compile, but I'm attaching it anyway
so that others can download and apply it and help me
improve it.

Abhinav, do you want to try looking at this patch and let me
know what you think? It's called "SharedException.diff".

> Derby throws plain SQLIntegrityConstraintViolationException
> -----------------------------------------------------------
>
>                 Key: DERBY-6773
>                 URL: https://issues.apache.org/jira/browse/DERBY-6773
>             Project: Derby
>          Issue Type: Improvement
>          Components: JDBC
>    Affects Versions: 10.10.2.0
>         Environment: Windows 7 x86_64, Java 1.6.0.45
>            Reporter: Jochen Wiedmann
>            Assignee: Abhinav Gupta
>            Priority: Minor
>         Attachments: DERBY6733Repro.java, SamePackage.diff, SharedException.diff, ant
-verbose build all.txt
>
>
> If a unique constraint is violated by an insert statement, then Derby throws an SQLIntegrityConstraintViolationException.
The error message contains, in particular, the constraint name and the table name.
> To distinguish between cases with various constraints, Derby should instead throw a subclass
of SQLIntegrityConstraintViolationException, with methods like getConstraintName(), and getTableName().
> See also https://hibernate.atlassian.net/browse/HHH-9516.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message