D.6.1.14. Changes in MySQL Connector/J 5.1.1 (22 June 2007)

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 support java.sql.Wrapper functionality from ConnectionPoolDataSource. The vendor extensions are javadoc'd in the com.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 to Connection.serverPrepareStatement() for consistency with Connection.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 to Statement into an interface named com.mysql.Statement, and moved the Statement class into com.mysql.StatementImpl. The two methods (javadoc'd in com.mysql.Statement are enableStreamingResults(), which already existed, and disableStreamingResults() which sets the statement instance back to the fetch size and result set type it had before enableStreamingResults() 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 or TEXT 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 property largeRowSizeThreshold, which has a default value of 2KB.

  • Added experimental support for statement "interceptors" through the com.mysql.jdbc.StatementInterceptor interface, examples are in com/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 property statementInterceptors.

  • 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 to true now causes CallableStatements with batched arguments to be re-written in the form CALL (...); CALL (...); ... to send the batch in as few client/server round trips as possible.

Copyright © 2010-2024 Platon Technologies, s.r.o.           Index | Man stránky | tLDP | Dokumenty | Utilitky | O projekte
Design by styleshout