This is a new Alpha development release, adding new features and fixing recently discovered bugs.
Functionality added or changed:
Incompatible Change: Pulled vendor-extension methods of
Connection
implementation out into an interface to supportjava.sql.Wrapper
functionality fromConnectionPoolDataSource
. The vendor extensions are javadoc'd in thecom.mysql.jdbc.Connection
interface.For those looking further into the driver implementation, it is not an API that is used for plugability of implementations inside our driver (which is why there are still references to
ConnectionImpl
throughout the code).We've also added server and client
prepareStatement()
methods that cover all of the variants in the JDBC API.Connection.serverPrepare(String)
has been re-named toConnection.serverPrepareStatement()
for consistency withConnection.clientPrepareStatement()
.Row navigation now causes any streams/readers open on the result set to be closed, as in some cases we're reading directly from a shared network packet and it will be overwritten by the "next" row.
Made it possible to retrieve prepared statement parameter bindings (to be used in
StatementInterceptors
, primarily).Externalized the descriptions of connection properties.
The data (and how it is stored) for
ResultSet
rows are now behind an interface which enables us (in some cases) to allocate less memory per row, in that for "streaming" result sets, we re-use the packet used to read rows, since only one row at a time is ever active.Similar to
Connection
, we pulled out vendor extensions toStatement
into an interface namedcom.mysql.Statement
, and moved theStatement
class intocom.mysql.StatementImpl
. The two methods (javadoc'd incom.mysql.Statement
areenableStreamingResults()
, which already existed, anddisableStreamingResults()
which sets the statement instance back to the fetch size and result set type it had beforeenableStreamingResults()
was called.Driver now picks appropriate internal row representation (whole row in one buffer, or individual byte[]s for each column value) depending on heuristics, including whether or not the row has
BLOB
orTEXT
types and the overall row-size. The threshold for row size that will cause the driver to use a buffer rather than individual byte[]s is configured by the configuration propertylargeRowSizeThreshold
, which has a default value of 2KB.Added experimental support for statement "interceptors" through the
com.mysql.jdbc.StatementInterceptor
interface, examples are incom/mysql/jdbc/interceptors
.Implement this interface to be placed "in between" query execution, so that you can influence it. (currently experimental).
StatementInterceptors
are "chainable" when configured by the user, the results returned by the "current" interceptor will be passed on to the next on in the chain, from left-to-right order, as specified by the user in the JDBC configuration propertystatementInterceptors
.See the sources (fully javadoc'd) for
com.mysql.jdbc.StatementInterceptor
for more details until we iron out the API and get it documented in the manual.Setting
rewriteBatchedStatements
totrue
now causesCallableStatements
with batched arguments to be re-written in the formCALL (...); CALL (...); ...
to send the batch in as few client/server round trips as possible.