Menu

#1406 NPE when a unique constraint is violated

current-release
open-fixed
None
5
2015-07-02
2015-07-01
No

A null pointer exception is thrown in IndexAVLMemory when a unique constraint is violated:

Caused by: java.lang.NullPointerException
at org.hsqldb.index.IndexAVLMemory.insert(IndexAVLMemory.java:236)
at org.hsqldb.persist.RowStoreAVL.indexRow(RowStoreAVL.java:231)
... 44 more

The old and correct behavior was to get a SQLIntegrityConstraintViolationException in such a case.

Test case provided.

1 Attachments

Discussion

  • Fred Toussi

    Fred Toussi - 2015-07-01
    • status: open --> open-fixed
    • assigned_to: Fred Toussi
     
  • Fred Toussi

    Fred Toussi - 2015-07-01

    Thanks,
    Fixed and committed to SVN. The correct exception was thrown if the UNIQUE constraint was declared in the table.

     
  • Christian Bourque

    Hey Fred,

    Would it be possible to release a new version including this fix?

    This a major show stopper for us since we use Hibernate and auto schema generation so we don't have control on how the constraints are defined!

    Thanks

     
  • Fred Toussi

    Fred Toussi - 2015-07-02

    You can checkout from SVN /base/trunk and build with Gradle GUI or Ant. Will release an update version in a few days.

     
  • Christian Bourque

    Excellent thanks a lot!

     

Log in to post a comment.