Release Notes for Derby 10.3.0.0

These notes describe the difference between Derby release 10.3.0.0 and the preceding release 10.2.2.0.

Overview

Derby is a pure Java relational database engine using standard SQL and JDBC as its APIs.

Derby functionality includes:

New Features

This is a minor release. The following new features were added:

Bug Fixes

The following issues are addressed by Derby release 10.3.0.0. These issues are not addressed in the preceding 10.2.2.0 release.

Issue IdDescription
DERBY-2684NSinSameJVM regression test failure, "> FAIL: Should have gotten exception"
DERBY-2673If derby.system.home does not exist Derby should only attempt to create that specific folder, not any missing parents (ie. use File.mkdir(), not File.mkdirs())
DERBY-2671Errors/messages early in starting the network server through NetworkServerControl.start() are not reported to the PrintWriter passed into start().
DERBY-2662DITA error in adminguide/cadminservlet98430.dita
DERBY-2644multiple junit failures during nightly of the form: 2) Encryption Algorithm: defaultjava.security.AccessControlException: Access denied (java.util.PropertyPermission derby.system.home read)
DERBY-2633Authorization error codes have been moved. Translated messages must be moved accordingly.
DERBY-2631Expose existing auto-generated key functionality through more JDBC APIs in embedded mode.
DERBY-2613upgrade test problem when attempting to test 10.0.2.1 -
DERBY-2610Queries in metadata.properties allow tablepattern for JDBC methods that do not allow patterns
DERBY-2608Compilation Error of manual in Apache FOP
DERBY-2606Derby should print the parameters to failed statements to the derby.log when it logs the error
DERBY-2605You can create BOOLEAN columns in 10.3
DERBY-2603Minor erratum in page of VARCHAR in Derby Reference manual
DERBY-2600Remove temporary code added to enable testing of CLOB locator related stored procedures.
DERBY-2598new upgrade test failures after change 528033
DERBY-2597Language result sets should not reuse current isolation level across executions
DERBY-2594Revoking a privilege from an SQL Object should invalidate statements dependent on that object
DERBY-2591DataDictionaryImpl.getSystemSQLName() may generate duplicates
DERBY-2586BlobClob4BlobTest.tesPositionAgressive takes very long time
DERBY-2584Creating a database with JPOX SchemaTool sometimes gives ArrayIndexOutOfBoundsException when getIndexInfo() is called
DERBY-2583At code generation time, look at collation type to determine what kind of DVD should get generated for character types.
DERBY-2581Callers of SanityManager.THROWASSERT should chain the exceptions when possible
DERBY-2580SanityManager.THROWASSERT(String,Throwable) ignores message argument
DERBY-2579AssertFailure class should use JDK's built-in chaining of exceptions
DERBY-2578Change CurrentDatetimeOperatorNode to use ExpressionClassBuilder to generate code for DVD rather than going directly though TypeCompiler
DERBY-2566OutOfMemory/Sanity-assert failed when updating database
DERBY-2565BrokeredConnection needs to forward implementations of locator related methods in EngineConnection to the underlying physical connection
DERBY-2558client trhows ArrayIndexOutOfBounds exception instead of parameter out of range
DERBY-2556Code paths for db restore do not use doPrivileged-calls, causing SecurityException
DERBY-2551Global Xid value garbled in syscs_diag.transaction_table.
DERBY-2549ArrayIndexOutOfBoundsException in SYSCS_UTIL.SYSCS_INPLACE_COMPRESS_TABLE
DERBY-2540Restructure code for Blob/Clob length in client to prepare for locator implementation
DERBY-2538Update documentation to describe the expected behavior when a JDBC 4 app creates a JDBC 3 datasource.
DERBY-2521Building derby outputs (from ant) various information messages that are marked as warning severity.
DERBY-2511reference manual's description of JDBC4 features has misleading sections
DERBY-2506Adding the locator information to FD:OCA descriptor (FDODSC) andFD:OCA data (FDODTA) of the SQLDTA objects
DERBY-2501Batch scripts in bin\ report extraneous errors when DERBY_HOME is invalid
DERBY-2500Assertion failure preparing query with AND and OR in where clause
DERBY-2495Create framework for calling locator related stored procedures from client
DERBY-2493Use unsynchronized collections in BackingStoreHashtable
DERBY-2489Document the policy-reloading system procedure.
DERBY-2488When loaded by jvm1.6 - EmbeddedConnectionPoolDataSource is not returning a JDBC 4 compliant PooledConnection object
DERBY-2480DriverManager.getConnection leaks memory when connecting to a non-existent database
DERBY-2473Compilation of reference manual translated into pt_BR seems to be failed
DERBY-2466Allow dynamic reloading of the security policy file
DERBY-2462org.apache.derby.impl.store.access.BackingStoreHashTableFromScan does not honor ResultSet holdability
DERBY-2456File stream is left open when an exception occurs while setting up a character stream for data export.
DERBY-2450Clob.Position returning wrong value when operating on Reader
DERBY-2444Implement not implemented methods Blob.getBinaryStream(long pos, long length) and Clob. getCharacterStream(long pos, long length) in the Network Client
DERBY-2435network server boot fails indicating authentication must be set up even when authentication is fully defined in derby.properties
DERBY-2431Documentation for DatabaseMetaData should reflect that getColumnPrivileges and getTablePrivileges are implemented
DERBY-2430 setObject(int targetType, Blob source) and setObject(int targetType, Clob source) should disallow updates on all targetTypes except BLOB and CLOB respectively
DERBY-2425ResultSetMetaData.getColumnDisplaySize() returns a negative value for BLOB columns for client
DERBY-2406XAResource.end does not set the XA transaction state correctly when the XAException is thrown
DERBY-2400Javadoc - clean up Cloudscape references in javadoc
DERBY-2391"Derby and standards" section of Developer's Guide needs reorganization
DERBY-2387DOCs - Reorder the topics in the Ref Manual into Alphabetical order - functions, procedures
DERBY-2386timestampdiff function fails when using SQL_TSI_FRAC_SECOND for datepart parameter, except for very small intervals
DERBY-2383ReuseFactory should use the constants in java.lang.Boolean
DERBY-2381ParameterMappingTest fails due to ArrayIndexOutOfBoundsException executing a procedure
DERBY-2376Patch available to make .classpath entries portable - relative to ECLIPSE_HOME
DERBY-2372Document the secure-by-default network server
DERBY-2371Setting a default value for a VARCHAR column fails when column contains data
DERBY-2370EXISTS may return the wrong value for sub-queries involving set operations
DERBY-2369NetworkServerControl.shutdown() takes at least 1.5 seconds, could be faster.
DERBY-2365Brushing up pages for MAX and MIN in Derby Reference Manual
DERBY-2361Documentation should give examples for using the different security mechanisms
DERBY-2356Make SSL server authentication optional
DERBY-2355Wrong URL in Eclipse-Plugin Lab Example Jays.java
DERBY-2347Add code to support request and return of locators over DRDA
DERBY-2345truncate on a Blob does not work when the Blob is in memory
DERBY-2342convert importExport.java to junit
DERBY-2341derby.language.statementCacheSize is ignored when it is set as a database property.
DERBY-2339org.apache.derbyTesting.functionTests.suites.All is extremely CPU intensive since ~svn 507489
DERBY-2336Enable collation based ordering for CHAR data type.
DERBY-2328Reduce monitor contention in SinglePool
DERBY-2327Reduce monitor contention in LockSet
DERBY-2323Update Graphic in Dev Guide - Embedded deployment application overview
DERBY-2301Documentation of different executeBatch error handling between embedded and DerbyNetClient needed
DERBY-2296getProperties method deprecated on ClientDataSource
DERBY-2281Update the Tuning Guide figure about using the statement cache
DERBY-2279JDBC3 driver is loaded instead of JDBC4 when running with jdk1.7
DERBY-2275XSLT changes for PDF output
DERBY-2263Update the copyright dita files to mark Derby logo images as non-substantive images (for accessibility)
DERBY-2262DatabaseMetaData.getTypeInfo returns incorrect MAXIMUM_SCALE value for DECIMAL and NUMERIC types
DERBY-2260DatabaseMetaData.getTypeInfo() returns incorrect precision for VARCHAR FOR BIT DATA
DERBY-2259DatabaseMetaData.getTypeInfo() SEARCHABLE column returns incorrect information for types that cannot be searched.
DERBY-2258DatabaseMetaData.getTypeInfo() does not list supported Derby SQL types correctly.
DERBY-2257Implementing the stored procedures called by the LOB related JDBC methods
DERBY-2256Wrong Results: Use of decimal values in an IN-list with INTEGER left operand can lead to extra rows.
DERBY-2244DatabaseMetaData.supportsExpressionsInOrderBy() returns false
DERBY-2243DatabaseMetaData.supportsANSI92EntryLevelSQL() returns false for embedded, true for client driver
DERBY-2237Cleanup copyrights in the DITA source and generated docs
DERBY-2228Support Derby on J2ME/CDC/Foundation 1.1
DERBY-2226Move column bitset computation to IndexToBaseRowNode
DERBY-2223Let BasePage.fetchFieldFromSlot use the special single-col FetchDescriptor ctor
DERBY-2222'show indexes in SCHEMANAME' does not work with the client driver
DERBY-2220Uncommitted transactions executed throught XAResource will held locks after the application terminates (or crashes during the transaction).
DERBY-2218Null Pointer Exception when an untyped NULL subquery ("values null") appears outside of the FROM list in a SELECT query.
DERBY-2217Convert upgrade tests to Junit
DERBY-2216Allow demo SimpleApp to work in J2ME environment
DERBY-2214Fix Getting Started file to reflect classpath change
DERBY-2208setNetworkServerCP scripts need not add derby.jar into the CLASSPATH
DERBY-2202DROP PROCEDURE depends on SET SCHEMA
DERBY-2195Nested triggers not working properly after maximum trigger count exception is thrown
DERBY-2194A few more problems with Working with Derby manual
DERBY-2193[import] ERROR 38000: StringIndexOutOfBoundsException was thrown while evaluating an expression.
DERBY-2191Cleanup of FormatableBitSet
DERBY-2183Trigger recompilation problem when trigger action has its table not qualified with a schema
DERBY-2166Implement proper handling of SocketTimeoutException in DRDAConnThread
DERBY-2152Support diagnostic vti tables that take parameters, such as SpaceTable
DERBY-2150Reduce use of synchronized collections in GenericLanguageConnectionContext
DERBY-2149Replace Vectors and Hashtables with ArrayLists and HashMaps in RAMTransaction
DERBY-2147LIKE predicate does not accept a pure column reference as righthand operand (gives ERROR 42824)
DERBY-2141BlobClob4BlobTest.testPositionBlob() fails with NullPointerException
DERBY-2138Remove DataDictionaryContext and associated code
DERBY-2137CALL (PROCEDURE) statement documentation in reference manual has incomplete syntax for arguments
DERBY-2135add comment to messages.xml to ensure translations are kept in sync or removed when adding/removing parameters
DERBY-2123Remove workaround for old JIT bug from StoredPage
DERBY-2122Optimize ContainerLock.isCompatible()
DERBY-2121Remove JDK 1.3 build dependency in network server
DERBY-2114Let Clock embed a HashMap rather than inherit from Hashtable
DERBY-2112Nullpointer on executeBatchRequestX when preparedStatement has no parameters
DERBY-2108Implement SSL/TLS communication between client and server
DERBY-2107Move page latching out of the lock manager
DERBY-2103After a Lexical Error due to syntax error , even a simple create table does not work on the same connection.
DERBY-2099Make BasePage.getPageId() final
DERBY-2096Change the Parser.parserStatement() to return the more specific StatementNode instead of QueryTreeNode.
DERBY-2093Error in initSlotTable() can cause NPE or ASSERT rather than reporting page number in corrupt page message.
DERBY-2088Update the documentation templates. Add comment about changing the reference ID
DERBY-2083Shutting down a database loaded from a jar leaves an open file reference to the jar file containing the database.
DERBY-2067Assert failure in EmbedConnection.restoreContextStack() when running lang/closed.java
DERBY-2060SET CURRENT ISOLATION in ref.man refers java.sql.Connection.setTransactionLevel instead of java.sql.Connection.setTransactionIsolation
DERBY-2057SYSCS_UTIL.SYSCS_INPLACE_COMPRESS_TABLE documentation or implementation error on its arguments.
DERBY-2053Dev Guide: Syntax errors in SQL tips -> Tricks of the VALUES clause -> Multiple rows
DERBY-2050Manipulating CachedItems could be more efficient
DERBY-2046Make class org.apache.derby.iapi.store.raw.PageKey final
DERBY-2042Provide documentation for new RENAME COLUMN statement
DERBY-2025convert lang/updatableResultSet.java to Junit
DERBY-2022jdbcapi.LobStreamsTest runs only in client (not embedded) but its suite() method gives no reason why.
DERBY-2019IJ's describe command does not handle quotes very well
DERBY-2018NullPointerException in CREATE VIEW ... VALUES NULL;
DERBY-2001Add DITA templates for the 3 topic types into the trunk
DERBY-1995Add base schema scripts for order entry
DERBY-1993Check in the demo used by the Java in the Database session at Apachecon 2006
DERBY-1985Use Calendar.setTimeInMillis(long) instead of Calendar.setTime(Date) for performance.
DERBY-1983Change build system so that base level is JDK 1.4
DERBY-1979convert jdbcapi/characterStreams.java to Junit
DERBY-1975SQLAuthorizationPropTest cannot be run twice against the same database.
DERBY-1965NetworkServerControlImpl never closes the socket or streams it opens in setUpSocket.
DERBY-195910.2 'Derby Developer's Guide' error/ambiguity.
DERBY-1956Remove stale code from the statement classes in the client driver
DERBY-1955Unquoted path in .bat files may cause errors (Win)
DERBY-1953Make FOR EACH clause and MODE DB2SQL in CREATE TRIGGER statement optional
DERBY-1949locate function documentation should clarify behavior when first parameter is empty string
DERBY-1947OutOfMemoryError after repeated calls to boot and shutdown a database
DERBY-1935Reference Manual - Derby Limitations
DERBY-1934Reference Manual updates - J2EE Compliance: Java Transaction API and javax.sql Extensions
DERBY-1930Move JDBC implementation notes into the published javadoc
DERBY-1929SYSTABLEPERMS and SYSCOLPERMS documentation needs to be updated
DERBY-1928Update table "Support for SQL-92 Features: Basic schema manipulation" for GRANT/REVOKE
DERBY-1926Provide documentation for ALTER TABLE DROP COLUMN
DERBY-1922readme.html under frameworks does not mention about Derby client and some minor typos in example.html
DERBY-1920DOCS - Improve topic titles for vague and duplicate topics
DERBY-1919Top level index.html page should link to release notes and other items in top-level of a release.
DERBY-1918INCREMENT of IDENTITY column described as allowing a value of zero in reference manual
DERBY-1917Clob.position fails with Embedded driver and large Clobs
DERBY-1909ALTER TABLE DROP COLUMN needs to update GRANTed column privileges
DERBY-1895Convert jdbcapi/blobclob4BLOB.java to Junit
DERBY-1890improve XSDFI error message
DERBY-1879Save meta data related information for an EmbedResultSet at the plan level instead of the ResultSet level improves performance.
DERBY-1868Merge argument descriptors into SQLState strings so that SQLState documentation can be generated by a program
DERBY-1861Column ordering ASSERT when combining column references and expressions in same ORDER BY
DERBY-1852Wrong results: duplicate rows returned for nested UNIONs when they should be eliminated.
DERBY-1847SELECT statement asserts with XJ001 when attempted to select a newly added column in SQL authorization mode
DERBY-1828Access rule violations should use a SQL state starting with '42' according to the SQL standard.
DERBY-1822LOCK TABLE example and description in reference manual should get replaced by a 'real' example
DERBY-1816Client's ResultSet.getTime() on a SQL TIMESTAMP column loses the sub-second resolution and always has a milli-second value of zero.
DERBY-1805Links to element ids inside a topic are broken in PDFs and HTML Books
DERBY-1795Graphics not copied over for PDF and HTML-single manuals
DERBY-1765Update ALTER TABLE documentation to reflect DERBY-119 (ALTER COLUMN [NOT]NULL)
DERBY-1753Doc for SYSCS_INPLACE_COMPRESS_TABLE has incorrect procedure name in the java examples.
DERBY-1752Fix javadoc to account for changes required by new licence header policy.
DERBY-1709Deprecate scripts in frameworks directory
DERBY-1704Allow more concurrency in the lock manager
DERBY-1673Compling with jikes not longer works due to recent changes that added -target -source command line flags to each compile
DERBY-1665Incorrect JavaDoc for Qualifier interface
DERBY-1662Document derbyrun.jar
DERBY-1644NPE when inserting values to a table that has a column declared as generated by default as identity
DERBY-1624use of direct column name rather than alias make aggregation fail (Hibernate depends on that)
DERBY-1590Consolidate the *conrefs.dita files in the documentation source tree to a single file.
DERBY-1589CREATE TABLE throws NullPointerException in Derby SQL Standard Authorization after DROPs and REVOKES
DERBY-1588Link "Getting Started...." and "Apache Derby Server ...." in demo.html needs to be linked to actual documents instead of manuals page
DERBY-1570The derby configuration, logging and diagnostic properties such as derby.language.logStatementText are hard to find in the documentation
DERBY-1535Trial 2 for DERBY-550, improve use of Engine from NetworkServer and reduce memory usage
DERBY-1526build should be able to locate the Java runtime libraries from properties not sourced from ${user.home}, but inside the current subversion checkout.
DERBY-1520Document new SYSCS_DIAG tables
DERBY-1501PreparedStatement#setNull(int parameterIndex, int sqlType) throws SQL Exception if given sqlType is LONGVARBINARY in embedded mode
DERBY-1494PreparedStatement.setNull(int, int) checks type compatibility on embedded, but not on the client
DERBY-1490Provide ALTER TABLE RENAME COLUMN functionality
DERBY-1489Provide ALTER TABLE DROP COLUMN functionality
DERBY-1484Client and embedded behave differently when the table name is null in DatabaseMetaData methods
DERBY-1434Client can send incorrect database name to server after having made multiple connections to different databases.
DERBY-1275Provide a way to enable client tracing without changing the application
DERBY-1132Truncation Error with Concat
DERBY-1054Starting Derby with the NetServlet inside of tomcat does not allow binding to non localhost interface.
DERBY-931Until DERBY-911 gets fixed, document the difference in behavior between Nework Client Driver and Embedded Driver for setReadOnly

Issues

Compared with the previous release (10.2.2.0), Derby release 10.3.0.0 introduces the following new features and incompatibilities. These merit your special attention.


Note for DERBY-2610


Note for DERBY-2386


Note for DERBY-2296

Summary of Change

ClientDataSource now supports the createDatabase and shutdownDatabase properties.

Symptoms Seen by Applications Affected by Change

The functionality is new for ClientDataSources. Previously, applications could not call these methods. Now these methods work:

  • setCreateDatabase (String)
  • getCreateDatabase()
  • setShutdownDatabase (String)
  • getShutdownDatabase()

These methods should behave similarly to the ones in Embedded, i.e. only valid value for setCreateDatabase is "create", and for setShutdownDatabase is "shutdown". In essence, at connection time, if set to a valid value, the property is passed on to the server side with the ConnectionAttributes.
Note, that the result for setting contradicting properties for createDatabase and ShutdownDatabase, whether through setCreateDatabase("create") and setShutdownDatabase("shutdown") or via setConnectionAttributes("create=true") or ("shutdown=true") is undefined.

Incompatibilities with Previous Release

No incompatibilities were introduced.

Rationale for Change

With version 10.2.1.6 an incompatibility with 10.1.1.0 was introduced - since revision 393003, the undocumented, non-standard but previously public method, getProperties for Client DataSources was removed for security reasons. This left only the setConnectionAttributes method available for creating or shutting down a database, and caused hardship for applications that had previously taken advantage of the getProperties method. For instance, in Geronimo the getProperties method was previously used to inquire and set whether a create=true was set for a database.
Support for the four methods already existing for EmbeddedDataSource was requested for ClientDataSource to compensate for the disappearance of getProperties as a public method.

Application Changes Required

Application code will need to be adjusted if they want to take advantage of these new methods for ClientDataSources.


Note for DERBY-2108


Note for DERBY-1852


Note for DERBY-1828

Summary of Change

Most authorization failures have new error codes.

Symptoms Seen by Applications Affected by Change

In the previous release, authorization failures had error codes 2850x and 04501. In this release, most of these errors have new error codes. The code changes are: 04501, 2850H, 2850I and 2850J are now 08004. 28506-2850G are now 42500-4250A, 28501 is now 4250B, 28503-28505 are now 4250C-4250E. Only the error codes have been changed; error messages are not affected.

Incompatibilities with Previous Release

Applications that are dependant on authorization error codes may fail.

Rationale for Change

The old error codes violated the SQL standard. The new error codes are correct.

Application Changes Required

Applications that are dependant on authorization error codes must be recoded to expect the new codes.


Note for DERBY-1501


Note for DERBY-1484

Summary of Change

The table name can no longer be a pattern in calls to DatabaseMetaData methods getBestRowIdentifier, getColumnPrivileges, getIndexInfo, getVersionColumns, getPrimaryKeys, getImportedKeys and getExportedKeys.

Symptoms Seen by Applications Affected by Change

In the previous release, the methods returned information on all tables that matched the pattern in the schema. A table name value of null was treated as a wildcard. Table names now have to match what is stored in the database. Furthermore, Derby now raises an SQLException if the table name is null.

Incompatibilities with Previous Release

Calls to the specified methods now fail if the table name parameter is null (SQLException is thrown) or is a pattern (no information is returned).

Rationale for Change

The previous behavior violated the JDBC standard. The new behavior is correct.

Application Changes Required

Users must recode applications to specify the table names. When information on multiple tables is required, the application first has to get the table names, e.g. by using the DatabaseMetaData method getTables(), and then use the returned table names as input to the method in question.


Note for DERBY-729


Note for DERBY-415

Summary of Change

Sysinfo now presents separate command switches to check the classpath for the presence of the Derby client and the DB2 JCC driver.

Symptoms Seen by Applications Affected by Change

Previously, if you ran "java org.apache.derby.tools.sysinfo -cp client SimpleApp.class" you got a message indicating that the DB2 JCC driver was not found in your classpath, even though you had the Derby Client library in your classpath. Now "-cp client" only checks for the presence of the Derby client. To check for the presence of the DB2 JCC driver jar, you can pass the new "-cp db2driver" argument.

Incompatibilities with Previous Release

To check for the presence of the DB2 JCC driver, you must use the new "-cp db2driver" argument.

Rationale for Change

The behavior has changed in order to eliminate a confusing diagnostic message.

Application Changes Required

Users who want to check for the presence of the DB2 JCC driver will need to use the new command switch.


Note for DERBY-119

Summary of Change

The ALTER TABLE statement now includes the additional ability to alter the NULL / NOT NULL constraint on a column in a table.

Symptoms Seen by Applications Affected by Change

The syntax is:

ALTER TABLE table ALTER [COLUMN] column [NOT] NULL

You cannot remove the NOT NULL constraint if the column is used in a PRIMARY KEY or UNIQUE constraint.

In addition, you cannot add the NOT NULL constraint if there are existing NULL values for the column in the table.

Rationale for Change

Users have requested this feature and other databases support it.

Build Environment

Derby release 10.3.0.0 was built using the following environment: