Documentation Home
MySQL Connector/J 5.1 Release Notes
Related Documentation Download these Release Notes
PDF (US Ltr) - 511.5Kb
PDF (A4) - 510.6Kb
EPUB - 131.7Kb

MySQL Connector/J 5.1 Release Notes  /  Changes in MySQL Connector/J 5.1  /  Changes in MySQL Connector/J 5.1.19 (April 2012)

Changes in MySQL Connector/J 5.1.19 (April 2012)

Fixes bugs found since release 5.1.18.

Functionality Added or Changed

  • For a UTF-8 table using a collation other than the default (utf8_general_ci), the precision of the ResultSetMetaData could be different from the precision specified in the CREATE TABLE statement. The fix corrects the return value from getMaxBytesPerChar().

    This fix changes the behavior of some connection string parameters. useDynamicCharsetInfo no longer has any effect. With the setting cacheServerConfiguration=true, the cached settings also include the results of the SHOW CHARACTER SET statement. (Bug #13495590, Bug #63456)

  • Added support for pluggable authentication. via the com.mysql.jdbc.AuthenticationPlugin interface (which extends the standard extension interface). Examples are in com/mysql/jdbc/authentication and in testsuite.regression.ConnectionRegressionTest. This feature introduces three new connection properties:

    • authenticationPlugins defines a comma-delimited list of classes that implement com.mysql.jdbc.AuthenticationPlugin and are used for authentication unless disabled by the disabledAuthenticationPlugins property.

    • disabledAuthenticationPlugins defines a comma-delimited list of classes implementing com.mysql.jdbc.AuthenticationPlugin or mechanisms, i.e. mysql_native_password. The authentication plugins or mechanisms cannot be used for authentication. Authentication will fail if it requires one of these classes. It is an error to disable the default authentication plugin, either the one named by defaultAuthenticationPlugin property or the hardcoded one if defaultAuthenticationPlugin property is not set.

    • defaultAuthenticationPlugin defines the name of a class implementing com.mysql.jdbc.AuthenticationPlugin, which is used as the default authentication plugin. It is an error to use a class that is not listed in authenticationPlugins and is not one of the built-in plugins. It is an error to set as default a plugin that is disabled by being listed in the disabledAuthenticationPlugins property. It is an error to set this value to null or the empty string; there must be at least one valid default authentication plugin specified for the connection, meeting all the constraints listed above.

Bugs Fixed

  • Performance: An unnecessary call to bind() during socket operations could limit scalability on some platforms. (Bug #13875070, Bug #63811)

  • setMaxRows was not correctly processed during metadata collection for client-side prepared statements, causing the entire result set to be fetched and possibly leading to an out-of-memory error. (Bug #13839395, Bug #64621)

  • A problem with processing escape sequences (in com.mysql.jdbc.EscapeProcessor#escapeSQL) could cause certain statements to fail. For example, a CREATE TABLE statement with a clause such as CONSTRAINT `fk_` was not parsed correctly. (Bug #13612316, Bug #63526)

  • The sjis character set was incorrectly mapped to MS392, which was in turn mapped to cp932, resulting in garbled characters in some cases. In Connector/J 5.1.19, the mappings of character sets and collations were refactored to avoid such multi-step mappings. (Bug #13589875)

  • Underprivileged execution of stored procedures fixed. (Bug #13508993, Bug #61203)

  • A combination of failover connections, proxied or prepared statements, and database connection pool could cause a memory leak due to improper implementation of equals(). (Bug #13441718, Bug #63284)

  • com.mysql.jdbc.ResultSetRow.getTimestampFast() did not account for all valid TIME lengths. (Bug #60582, Bug #16592635)

  • The Connection.changeUser() method did not check for closed connections, leading to NullPointerException errors when this method was called on a closed connection.

  • Reduced the memory overhead for server-side prepared statements. Each prepared statement allocated a 4K buffer for converting streams. Now this allocation is skipped when no set*Stream() methods have been used.