apache > db
Apache DB Project
Font size:      

Apache Derby Release


Use the links below to download a distribution of Apache Derby. You should always verify the integrity of distribution files downloaded from a mirror.

There are four different distributions:

  • bin distribution - contains the documentation, javadoc, and jar files for Derby.
  • lib distribution - contains only the jar files for Derby.
  • lib-debug distribution - contains jar files for Derby with source line numbers.
  • src distribution - contains the Derby source tree at the point which the binaries were built.

db-derby- [PGP] [MD5]
db-derby- [PGP] [MD5]

db-derby- [PGP] [MD5]
db-derby- [PGP] [MD5]

db-derby- [PGP] [MD5]
db-derby- [PGP] [MD5]

db-derby- [PGP] [MD5]
db-derby- [PGP] [MD5] (Note that, due to long filenames, you will need gnu tar to unravel this tarball.)

Release Notes for Apache Derby

These notes describe the difference between Apache Derby release and the preceding release


The most up to date information about Derby releases can be found on the Derby download page.

Apache Derby is a pure Java relational database engine using standard SQL and JDBC as its APIs. More information about Derby can be found on the Apache web site. 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 (system info)

Java and JDBC versions supported:

  • Java SE 5 and higher with JDBC 3.0, 4.0, 4.1, and 4.2.
  • Java ME CDC/Foundation Profile 1.1 with JSR-169 JDBC Optional Package for CDC/Foundation Profile.

New Features

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

  • SYSCS_UTIL.SYSCS_INVALIDATE_STORED_STATEMENTS - Derby has a new system procedure for invalidating stored prepared statements when you think that your metadata queries or triggers are misbehaving--for example if they throw a NoSuchMethodError on execution. See the section on this new system procedure in the Derby Reference Manual.
  • Unencrypting databases - Encryption can be turned off on existing databases. See the section on the decryptDatabase attribute in the Derby Reference Manual.
  • Small device profile - Derby runs on the small CP2 profile of Java 8.
  • JDBC 4.2 - Derby supports the Java 8 enhancements to JDBC.
  • User-defined aggregates - Applications can create their own aggregate operators. See the "CREATE DERBY AGGREGATE" section in the Derby Reference Manual.
  • Varargs routines - SQL routines can be bound to user-written Java methods which have variable length argument lists.
  • Optional tools - Derby has new, optional tools to support data migration and metadata queries. See the "Optional tools" section in the Derby Tools and Utilities Guide.

Bug Fixes

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

Issue Id
DERBY-6106Remove the outdated Japanese and Portuguese docs
DERBY-6100Upgrade tests fail on compact2
DERBY-6098Skip compatibility testing of old servers on compact profile 2
DERBY-6097Management test suite fails when JMX is not supported
DERBY-6094Derby ignores DriverManager.setLoginTimeout()
DERBY-6089CallableStatement#registerOutParameter on client lacks check of legal types.
DERBY-6088PreparedStatementTest42 lacks "fail" call when operation unexpectedly succeeds
DERBY-6087Can't build Javadoc with JDK 1.8 if explicit j15lib, j16lib and j17lib paths are set
DERBY-6086Factor out logic for creating custom connection in jdbcapi.StatementPoolingTest
DERBY-6085Improve error reporting when server port is unavailable
DERBY-6083Update minimum/maximum floating-point values to align with DERBY-3398 fixes
DERBY-6081JDBC 4.2 setObject() and updateObject() methods throw NPE when type is null
DERBY-6079100's of errors in nightly test run on weme after jacoco property/priviledges checkin
DERBY-6078Propagate a set of properties to the junit tasks in build.xml
DERBY-6077web site needs updating on a few points
DERBY-6076Folder.gif icon missing from derby documentation website
DERBY-6073Test ordering instability in StatementPoolingTest
DERBY-6072Move lang/reopenScan.sql to LangScripts
DERBY-6071trunk javadoc build fails with Javadoc failed: java.io.IOException: Cannot run program \bin\javadoc.exe": CreateProcess error=206, The filename or extension is too long.
DERBY-6070Document Derby's JDBC 4.2 implementation
DERBY-6065LockTable API link in the documentation is broken
DERBY-6064Failures in upgradeTests.Changes10_9 related to index cardinality statistics
DERBY-6063Access static variables by class name in TabInfoImpl, InsertResultSet and ControlRow
DERBY-6061Upgrade language is inconsistent
DERBY-6060Fix Javadoc for UpgradeTrajectoryTest dangling reference
DERBY-6059Document Derby usage running on Java 8 JEP 161 Compact Profiles
DERBY-60582 ClassNotFoundException failures on trunk with ibm's weme6.2 since build 1433263
DERBY-6053Client should use a prepared statement rather than regular statement for Connection.setTransactionIsolation
DERBY-6052Text files under build/site do not have svn:eol-style=native
DERBY-6050Make all topics visible in ToCs
DERBY-6044Fix poor word breaking in table on download page(s)
DERBY-6043Make JQL default query mode for 'ant genrelnotes'
DERBY-6042Document the syscs_util.syscs_register_tool procedure added by DERBY-6022.
DERBY-6041Remove unused parameters from the BTreeLockingPolicy interface
DERBY-6039Intermittent failure in LangProcedureTest.testDynamicResultSets: Table/View 'T1' does not exist.
DERBY-6038Intermittent failure in LangProcedureTest: cannot drop table because of open ResultSet
DERBY-6034Fix documentation on procedure argument limits
DERBY-6033Lift the arbitrary limit on the number of routine parameters.
DERBY-6030Length of escape string in LIKE ... ESCAPE not properly checked with territory based collation
DERBY-6027ORDER BY a cast expression gives NPE
DERBY-6018Document varargs routines.
DERBY-6017IN lists with mixed types may return wrong results
DERBY-6010Reference Manual should clarify what ALTER TABLE ADD COLUMN does
DERBY-6009Need stricter checking of ORDER BY clause in VALUES expressions
DERBY-6008Allow ORDER BY and FETCH/OFFSET in set operands
DERBY-6006NullPointerException in INSERT INTO ... SELECT FROM ... ORDER BY
DERBY-6003Create row templates outside of the generated code
DERBY-6002Reference manual is unclear on when territory can be set
DERBY-6001ErrorMessageTest assert failure: Only one of the waiters should be aborted
DERBY-6000Implement support for JDBC 4.2
DERBY-5999Improve documentation on index key lengths
DERBY-5998Replication tests fail on CDC platforms without optional JSSE package
DERBY-5996Create readme files (cautioning users against modifying database files) at database hard upgrade time
DERBY-5995Add a test case to check the 3 readme files get created even when log directory has been changed with jdbc url attribute logDevice
DERBY-5993The Reference Manual shows an embedded url in its example for the client-side-only retrieveMessageText attribute.
DERBY-5992Use BaseTestCase.execJavaCmd() to start process from NetworkServerTestSetup
DERBY-5989Stop producing byte code for non-existent qualifiers
DERBY-5986Make ArithmeticTest test DECIMAL data type
DERBY-5977Run storemore and possibly other store .sql tests in junit harness using ScriptTest mechanism.
DERBY-5976Document the new SQLWarning raised when trying to change the encryption state of an already booted database.
DERBY-5972Grammar doesn't accept OR operator without parentheses
DERBY-5971Improve test coverage for SQLBoolean class
DERBY-5969Encryption, re-encryption, and un-encryption silently fail if the database is already booted.
DERBY-5966NativeAuthenticationServiceTest.testAll() failure: ( FILE, NATIVE authentication on, LOCAL authentication ON, Authentication/Authorization turned OFF, SecurityManager ON, Embedded ): Connection to fifthDB unexpectedly failed.
DERBY-5964Timestamp comparison failure in AutomaticIndexStatisticsTest.testStatisticsCorrectness
DERBY-5962Internationalize error messages for database decryption
DERBY-5961Developer's guide mentions SQL state 40XL2 which is no longer used
DERBY-5960VirtualRandomAccessFile.close() is not idempotent
DERBY-5955Prepare Derby to run with Compact Profiles (JEP 161)
DERBY-5954NPE in SELECT involving subselects and windows functions
DERBY-5951Missing method exception raised when using Clobs with territory based collation
DERBY-5948Update JVMInfo.java to include JDK 8
DERBY-5947Factor out common code from generated classes
DERBY-5945Inappropriate error message when calling a procedure as a function (as if it had a return value)
DERBY-5940Disable securityMechanism=8 in NSSecurityMechanismTest on ARM platforms
DERBY-5939Document URL attribute for database decryption
DERBY-5938Documentation says Derby works with Java 1.4.2
DERBY-5937File handle is leaked when a Slave replication is shutdown with failover=true
DERBY-5935Remove unused code for factory classes in the reflection service
DERBY-5934Convert store.ReEncryptCrashRecovery
DERBY-5933SQL sorting error
DERBY-5930Reformat RawStore.setupEncryptionEngines
DERBY-5929Release numbers in a few topics need updating
DERBY-5928Add more task focus to Derby security documentation
DERBY-5927Add utility methods to query state of URL attributes in EmbedConnection
DERBY-5926Document user-defined aggregates (DERBY-672)
DERBY-5925Document derby.log changes resulting from DERBY-5240
DERBY-5918CREATE TABLE AS SELECT doesn't work on tables with BOOLEAN columns
DERBY-5917NoClassDefFoundErrors when running tests without derbynet.jar and derbyclient.jar
DERBY-5916java.lang.NullPointerException org.apache.derby.impl.store.raw.data.BaseDataFileFactory.stop() connecting to network server
DERBY-5914Incorrect list of compatible JRE versions in client trace #2
DERBY-5913Remove unused classes (GS)et*Action in client.am
DERBY-5912testIsValidImplemented fails for NetworkServer in some slow running machines/configurations
DERBY-5911WHERE condition getting pushed into sub-query with FETCH
DERBY-5910Document use of Connection.close() with try-with-resources
DERBY-5909The lang attribute in toc.html always says 'en-us'
DERBY-5906In the Reference Manual, sin() is used as the example for the sinh() function.
DERBY-5905Derby html documentation doesn't render properly and prints garbage on Internet Explorer
DERBY-5900Need to correct Reference Guide description of contents of SYS.SYSPERMS.OBJECTTYPE
DERBY-5898add ibm18 class to functionTests.harness
DERBY-5897Broken handling of paths with special characters in compatibility/VersionCombinationConfigurator
DERBY-5896Change java/drda source code to use spaces instead of tabs and clean up tab creep in java/client
DERBY-5894NPE in OnlineBackupTest1 while backing up in stubFileToRemoveAfterCheckPoint
DERBY-5885The order of argument names in messages.xml is sometimes wrong when the arguments occur in the message out of sequence.
DERBY-5883Simplify JSR-169 implementation class tree
DERBY-5880Move java.sql.Wrapper implementations to base classes in embedded driver
DERBY-5878Add message argument names, as comments, to English message file produced by MessageBuilder.
DERBY-5877Prune the brokered class tree
DERBY-5874Remove JDBC 3 constants from client.am.Statement
DERBY-5873Avoid unnecessary allocation of Number instances in client/server
DERBY-5872Inconsistency between isWrapperFor() and unwrap() in logical statements
DERBY-5871Invoke logical statements with existing statement tests
DERBY-5868Move java.sql.Wrapper implementations to base classes on the client
DERBY-5864weme 6.2 (J2ME) runs fail to start with Failed to invoke class org.apache.derbyTesting.functionTests.tests.derbynet._Suite java.lang.reflect.InvocationTargetException
DERBY-5860Remove unused methods in DDMReader and DDMWriter
DERBY-5854Test for methods in BrokeredCallableStatement
DERBY-5851Inconsistent code coverage shown for LogicalPreparedStatement40
DERBY-5847Clean up IDE warnings in DRDAConnThread
DERBY-5839dblook run on toursdb fails on triggers with java.lang.StringIndexOutOfBoundsException in dblook.log
DERBY-5836Move assertDirectoryDeleted from BaseJDBCTestCase to BaseTestCase
DERBY-5834Remove unused methods in NetPreparedStatement class
DERBY-5833Remove unused methods in NetCallableStatement class
DERBY-5831Update information on BIS EAR (export control)
DERBY-5830Make DoubleProperties.propertyNames() thread-safe
DERBY-5829Lift DB2 restriction on the DEFAULT clause
DERBY-5828Remove unused methods in NetPackageReply class
DERBY-5827Remove unused methods in NetStatementReply class
DERBY-5826Remove unused methods in NetConnectionReply class
DERBY-5822Document the new SQL standard behavior of the SPACE_TABLE vti
DERBY-5821tools/derbyrunjartest.java doesn't use jvmflags
DERBY-5820emma-instrumentation target should instrument derbyrun.jar
DERBY-5819Add logic to BaseTestCase to start subprocesses ready to be attached to from a Java debugger
DERBY-5817Add support for the JaCoCo code coverage tool
DERBY-5815Add replicationTests.ReplicationSuite to junit-core ant target
DERBY-5814Source cleanup in catalogs "impl.sql.catalog" and "impl.sql.compile"
DERBY-5813Remove unused class ErrorKey
DERBY-5810Include emma.jar on classpath when running compatibility test with instrumented jars
DERBY-5808Compatibility test should use BaseTestCase.execJavaCmd()
DERBY-5805Database encryption topics in Reference Manual need more information
DERBY-5804Remove unused class GenericClassInfo
DERBY-5803Make error handling in xaHelper more explicit
DERBY-5802Remove unused class ExecProcUtil
DERBY-5801Sub-processes should write EMMA coverage data to separate files
DERBY-5799add more info on when Derby chooses 32k page size for tables.
DERBY-5798Disable i18n/JapanCodeConversion.sql on platforms that don't support EUC_JP or SJIS
DERBY-5797AssertionFailedError in functionTests.tests.lang.UpdateStatisticsTest.testDisposableStatsEagerness
DERBY-5796Remove unused methods in client.am.DateTime
DERBY-5795Documentation in release doesn't include stylesheets
DERBY-5791Replication tests should use BaseTestCase.execJavaCmd() to run local commands
DERBY-5787(patch) remove dead allocation
DERBY-5786Duplicate copies of InputStreamUtil.java and DynamicByteArrayOutputStream.java classes in client.net package
DERBY-5783Remove duplicated code for starting remote processes in replication tests
DERBY-5779Table functions should only accept arguments which are constant in their query block.
DERBY-5775Upgrade tests should print full IOException stack trace when it fails to access old versions
DERBY-5764Make DatabaseMetaDataTest more robust wrt changes made by other tests
DERBY-5752LOBStreamControl should materialize less aggressively
DERBY-5750Sending an empty string as table name to compress table procedure or empty string as index name to update statistics procedure makes the parser throw an exception.
DERBY-5740Remove unsued code in AlterTableConstantaction.columnDroppedAndTriggerDependencies
DERBY-5632Logical deadlock happened when freezing/unfreezing the database
DERBY-5622Reduce the chance for hash collisions when checking bootPassword at boot time and when changing password.
DERBY-5578Provide a way to invalidate stored prepared statements
DERBY-5546ResultSet#updateBigDecimal on a REAL column does not do underflow checking
DERBY-5531Assert failure when inserting NULL into indexed column with territory-based collation
DERBY-5462ant release needs to accommodate for different ant executables on different systems
DERBY-5460ant release should allow local.properties to exist
DERBY-5425Updateable holdable ResultSet terminates early after 65638 updates
DERBY-5407When run across the network, dblook produces unusable DDL for VARCHAR FOR BIT DATA columns.
DERBY-5359Missing xmlns attribute for html element in docs
DERBY-5358SYSCS_COMPRESS_TABLE failed with conglomerate not found exception
DERBY-5340Comment in demo server policy should follow RFC 2606 convention
DERBY-5240Log Operating system information to derby.log on boot
DERBY-5232Put a stern README file in log and seg0 directories to warn users of corrpution they will cause if they touch files there
DERBY-5213Write tests to verify the interaction of TRUNCATE TABLE and online backup
DERBY-4841Improve projecthelp for the top level Derby build script
DERBY-4811Remove unused clean targets from the Derby build.
DERBY-4323test failure in lang.ErrorMessageTest with IBM iseries IBM 1.5
DERBY-4279Statement cache deadlock
DERBY-4259Document database property for determining database format version
DERBY-4229encryptionKeyLength connection attribute should be documented
DERBY-3399The automatic compile path property setting for the build system should be expanded to handle Java SE 6 virtual machines.
DERBY-3398Support min/max values for Java types float/double in real/double columns
DERBY-3371Strange (and untested) code fragment in RAMTransaction.addColumnToConglomerate()
DERBY-3275Mismatch between comments and actual use of initialSize parameter in CacheFactory and Clock
DERBY-2920Share code between readExternal() and readExternalFromArray()
DERBY-2774Desciption of variable part in error message of XSLAM was not exists in Derby reference manual.
DERBY-2705Description of error message for X0X61/X0Y59/X0Y69/X0Y70 in SQL error messages and exceptions of Reference manual is not appropriate.
DERBY-2699performance of like in territory based collation databases may be improved by changing way collation elements are calculated.
DERBY-2601Server SQLException error codes are not returned to client
DERBY-2572Write a master script which creates a release branch.
DERBY-2516Network Client allows execution of callable statement when one of the parameters is not set
DERBY-2461Convert lang/procedure.java to junit
DERBY-2076Rewrite junitTests/derbyNet/CompatibilityTest to conform to current JUnit usage
DERBY-1982Remove support for JDK 1.3 in 10.3 and onwards
DERBY-1721DOCS - Remove duplicate information in Dev Guide re: Encryption
DERBY-1400Cleanup code in network server's DRDAStatement class
DERBY-1048Include run of junitTests/CompatibilitySuite, or converted compatibility test suite with 10.1/trunk combination into suites.All
DERBY-436clean up imports and static field references in DRDA classes


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

Note for DERBY-5969

Summary of Change

A SQLWarning is now raised if you try to change the encryption state of an already booted database.

Symptoms Seen by Applications Affected by Change

A SQLWarning is raised if an application sets any of the following attributes while trying to connect to an already booted database:

  • dataEncryption
  • newBootPassword
  • newEncryptionKey
  • decryptDatabase

The connection attempt will succeed but a SQLWarning will appear on the warning chain returned by Connection.getWarnings(). The warning will have SQLState 01J17 and the following message text: You cannot encrypt, re-encrypt, or decrypt a database which is already booted. You must shutdown the database before attempting these operations.

Incompatibilities with Previous Release

In previous releases, Derby did not raise a SQLWarning when an application set the above attributes while connecting to an already booted database. This may cause an incompatibility now if an application always sets the dataEncryption attribute when connecting to an encrypted database. In previous releases, that attribute was simply ignored. Now the application sees an extra SQLWarning on the warnings chain after connecting to the encrypted database.

Rationale for Change

All of the affected attributes share a common meaning: change the encryption state of the database. When the database was already booted, the request to change its encryption state was ignored silently. The application could not tell whether the encryption state of the database had actually been changed. Now the application can check the warning chain to determine whether the database was encrypted, re-encrypted, or decrypted as requested.

Application Changes Required

Applications should check the warning chain after requesting a change to the encryption state of the database.

Applications which check the warning chain may need to be adjusted if they set the dataEncryption attribute whenever they connect to an encrypted database.

Note for DERBY-5962

Summary of Change

Changed SQL states for errors while re-encrypting a database.

Symptoms Seen by Applications Affected by Change

When re-encryption of a database fails and throws SQLException, the SQL state returned by SQLException.getSQLState() may not be the same as it was in earlier releases.

The following SQL states and messages have changed in this version:

Cannot re-encrypt the database with a new boot password or an external encryption key when there is a global transaction in the prepared state.
Cannot re-encrypt a read-only database with a new boot password or an external encryption key .
Cannot re-encrypt a database with a new boot password or an external encryption key, when database is in the log archive mode.
Encryption of an encrypted database with a new key or a new password failed: <failureMessage>

The new SQL states and messages reported for the above failure scenarios, are:

Cannot encrypt, re-encrypt or decrypt the database when there is a global transaction in the prepared state.
Cannot encrypt, re-encrypt or decrypt a read-only database.
Cannot encrypt, re-encrypt or decrypt a database when it is in the log archive mode.
Encryption, re-encryption or decryption of a database failed: <failureMessage>

Incompatibilities with Previous Release

The SQL states for some errors during re-encryption of a database have changed.

Rationale for Change

The consolidated messages simplify the error handling in the database encryption code.

Application Changes Required

Applications that look for the old SQL states should be changed to look for the new SQL states.

Note for DERBY-5779

Summary of Change

Table function arguments may no longer refer to other tables in the same query block.

Symptoms Seen by Applications Affected by Change

In previous releases, table functions could be invoked with arguments which referred to other tables in the same query block. Now Derby will reject those queries when the statement is prepared. For instance, the following query, which used to work...

select *
from T, table( F( T.a ) ) S;

...now raises this error:

ERROR 42ZB7: Illegal reference to column 'T.A'. Table function parameters may not refer to other tables in the same query block.

Incompatibilities with Previous Release

Applications may fail if they join table functions to other tables inside the FROM list.

Rationale for Change

The old syntax violated the SQL Standard and did not have a well-defined meaning.

Application Changes Required

No change is required if table function arguments refer to tables in outer query blocks. For instance, the following query still works:

select *
from T
where exists ( select B from table( F( T.a ) ) S );

However, applications need to re-write any query which uses the FROM list to join a table function to another table in the same query block. Developers should reason carefully about what the old syntax meant to express and then re-write the query in a legal way. In many cases, the following transformations may result in a query which expresses what the developer originally intended:

  • New column - Add a new column to the end of the ResultSet returned by the table function. The new column is the value of the original argument which joined to another table in the FROM list.
  • New overload - Add a new overload for the table function. The new overload omits the original argument which joined to another table in the FROM list. The new overload returns results for all possible values of the omitted argument.
  • Move the join into the WHERE clause - Now re-write the failing query, moving the join out of the FROM list and into the WHERE clause.

After applying these transformations, the failing query (given above) would look like this:

select *
from T, table( F() ) S
where T.A = S.A;

Note for DERBY-5578

Summary of Change

A new system procedure helps correct misbehaving triggers and metadata queries.

Symptoms Seen by Applications Affected by Change

Applications did not have a way to recompile metadata queries and triggers if a Derby bug made the queries and triggers behave incorrectly. If you suspect that your metadata queries or triggers are misbehaving, you may be able to fix their behavior by calling the following new system procedure:


Rationale for Change

The new SYSCS_UTIL.SYSCS_INVALIDATE_STORED_STATEMENTS procedure was introduced as a workaround when Derby bugs break metadata queries and triggers.

Note for DERBY-5546

Summary of Change

ResultSet#updateBigDecimal on a REAL or DOUBLE column now does underflow checking.

Symptoms Seen by Applications Affected by Change

Using ResultSet#updateBigDecimal will throw SQL error 22003 in applications that didn't use to throw.

Incompatibilities with Previous Release

If the application performs ResultSet#updateBigDecimal on a REAL or a DOUBLE column with a value that is too small to be represented in Derby and didn't include code to handle SQLDataException 22003, it would now need to handle this (and possibly update the value with 0.0 itself if that is the desired behavior).

Rationale for Change

To make Derby behavior more consistent and to reliably detect underflow behavior.

Application Changes Required

If the application would sometimes try to perform ResultSet#updateBigDecimal with a number that can't be represented by REAL or DOUBLE, as the case may be, an exception handler may have to be added.

Note for DERBY-5232

Summary of Change

Derby will create readme files in the database directories.

Symptoms Seen by Applications Affected by Change

A database created with Derby 10.10, or upgraded to 10.10, will contain readme files named README_DO_NOT_TOUCH_FILES.txt in the top-level database directory and in the subdirectories seg0 and log.

Rationale for Change

Unintentional editing of the database files by the users can leave the database in a non-recoverable state. To caution users against such an action, a database created with 10.10 or upgraded to Derby 10.10 will have three readme files which will warn users against touching any files in the various database directories. These readme files are in the top-level database directory and in the subdirectories seg0 and log.

Note for DERBY-3398

Summary of Change

Legacy DB2 compatibility limits on REAL and DOUBLE values have been lifted.

Symptoms Seen by Applications Affected by Change

SQLDataException 22003 may not be raised for applications which use float and double Java values outside DB2's limits for SQL REAL and DOUBLE.

In soft upgrade mode, the checking of the limits is still in place, but is deferred from ResultSet#updateXXX to ResultSet#updateRow.

Incompatibilities with Previous Release

The application cannot rely on Derby to detect when values outside the legacy DB2 limits are used. These limits are:

    float DB2_SMALLEST_REAL = -3.402E+38f;
    float DB2_LARGEST_REAL  = +3.402E+38f;
    float DB2_SMALLEST_POSITIVE_REAL = +1.175E-37f;
    float DB2_LARGEST_NEGATIVE_REAL  = -1.175E-37f;

    double DB2_SMALLEST_DOUBLE = -1.79769E+308d;
    double DB2_LARGEST_DOUBLE  = +1.79769E+308d;
    double DB2_SMALLEST_POSITIVE_DOUBLE = +2.225E-307d;
    double DB2_LARGEST_NEGATIVE_DOUBLE  = -2.225E-307d;

In soft upgrade mode, the place where the limits are checked has changed, cf. above.

Rationale for Change

We do this to allow applications to store a wider range of the Java floating point number types in Derby. It lets the application use Derby for all Java float and double values with the exception of NaN (not a number), -0.0 (normalized to +0.0) and +/- infinity as defined in the IEEE-754 1985 floating-point standard.

Application Changes Required

If the application relied on Derby to detect when use of numbers outside the DB2 limits were used, the application would now need to perform such checks itself.

Note for DERBY-2601

Summary of Change

Error codes match severity levels on the network client.

Symptoms Seen by Applications Affected by Change

In previous releases, an SQLException raised by the network client would in nearly every case return -1 from its getErrorCode() method.

Starting with this release, if both the network server and the network client are running Derby version 10.10 or higher, getErrorCode() returns a value that represents the severity of the error, and that is different from -1.

Special note for mixed version environments: If either the server or the client is at version 10.10 or higher, and the other party is at version 10.9 or lower, getErrorCode() may return a value that is neither -1 nor the severity of the error.

Incompatibilities with Previous Release

Applications that check the value returned by SQLException.getErrorCode() will see a different value in the new release.

Rationale for Change

The change makes getErrorCode() behave consistently in the network client driver and the embedded driver.

Application Changes Required

If the application is coded in a way that depends on SQLException.getErrorCode() returning -1, it will have to be recoded to ignore the error code or to accept a different value.

In environments where the server version and the client driver version differ, and the return value from SQLException.getErrorCode() has significance for the application, it is recommended to upgrade both the client driver and the server to version 10.10 or higher.

Build Environment

Derby release was built using the following environment:

  • Branch - Source code came from the 10.10 branch.
  • Machine - Mac OSX 10.7.5.
  • Ant - Apache Ant version 1.7.1 compiled on June 27 2008.
  • Compiler - All classes were compiled by a javacc built from the source for OpenJDK 64-Bit Server VM (build 25.0-b20, mixed mode).
  • JSR 169 - Java ME support was built using libraries from phoneME Advanced Milestone Release 2.

Verifying Releases

It is essential that you verify the integrity of the downloaded files using the PGP and MD5 signatures. MD5 verification ensures the file was not corrupted during the download process. PGP verification ensures that the file came from a certain person.

The PGP signatures can be verified using PGP or GPG. First download the Apache Derby KEYS as well as the asc signature file for the particular distribution. It is important that you get these files from the ultimate trusted source - the main ASF distribution site, rather than from a mirror. Then verify the signatures using ...

% pgpk -a KEYS
% pgpv db-derby-X.Y.tar.gz.asc


% pgp -ka KEYS
% pgp db-derby-X.Y.tar.gz.asc


% gpg --import KEYS
% gpg --verify db-derby-X.Y.tar.gz.asc

To verify the MD5 signature on the files, you need to use a program called md5 or md5sum, which is included in many unix distributions. It is also available as part of GNU Textutils. Windows users can get binary md5 programs from here, here, or here.

We strongly recommend that you verify your downloads with both PGP and MD5.