Releases: FirebirdSQL/jaybird
Jaybird 2.2.8
The following has been changed or fixed since Jaybird 2.2.7:
- Support for Java 5 has been dropped
- Fixed: LibreOffice doesn't display tables with more than 41 records (JDBC-383)
- Improvement: Don't use Firebird provided IP address for connecting event channel (JDBC-384)
- Fixed:
Connection.getMetaData().getColumnsresult set contains wrong (empty)COLUMN_DEFif column type was defined using domain (JDBC-388) - Fixed: Unable to retrieve update count after result set (JDBC-390)
After executing a query that produces a result set, callinggetMoreResultswill allowgetUpdateCountto actually return the update count where previously it always returned-1. This also allows obtaining the update count after a select query (even when executed usingexecuteQuery). For selects the result will usually be0. - Fixed:
SELECTstatements are processed forgetGeneratedKeysby appendingRETURNING(+ all columnnames) (JDBC-391) - Fixed: Generated key grammar does not correctly handle quoted table names (JDBC-392)
- Fixed: Generated key grammar does not detect returning clause in update and delete (JDBC-393)
The following are known in issues in Jaybird 2.2.8 (and earlier):
- ResultSets opened with
CLOSE_CURSORS_AT_COMMITaren't correctly closed on commit when auto-commit is off (JDBC-307) - Using
FBEventManagerwith Firebird 3,NATIVE(orEMBEDDED) protocol and a Firebird 3fbclient/fbembedcan crash the JVM with an access violation (JDBC-398)
This list is not exhaustive, see the Jaybird tracker for a full list of open bugs.
See also the full release notes.
The release is also available on maven(*):
<groupId>org.firebirdsql.jdbc</groupId>
<artifactId>jaybird-jdkXX</artifactId>
<version>2.2.8</version>
* The artifactId depends on your target Java version: jaybird-jdk18, jaybird-jdk17, or jaybird-jdk16.
Jaybird 2.2.7
The following has been changed or fixed in Jaybird 2.2.7:
- Fixed: blob return value of executable procedure obtained through getters on CallableStatement is 8 byte blob id, instead of expected blob content (JDBC-381)
This was a regression caused by the changes of JDBC-350.
See also the full release notes
Jaybird 2.2.6
The following has been changed or fixed in Jaybird 2.2.6:
- Reverted Firebird 3 workaround for updatable result sets as bug has been fixed in Firebird (JDBC-330)
- Fixed: Processing and closing the ResultSet from callable statement and then using the getters throws NullPointerException (JDBC-350)
Using both the getters and the result set for the same callable statement is incorrect; the ability to do this might be removed in a future version of Jaybird. AResultSetshould be used for selectable procedures, while the getters should be used with executable procedures. - Fixed: FBManagedConnectionFactory.tryCompleteInLimboTransaction doesn't work with recent Firebird 3 builds (JDBC-353)
- Fixed: Jaybird can throw a
NullPointerExceptionwhen a fatal connection error has occurred (JDBC-359) - Fixed: Calling close on a JCA connection triggers exception Connection enlisted in distributed transaction (JDBC-362)
- Fixed: Potential memory-leak when using a lot of different connection strings and/or properties (JDBC-364)
- Fixed:
FBRowUpdater.buildInsertStatementdoesn't quote column names (JDBC-370) - Fixed:
EncodingFactorydoesn't handleUnsupportedCharsetException(JDBC-371) - Fixed: Current method of quoting in
FBRowUpdaterincorrect for dialect 1 (JDBC-372)
See also the full release notes
Jaybird 2.2.5
The following has been changed or fixed in Jaybird 2.2.5:
- Fixed:
getCrossReferencebroken by changes of JDBC-331 (JDBC-335) - Added: basic support for Java 8 java.time in
PreparedStatement.setObject()andResultSet.updateObject()(JDBC-339)
As part of this change the supported sub-second precision forjava.sql.Timestamphas been increased from 1 millisecond to the maximum Firebird precision of 100 microseconds (or 0.1 millisecond). Withjava.sql.Timestampthe 100 microsecond precision is only available throughgetNanos()andsetNanos(). - Fixed: Deadlocks and other thread safety issues with classes in
org.firebirdsql.pool(JDBC-341)
See also the full release notes.
Jaybird 2.2.4
The following has been changed or fixed in Jaybird 2.2.4:
- Fixed: Exceptions during statement preparation leave connection and transaction open after explicit close (JDBC-311)
- Fixed batch update (or insert) with blob set through
setBinaryStream()sets empty blob for all but the first batch entry (JDBC-312) - Fixed incomplete checks of database, transaction, statement and blob handle validity before continuing with actions. These incomplete checks could lead to unexpected exceptions (for example a
NullPointerExceptioniniscDatabaseInfo) (JDBC-313) - Fixed error when setting connection charset equal to
file.encodingjava property (JDBC-314) - Fixed connection character set not correctly set when specifying the Java connection character set (
charSetorlocalEncodingproperty) (JDBC-315) - Fixed incorrect lengths and/or radix reported by
getTypeInfoandgetColumnsmetadata (JDBC-317, JDBC-318) - Initial Java 8 / JDBC 4.2 support (JDBC-319)
- Firebird 3
BOOLEANtype support, see Support for Firebird 3 BOOLEAN type (JDBC-321) - Added fallback of loading
GDSFactoryPluginimplementations to preventNullPointerExceptionin Hibernate reverse engineering wizard in NetBeans (JDBC-325) - Fixed: Jaybird should specify dialect 3 in dpb when no explicit dialect was set (JDBC-327)
- Fixed: several
DatabaseMetaDatamethods defined by JDBC to only accept the actual table name also accepted aLIKE-pattern or empty string or null. This was changed to conform to JDBC. This change can break applications that relied on the incorrect behavior (JDBC-331)
Affected methods are:getPrimaryKeys,getBestRowIdentifier,getImportedKeys,getExportedKeysandgetCrossReference. As part of this changegetIndexInfonow handles names in the wrong case slightly different.
Jaybird 3.0 will further modify and restrict the pattern matching and case sensitivity of metadata methods. See Future changes to Jaybird.
See also the full release notes
Jaybird 2.2.3
The following has been changed or fixed in Jaybird 2.2.3:
- Fixed incorrect synchronization in native and embedded protocol (JNI) implementation for
iscBlobInfoandiscSeekBlob(JDBC-300)
WARNING: Although Jaybird strives for correct synchronization, a JDBC Connection, and its dependent objects should be used from a singleThreadat a time, sharing on multiple threads concurrently is not advisable. - Fixed holdable
ResultSetis closed on auto-commit (JDBC-304, JDBC-305) - Fixed table names missing or padded with spaces in Database view of IntelliJ IDEA (JDBC-308, IDEA-100786)
- Fixed incorrect JDBC minor version reported under Java 7; this resulted in an incorrect column name (for Java 7) in the metadata of
DatabaseMetaData.getColumns(...)(JDBC-309) - Added
IOExceptionto cause ofGDSExceptionwith error 335544721; Unable to complete network request to host "" for further investigation (JDBC-306)
See also the full release notes.
Jaybird 2.2.2
The following has been changed or fixed in Jaybird 2.2.2:
- Fixed:
FBMaintenanceManager.listLimboTransactions()reports incorrect transaction id when the result contains multi-site transactions in limbo (JDBC-266) - Fixed: Calling
PreparedStatement.setClob(int, Clob)with a non-FirebirdClob(eg like Hibernate does) or callingPreparedStatement.setClob(int, Reader)throwsFBSQLException: You can't start before the beginning of the blob (JDBC-281) - Fixed: Connection property types not properly processed from
isc_dpb_types.properties(JDBC-284) - Fixed: JNI implementation of parameter buffer writes incorrect integers (JDBC-285, JDBC-286)
- Changed: Throw
SQLExceptionwhen callingexecute,executeQuery,executeUpdateandaddBatchmethods accepting a query string on aPreparedStatementorCallableStatementas required by JDBC 4.0 (JDBC-288)
NOTE: Be aware that this change can break existing code if you depended on the old, non-standard behavior! WithaddBatch(String)the old behavior lead to a memory leak and unexpected results. - Fixed:
LIKEescape character JDBC escape ({escape '<char>'}) doesn't work (JDBC-290) - Added: Support for a connect timeout using connection property
connectTimeout. This property can be specified in the JDBC URL orPropertiesobject or on theDataSource. If theconnectTimeoutproperty is not specified, the generalDriverManagerpropertyloginTimeoutis used. The value is the timeout in seconds. (JDBC-295)
For the Java wire protocol the connect timeout will detect unreachable hosts. In the JNI implementation (native protocol) the connect timeout works as the DPB itemisc_dpb_connect_timeoutwhich only works after connecting to the server for theop_acceptphase of the protocol. This means that - for the native protocol - the connect timeout will not detect unreachable hosts within the timeout. As that might be unexpected, anSQLWarningis added to the connection if the property is specified with the native protocol. - As part of the connect timeout change, hostname handling (if the hostname is an IP-address) in the Java wire protocol was changed. This should not have an impact in recent Java versions, but on older Java versions (Java 5 up to update 5) this might result in a delay in connecting using an IP-address, if that address can't be reverse-resolved to a hostname. Workaround is to add an entry for that IP-address to the
/etc/hostsor%WINDIR%\System32\Drivers\etc\hostsfile.
See also the full release notes.
Jaybird 2.2.1
The following has been changed or fixed in Jaybird 2.2.1:
- Fixed:
UnsatisfiedLinkErrorinlibjaybird22(_x64).soundefined symbol:_ZTVN10__cxxabiv117__class_type_infoEon Linux (JDBC-259) - Added connection property
columnLabelForNamefor backwards compatible behavior ofResultSetMetaData#getColumnName(int)and compatibility with bug incom.sun.rowset.CachedRowSetImpl(JDBC-260)
Set property to true for backwards compatible behavior (getColumnName()returns the column label); don't set the property or set it to false for JDBC-compliant behavior (recommended). - Fixed:
setString(column, null)on? IS (NOT) NULLcondition does not set parameter toNULL(JDBC-264) - The
charSetconnection property now accepts all aliases of the supported Java character sets (eg instead of onlyCp1252nowwindows-1252is also accepted) (JDBC-267) - Fixed: values of
charSetproperty are case-sensitive (JDBC-268) - Fixed: setting a parameter as
NULLwith the native protocol does not work when Firebird describes the parameter as not nullable (JDBC-271)
See also the full release notes (2.2.2).
Jaybird 2.2.0
Changes and fixes since Jaybird 2.2.0 beta 1
The following was changed or fixed after the release of Jaybird 2.2.0 beta 1:
ConcurrentModificationExceptionwhen closing connection obtained fromorg.firebirdsql.ds.FBConnectionPoolDataSourcewith statements open (JDBC-250)- Memory leak when obtaining multiple connections for the same URL (JDBC-249)
- CPU spikes to 100% when using events and Firebird Server is stopped or unreachable (JDBC-232)
- Events do not work on Embedded (JDBC-247)
- Provide workaround for character set transliteration problems in database filenames and other connection properties (JDBC-253); see also Support for Firebird 2.5.
FBBackupManagerdoes not allow 16kb page size for restore (JDBC-255)- Log warning and add warning on
Connectionwhen no explicit connection character set is specified (JDBC-257)
Support for getGeneratedKeys()
Support was added for the getGeneratedKeys() functionality for Statement and PreparedStatement.
There are four distinct use-cases:
-
Methods accepting an
intparameter with values ofStatement.NO_GENERATED_KEYSandStatement.RETURN_GENERATED_KEYSWhen
NO_GENERATED_KEYSis passed, the query will be executed as a normal query.When
RETURN_GENERATED_KEYSis passed, the driver will add all columns of the table in ordinal position order (as in the (JDBC) metadata of the table). It is advisable to retrieve the values from thegetGeneratedKeys()result set by column name.We opted to include all columns as it is next to impossible to decide which columns are filled by a trigger or otherwise and only returning the primary key will be too limiting.
-
Methods accepting an
int[]parameter with column indexes.The values in the
int[]parameter are the ordinal positions of the columns as specified in the (JDBC) metadata of the table. For anullor empty array the statement is processed as is. Invalid ordinal positions are ignored and silently dropped (be aware: the JDBC specification is not entirely clear if this is valid behavior, so this might change in the future). -
Methods accepting a
String[]parameter with column names.The values in the
String[]are the column names to be returned. The column names provided are processed as is and not checked for validity or the need of quoting. Providing non-existent or incorrectly (un)quoted columns will result in an exception.This method is the fastest as it does not retrieve metadata from the server.
-
Providing a query already containing a
RETURNINGclause. In this case all of the previous cases are ignored and the query is executed as is. It is possible to retrieve the result set usinggetGeneratedKeys().
This functionality will only be available if the ANTLR 3.4 runtime classes are on the classpath. Except for calling methods with NO_GENERATED_KEYS, absence of the ANTLR runtime will throw FBDriverNotCapableException.
This functionality should work for INSERT (from Firebird 2.0), and for UPDATE, UPDATE OR INSERT and DELETE (from Firebird 2.1).
Java 6 and JDBC 4.0 API support
Support was added for the following JDBC 4.0 features:
- Automatic driver loading: on Java 6 and later it is no longer necessary to use
Class.forName("org.firebirdsql.jdbc.FBDriver")to load the driver - Implementation of
java.sql.Wrapperinterface on various JDBC classes; in general it only unwraps to the specific implementation class (and superclasses) and implemented interfaces - Support for chained exceptions (use
getNextException()anditerator()to view other, related exceptions) andgetCause()to retrieve the cause (deprecating similargetInternalException()) - Support for
getClientInfo()andsetClientInfo()onConnection
Java 7 and JDBC 4.1 API support
Support was added for the following JDBC 4.1 features:
- try-with-resources
- Statement
closeOnCompletion
Other methods added by JDBC 4.1 will throw FBDriverNotCapableException (a subclass of SQLFeatureNotSupportedException).
Jaybird on Maven
Jaybird 2.2.x is available on maven, with a separate artifact for each supported Java version.
Groupid: org.firebirdsql.jdbc, artifactid: jaybird-jdkXX (where XX is 15, 16, 17, 18).
Version: 2.2.x
When deploying to a JavaEE environment, exclude the avax.resource connector-api dependency as this will be provided by the application server.
Native and Embedded (JNI) 64-bit Windows and Linux support
The JNI libraries for native and embedded support now also have a 64 bit version.
Support for Firebird 2.5
Added support for Firebird 2.5 Services API enhancements:
- The security database can be set
- Support for
SET/DROP AUTO ADMIN - Mapping for new role
RDB$ADMINin security database - Added new Firebird 2.1 shutdown/online modes available in Firebird 2.5 via the Services API
- Support for NBackup via Services API in Firebird 2.5
- Support for Trace/Audit via Services API in Firebird 2.5
Since Firebird 2.5, Firebird supports full UTF-8 database filenames and other connection properties (Database Parameter Buffer values). Jaybird does not yet support these changes, but a workaround is available:
This workaround consists of two steps
- Ensure your Java application is executed with the system property
file.encoding=UTF-8(either because that is the default encoding for your OS, or by explicitly specifying this property on the commandline of your application using-Dfile.encoding=UTF-8) - Include property
utf8_filename=1in the JDBC URL or (non-standard) properties of the datasource
This will only work if the Firebird server is version 2.5 or higher.
Improved support for OpenOffice / LibreOffice Base
The interpretation of the JDBC standard by Jaybird differs from the interpretation by OpenOffice / LibreOffice. To address some of the problems caused by these differences, Jaybird now provides a separate protocol for OpenOffice / LibreOffice.
When connecting from Base, use the protocol prefix jdbc:firebirdsql:oo:. Be aware that this is a variant of the pure Java wire protocol and not the native or embedded protocol.
Issues addressed by this protocol:
ResultSets are not closed when a statements is finished (eg fully readResultSetor when creating a new Statement inautoCommitmode)DatabaseMetaData#getTablePrivileges(...)reports privileges granted toPUBLICand to the current role (as reported byCURRENT_ROLE) as being granted to the user (after Jaybird 2.2.0 beta 1).
Other fixes and changes
- Replaced
mini-j2ee.jarwithconnector-api-1.5.jar: make sure to remove the oldmini-j2ee.jarfrom the classpath of your application. - Dropped
jaybird-pooljar from the distribution (all classes are include in thejaybirdjar and thejaybird-fulljar) FBResultSetMetaData#getcolumnName(int)will now return the original column name (if available) for compliance with the JDBC specification,getColumnLabel(int)will still return the alias (or the column name if no alias is defined). See Compatibility withcom.sun.rowset.*for potential problems when using the reference implementation ofCachedRowSet.FBDatabaseMetaDatahas been updated to include metadata columns defined by JDBC 3.0, 4.0 and 4.1. This also changes the position ofOWNER_NAMEcolumn in the result set ofgetTables(..)as this column is Jaybird-specific and not defined in JDBC.FBDatabaseMetaData#getIndexInfo(..)now also returns expression indexes. TheCOLUMN_NAMEcolumn will contain the expression (if available).FBDatabaseMetaData#getIndexInfo(..)now correctly limits the returned indexes to unique indexes when parameter unique is set to true.- The connection property
octetsAsBytescan be used to identify fields withCHARACTER SET OCTETSas being(VAR)BINARY(in the resultsetmetadata only) - The
getTime(),getDate(),getTimestamp()methods which take aCalendarobject now correctly handle conversions around Daylight Savings Time (DST) changes. Before the time was first converted to the local JVM timezone, and then to the timezone of the providedCalendar, this could lose up to an hour in time. Now the time is converted directly to the timezone of the providedCalendar. (JDBC-154)
See also the full release notes (2.2.2).