MySQL Connector/J Release Notes  /  Changes in MySQL Connector/J 5.0  /  Changes in MySQL Connector/J 5.0.8 (2007-10-09)

Changes in MySQL Connector/J 5.0.8 (2007-10-09)

Functionality Added or Changed

  • XAConnections now start in auto-commit mode (as per JDBC-4.0 specification clarification).

  • functionsNeverReturnBlobs: Should the driver always treat data from functions returning BLOBs as Strings. Added specifically to work around dubious metadata returned by the server for GROUP BY clauses. Defaults to false.

  • Added two configuration parameters:

    • blobsAreStrings: Should the driver always treat BLOBs as Strings. Added specifically to work around dubious metadata returned by the server for GROUP BY clauses. Defaults to false.

    • functionsNeverReturnBlobs: Should the driver always treat data from functions returning BLOBs as Strings. Added specifically to work around dubious metadata returned by the server for GROUP BY clauses. Defaults to false.

  • blobsAreStrings: Should the driver always treat BLOBs as Strings. Added specifically to work around dubious metadata returned by the server for GROUP BY clauses. Defaults to false.

  • Driver will now fall back to sane defaults for max_allowed_packet and net_buffer_length if the server reports them incorrectly (and will log this situation at WARN level, since it is actually an error condition).

Bugs Fixed

  • Connections established using URLs of the form jdbc:mysql:loadbalance:// weren't doing failover if they tried to connect to a MySQL server that was down. The driver now attempts connections to the next "best" (depending on the load balance strategy in use) server, and continues to attempt connecting to the next "best" server every 250 milliseconds until one is found that is up and running or 5 minutes has passed.

    If the driver gives up, it will throw the last-received SQLException. (Bug #31053)

  • setObject(int, Object, int, int) delegate in PreparedStatementWrapper delegates to wrong method. (Bug #30892)

  • NPE with null column values when padCharsWithSpace is set to true. (Bug #30851)

  • Collation on VARBINARY column types would be misidentified. A fix has been added, but this fix only works for MySQL server versions 5.0.25 and newer, since earlier versions didn't consistently return correct metadata for functions, and thus results from subqueries and functions were indistinguishable from each other, leading to type-related bugs. (Bug #30664)

  • An ArithmeticException or NullPointerException would be raised when the batch had zero members and rewriteBatchedStatements=true when addBatch() was never called, or executeBatch() was called immediately after clearBatch(). (Bug #30550)

  • Closing a load-balanced connection would cause a ClassCastException. (Bug #29852)

  • Connection checker for JBoss didn't use same method parameters using reflection, causing connections to always seem "bad". (Bug #29106)

  • DatabaseMetaData.getTypeInfo() for the types DECIMAL and NUMERIC will return a precision of 254 for server versions older than 5.0.3, 64 for versions 5.0.3 to 5.0.5 and 65 for versions newer than 5.0.5. (Bug #28972)

  • CallableStatement.executeBatch() doesn't work when connection property noAccessToProcedureBodies has been set to true.

    The fix involves changing the behavior of noAccessToProcedureBodies,in that the driver will now report all parameters as IN parameters but permit callers to call registerOutParameter() on them without throwing an exception. (Bug #28689)

  • When a connection is in read-only mode, queries that are wrapped in parentheses were incorrectly identified DML statements. (Bug #28256)

  • UNSIGNED types not reported using DBMD.getTypeInfo(), and capitalization of type names is not consistent between DBMD.getColumns(), RSMD.getColumnTypeName() and DBMD.getTypeInfo().

    This fix also ensures that the precision of UNSIGNED MEDIUMINT and UNSIGNED BIGINT is reported correctly using DBMD.getColumns(). (Bug #27916)

  • DatabaseMetaData.getColumns() doesn't contain SCOPE_* or IS_AUTOINCREMENT columns. (Bug #27915)

  • Schema objects with identifiers other than the connection character aren't retrieved correctly in ResultSetMetadata. (Bug #27867)

  • Cached metadata with PreparedStatement.execute() throws NullPointerException. (Bug #27412)

  • Connection.getServerCharacterEncoding() doesn't work for servers with version >= 4.1. (Bug #27182)

  • The automated SVN revisions in DBMD.getDriverVersion(). The SVN revision of the directory is now inserted into the version information during the build. (Bug #21116)

  • Specifying a "validation query" in your connection pool that starts with "/* ping */" _exactly_ will cause the driver to instead send a ping to the server and return a fake result set (much lighter weight), and when using a ReplicationConnection or a LoadBalancedConnection, will send the ping across all active connections.