This is the first public alpha release of the current Connector/J 5.1 development branch, providing an insight to upcoming features. Although some of these are still under development, this release includes the following new features and changes (in comparison to the current Connector/J 5.0 production release):
Important change: Due to a number of issues with the use of server-side prepared statements, Connector/J 5.0.5 has disabled their use by default. The disabling of server-side prepared statements does not affect the operation of the connector in any way.
To enable server-side prepared statements you must add the following configuration property to your connector string:
The default value of this property is
(that is, Connector/J does not use server-side prepared
The disabling of server-side prepared statements does not
affect the operation of the connector. However, if you use the
useTimezone=true connection option and use
client-side prepared statements (instead of server-side
prepared statements) you should also set
Functionality Added or Changed
Added support for JDBC-4.0's
com.mysql.jdbc.java6.rtjar: Full path to your
Added support for JDBC-4.0's client information. The backend
storage of information provided using
Connection.setClientInfo() and retrieved by
Connection.getClientInfo() is pluggable by
any class that implements the
interface and has a no-args constructor.
The implementation used by the driver is configured using the
clientInfoProvider configuration property
(with a default of value of
an implementation which lists the client information as a
comment prepended to every query sent to the server).
This functionality is only available when using Java-6 or newer.
New feature—driver will automatically adjust session
it determines it has been asked for a "streaming" result, and
resets it to the previous value when the result set has been
consumed. (configuration property is named
netTimeoutForStreamingResults value and has a
unit of seconds, the value
0 means the driver
will not try and adjust this value).
Re-worked Ant buildfile to build JDBC-4.0 classes separately, as well as support building under Eclipse (since Eclipse can't mix/match JDKs).
To build, you must set
J2SDK-1.4.2 or Java-5, and set the following properties on your
Ant command line:
com.mysql.jdbc.java6.javac: Full path to
your Java-6 javac executable
com.mysql.jdbc.java6.rtjar: Full path to
Added support for JDBC-4.0's SQLXML interfaces.
com.mysql.jdbc.java6.javac: Full path to your
Java-6 javac executable
Added support for JDBC-4.0 categorized
CommunicationsException into a
JDBC-3.0 version, and a JDBC-4.0 version (which extends
SQLRecoverableException, now that it exists).
This change means that if you were catching
your applications instead of looking at the SQLState class of
08, and are moving to Java 6 (or newer),
you need to change your imports to that exception to be
as the old class will not be instantiated for communications
link-related errors under Java 6.