Documentation Home
MySQL Connector/J 5.1 Release Notes
Related Documentation Download these Release Notes
PDF (US Ltr) - 0.6Mb
PDF (A4) - 0.6Mb


MySQL Connector/J 5.1 Release Notes  /  Changes in MySQL Connector/J 5.1  /  Changes in MySQL Connector/J 5.1.35 (2015-03-23)

Changes in MySQL Connector/J 5.1.35 (2015-03-23)

Version 5.1.35 is a maintenance release of the production 5.1 branch. It is suitable for use with MySQL Server versions 5.5, and 5.6.

Functionality Added or Changed

  • The failover support by Connector/J has been refactored to be implemented independently of Connector/J's load-balancing feature. This resolves a number of issues including, for example, (1) a failover being triggered inadvertently, (2) a failover process kept trying to connect to an unavailable server (while there was an available one), and (3) the number of active connections kept growing until Connector/J threw an exception when there were successive failovers within the same connection. (The issues are regressions of Bug #75168.) (Bug #20533907, Bug #75885)

  • A number of new configuration properties have been introduced:

    • enabledSSLCipherSuites: For setting the enabled cipher suites used by JSSE. This configuration property needs to be set when using Java 7 or lower or MySQL Server Community edition version 5.7.6 or higher.

    • readOnlyPropagatesToServer: For controlling the implicit propagation of the read-only transaction access mode to the server, which affects optimization for InnoDB read-only transactions.

    • noTimezoneConversionForDateType and cacheDefaultTimezone: For improving Connector/J's time zone support; see the changelog entry for Bug #18028319/Bug #71084 below for details.

    See the descriptions for these properties in Driver/Datasource Class Names, URL Syntax and Configuration Properties for Connector/J for more details.

  • Connector/J now exposes the PreparedStatment.ParseInfo class for external usage, with no capture of the connection, which allows global, highly-concurrent parse caches to be implemented.

Bugs Fixed

  • Issues with a number of the regression tests in the Connector/J test suite caused them to fail when they were run against MySQL 5.7.6. Those tests have now been fixed. (Bug #20606107)

  • Calling the function Clob.setString() with valid input resulted in a string index out of bounds exception. (Bug #20453712)

  • Calling the function Clob.position() resulted in an exception, because the function passed the wrong index value to the getSubString() function. (Bug #20453712)

  • When in streaming mode, if Connector/J encountered an exception while reading from the stream, a subsequent call to the close() method of the result set would put the thread into a blocking state, from which it would not exit. With this fix, the result set can now be properly closed when, due to an error, there is no more data to be loaded from the stream. (Bug #20272931, Bug #75309)

  • The setTimestamp method failed in a Fabric connection with a null pointer exception. It was because the implementation for the getCalendarInstanceForSessionOrNew method was missing, which has been added by this fix to Connector/J. (Bug #20217686, Bug #75080)

  • When using JDBC 4 features of Connector/J 5.1 with JDK 6 and above, custom implementations of the interface LoadBalanceExceptionChecker failed to work. This was because most of the JDBC 4-specific classes of Connector/J do not implement a JDBC interface directly, but extend other JDBC 3 classes instead, so that the LoadBalancingConnectionProxy.isInterfaceJdbc() check did not work. This fix makes the checking work by extending its search to include also the super classes. (Bug #20204783, Bug #75168)

  • The readRemainingMultiPackets method in the MysqlIO class returned incorrect results when a row was larger than 16MB in size. This fix corrects the wrong type conversion occurred during the calculation, which caused the problem. (Bug #20112694, Bug #74998)

  • Calling getString() after rs.relative() had been called with an argument smaller than -1 resulted in a null pointer exception, because rs.relative() could not handle the argument properly. (Bug #19536760)

  • All occurrences of the StringBuffer class in the Connector/J code has been replaced with the StringBuilder class, in order to improve code performance. (Bug #19465516, Bug #73595)

  • Quoted identifiers in some SQL statements were not properly escaped. (Bug #18925727)

  • A java.sql.date value was stored incorrectly on the server and also returned incorrectly if the client and the server were in different time zones when useLegacyDatetimeCode=false or useTimezone=true. This was due to the time-zone conversion performed by Connector/J on the SQL DATE type. To avoid the issue, a new property noTimezoneConversionForDateType has been created for Connector/J, which is set to true by default, preventing Connector/J to perform the kind of time-zone conversion that caused this bug.

    In addition, another new property cacheDefaultTimezone has been created: when it is set to true (by default), Connector/J caches the time zone first obtained from the client and uses it throughout the time the application is running. When it is set to false, Connector/J becomes aware of time zone changes in the client at runtime that are initiated by calling java.util.TimeZone.setDefault(zone). (Bug #18028319, Bug #71084)

  • A deadlock occurred when concurrent prepared statements making use of timestamp objects were executed in a single connection. To avoid this, the locking mechanism involved has been changed, so that the calendar object for the session is only locked when it is actually being used. (Bug #15936413, Bug #67760)

  • There was an unnecessary call of targetCalendar.setTime() in the newSetTimestampInternal() method of the PreparedStatement.java class, which modified the user-supplied Calendar object and might cause side effects for the client application. The unnecessary call has now been eliminated by the fix put in for Bug #18028319/Bug #71084. (Bug #11761585, Bug #54095)