These notes describe the difference between Derby release 10.6.2.1 and the preceding release 10.6.1.0.
Derby is a pure Java relational database engine using standard SQL and JDBC as its APIs.
Derby functionality includes:
- Embedded engine with JDBC drivers
- Network Server
- Network client JDBC drivers
- Command line tools: ij (SQL scripting), dblook (schema dump) and sysinfo (sy stem info)
This is a bug fix release which also provides localizations of new 10.6 messages. No new features were added. This release addresses a data corruption issue. DERBY-4677. See release note for unique index corruption detection and repair.
The following issues are addressed by Derby release 10.6.2.1. These issues are not addressed in the preceding 10.6.1.0 release.
Issue Id Description DERBY-4798 NPE in nested outer join DERBY-4770 Files missing svn:eol-style (August 2010) DERBY-4748 StringIndexOutOfBoundsException on syntax error (invalid COMMIT) DERBY-4747 ttestSetPortPriority junit test failing in tinderbox runs with junit.framework.AssertionFailedError: Port 1537 exceeeds expected maximum. DERBY-4736 ASSERT FAIL when code generating a column reference in a join predicate in presence of other outer join reordering DERBY-4731 XA two phase commit with active GLOBAL TEMPORARY TABLE causes An internal error identified by RawStore module DERBY-4722 Error in SQL example of SYSCS_UTIL.SYSCS_DISABLE_LOG_ARCHIVE_MODE DERBY-4717 Driver trace file isn't closed/released on physical connection close when specified with the traceFile attribute/setter DERBY-4715 Write jvm information and path of derby.jar to derby.log DERBY-4712 Complex nested joins problems DERBY-4706 Remove stale and potentially unused code Request.writeEncryptedScalarStream DERBY-4700 Add method to obtain a bogus port in TestConfiguration DERBY-4699 Build breaks if a Java 6 JDK is detected when compiling with a Java 5 compiler DERBY-4698 Simple query with HAVING clause crashes with NullPointerException DERBY-4694 Build breaks on Mac OS X due to JDK classpath issues DERBY-4693 column rename looses 'identity' attribute. DERBY-4686 SQLBinary.writeBlob is inefficient, reading one byte at a time from the source BLOB DERBY-4682 Inaccurate description of how a statement is completed in Developer's guide DERBY-4679 Several left outer joins causes unstable query with incorrect results DERBY-4677 SYSCS_COMPRESS_TABLE disables unique constraints DERBY-4676 NullPointerException on SELECT on INNER JOIN DERBY-4671 Embedded driver does not work with jbossCache DERBY-4666 Localize 10.6.1 messages DERBY-4664 Change Derby internal stored procedures to avoid DriverManager.getConnection("jdbc:default:connection") as it may be recognized by other Drivers DERBY-4661 Reduce size of encoding buffer for short character values DERBY-4654 Restriction.toSQL() doesn't escape special characters DERBY-4651 Hidden assumptions in FromVTI.makeRestriction() DERBY-4638 Expose names of top-level test suites for easier scripting DERBY-4632 Delete Maven1 build files DERBY-4610 Error attempting delete with cascade and triggers DERBY-4597 remove references to IBM jcc driver from sysinfo DERBY-4582 Timestamps inserted with GMT calendar are 1 hour later when subsequently read with GMT calendar (Server Mode Only). DERBY-4548 would like an alternative location for ant.properties DERBY-4471 Left outer join reassociation rewrite gives wrong result DERBY-4211 'derbyall/encryptionAll/storemats.fail:store/updatelocksJDBC30.sql' fails with unexpected locks DERBY-4179 bootLock.java fails with missing exception on z/OS with pmz3160sr2ifix-20081021_01(SR2+IZ32776+IZ33456), and Windows Vista DERBY-3856 difference between Embedded vs DerbyNetClient in format of return from timestamp(cast(? as varchar(32))) DERBY-2925 Prevent export from overwriting existing files DERBY-2532 Client does not return SQLException on XAConnection.getXAResource() on a closed connection, Embedded does DERBY-2026 Setting a login timeout in client driver can lead to query timeout DERBY-1595 Network server fails with DRDAProtocolException if a BLOB with size 2147483647 is streamed from client
Compared with the previous release (10.6.1.0), Derby release 10.6.2.1 introduces the following new features and incompatibilities. These merit your special attention.
Note for DERBY-4677: Unique nullable constraint may be disabled after compress or import operations on the table.
Note for DERBY-2925: Prevent export from overwriting existing files
Note for DERBY-4677
Summary of Change
Unique nullable constraint may be disabled after compress or import operations on the table.
Symptoms Seen by Applications Affected by Change
Prior to DERBY-4677 fix, the unique nullable constraint might have been disabled or violated after calls to SYSCS_UTIL.SYSCS_COMPRESS_TABLE, or SYSCS_UTIL.SYSCS_IMPORT_TABLE. While the DERBY-4677 fix corrects the problem for new indexes, it does not automatically repair damage to existing indexes. Applications using unique nullable indexes, (first allowed in version 10.4.2.1) may find that duplicate rows exist, despite the table being created with the unique constraint. In addition to the obvious problem of this being allowed, users may also see incorrect query results where one row is returned even though there are multiple qualifying rows.
Rationale for Change
The change fixed a serious bug that allowed duplicate rows despite a unique index. Users should upgrade and manually resolve prior damage as described below.
Application Changes Required
Users using unique nullable indexes (Derby 10.4 and higher) should upgrade immediately to a Derby version that contains the fix for DERBY-4677 AND drop and recreate those indexes. The fix was made in the following revisions.
10.4.2.1 (build 956034) 10.5.3.1 (build 955487) 10.6.1.1 (build 955790) The fix will not take care of duplicate rows that may have already made their way into the database. Such duplicate rows will have to be handled by the user manually. The steps to take would be to drop and recreate unique nullable indexes. During recreation, user might run into duplicate rows SQL exception. Such duplicate rows will have to be manually handled appropriately by the user.
Note for DERBY-2925
Summary of Change
Prevent export from overwriting existing files
Symptoms Seen by Applications Affected by Change
Due to security concerns, and to avoid accidental file damage, Export processing will not overwrite existing files. As a result, applications may observe some behavioral changes with respect to Export operations.
Incompatibilities with Previous Release
- SYSCS_UTIL.SYSCS_EXPORT_TABLE: Exports of all the data from a table to an existing file is no longer possible and the user/application must remove the existing file, otherwise ERROR XIE0S will be returned.
- SYSCS_UTIL.SYSCS_EXPORT_QUERY: Exports of all the data returned from the SELECT statement to an existing file is no longer possible and the user/application must remove the existing file, otherwise ERROR XIE0S will be returned.
- SYSCS_UTIL.SYSCS_EXPORT_QUERY_LOBS_TO_EXTFILE: Export of the result of a SELECT statement to a main data output file, and the LOB data into a large object auxiliary file to an existing file is no longer possible and the user/application must remove the existing data file and/or large object auxiliary file, otherwise ERROR XIE0S will be returned if the data file exists or ERROR XIE0T will be returned if the large object auxiliary file exists.
Rationale for Change
Due to security concerns and to avoid accidental file damage, Export processing will no longer overwrite an existing file.
Application Changes Required
The application needs to specify a different filename which does not exists or delete the existing file before performing the Export operation.
Derby release 10.6.2.1 was built using the following environment:
- Branch - Source code came from the 10.6 branch.
- Machine - Git(Msysgit) on Microsoft Windows 7 Ultimate 2009 64 bits
- Ant - Apache Ant version 1.7.1 compiled on June 27 2008
- JDK 1.4 - java version "1.4.2_19" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_19-b04) Java HotSpot(TM) Client VM (build 1.4.2_19-b04, mixed mode)
- Java 6 - java version "1.6.0_13" Java(TM) SE Runtime Environment (build 1.6.0_13-b03) Java HotSpot(TM) Client VM (build 11.3-b02, mixed mode)
- Compiler - Sun 1.6.0_13_b03