DataNucleus JIRA is now in read-only mode. Raise any new issues in GitHub against the plugin that it applies to. DataNucleus JIRA will remain for the foreseeable future but will eventually be discontinued
Issue Details (XML | Word | Printable)

Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Minor Minor
Assignee: Andy Jefferson
Reporter: Andy Jefferson
Votes: 0
Watchers: 0

If you were logged in you would be able to see more operations.
DataNucleus Store RDBMS

Derby : create of FK creates index, and get warning that index exists when we try to create the index

Created: 11/Nov/10 06:03 PM   Updated: 13/Nov/10 12:18 PM   Resolved: 11/Nov/10 06:36 PM
Component/s: Schema
Affects Version/s: 2.1.2, 2.2.0.m2
Fix Version/s: 2.1.3, 2.2.0.m3

File Attachments: 1. Text File (15 kB)

Forum Thread URL:,6103

Sort Order: Ascending order - Click to sort in descending order
Andy Jefferson added a comment - 11/Nov/10 06:05 PM
Test that demonstrates the problem. Run schematool.

17:05:19,354 (main) WARN [DataNucleus.Datastore] - SQL Warning : The new index is a duplicate of an existing index: SQL101111170519260.
java.sql.SQLWarning: The new index is a duplicate of an existing index: SQL101111170519260.
        at org.apache.derby.iapi.error.StandardException.newWarningCommon(Unknown Source)
        at org.apache.derby.iapi.error.StandardException.newWarning(Unknown Source)
        at org.apache.derby.impl.sql.execute.CreateIndexConstantAction.executeConstantAction(Unknown Source)
        at Source)
        at org.apache.derby.impl.sql.GenericPreparedStatement.execute(Unknown Source)
        at org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(Unknown Source)
        at org.apache.derby.impl.jdbc.EmbedStatement.execute(Unknown Source)
        at org.apache.derby.impl.jdbc.EmbedStatement.execute(Unknown Source)
        at org.apache.commons.dbcp.DelegatingStatement.execute(
        at org.apache.commons.dbcp.DelegatingStatement.execute(

Andy Jefferson added a comment - 11/Nov/10 06:36 PM
SVN trunk swaps the order of creation of FKs and indices so we get indices first (and hence the correct name) and avoid warning messages too.

Andy Jefferson added a comment - 11/Nov/10 06:39 PM
Also on branches/2.1 now