MySQL Connector/J Release Notes  /  Changes in MySQL Connector/J Version 8.x  /  Changes in MySQL Connector/J 8.0.12 (2018-07-27, General Availability)

Changes in MySQL Connector/J 8.0.12 (2018-07-27, General Availability)

Version 8.0.12 is the latest General Availability release of the 8.0 series of MySQL Connector/J. It is suitable for use with MySQL Server versions 8.0, 5.7, 5.6, and 5.5. It supports the Java Database Connectivity (JDBC) 4.2 API, and implements the X DevAPI.

Functionality Added or Changed

  • X DevAPI: The following changes have been made to the API:

    • Removed ModifyStatement.arrayDelete() and ModifyStatement.merge().

    • Renamed Colletion.find().limit().skip() to Colletion.find().limit().offset().

    • To simplify the class hierarchy and to have the class names reflect better the classes' functions, the following changes have been made:

      • The FindParams class has been renamed to FilterParams

      • The AbstractFindParams class has been renamed to AbstractFilterParams

      • The DocFindParams class has been renamed to DocFilterParams

      • The TableFindParams class has been renamed to TableFilterParams

      Notice that the methods in the original FilterParams class have been moved under the new AbstractFilterParams class.

    (Bug #28027459, WL #11858)

  • X DevAPI: Connector/J now uses synchronous client sockets ( by default to communicate with MySQL servers for X Protocol connections. While asynchronous sockets can still be used by setting the connection property xdevapi.useAsyncProtocol=true, this is not recommended, as it might result in performance degradation for Connector/J. (Bug #27522054)

  • X DevAPI: Connector/J now gives provision for the use of a custom socket factory for X Protocol connections to MySQL Servers using Unix domain sockets. See Section 6.8, "Connecting Using Unix Domain Sockets" for details. (WL #9955)

  • Connector/J now retrieves the MySQL keyword list from the INFORMATION_SCHEMA.KEYWORDS table on the MySQL server when a connection session is established. The list can then be accessed by calling DatabaseMetaData.getSQLKeywords(). (WL #10544)

  • To simplify the code, the ReadableProperty and ModifiableProperty classes have been consolidated into the RuntimeProperty class. (WL #11876)

Bugs Fixed

  • X DevAPI: When creating an X DevAPI session using a Properties map instead of a connection string, referring to property keys like host, port, and protocol in lowercase caused a NullPointerException. With the fix, both upper and lower cases can now be used. (Bug #27652379)

  • X DevAPI: When creating an X DevAPI session with an SSL connection using a Properties map instead of a connection string, a NullPointerException was returned when no connection password was provided. (Bug #27629553)

  • X DevAPI: When using the getConnection() method with the mysqlx: scheme in the connection URL, Connector/J returned an ordinary JDBC connection instead of an X-Protocol connection. (Bug #26089880)

  • If wait_timeout was set on the server and the Connector/J had the connection property interactiveClient=false, or if interactive_timeout was set on the server and Connector/J had the connection property interactiveClient=true, a connection is invalidated when it has idled for a longer time than the set timeout. When such a timeout occurred, Connector/J threw a CJCommunicationsException, without indicating it was a timeout. With this fix, the error message returned explains the issue and suggests how to avoid it. (Bug #27977617, Bug #90753)

  • When an application tried to connect to a non-MySQL database through some JDBC driver and Connector/J happened to be on the class path also, Connector/J threw a SQLNonTransientConnectionException, which prevented the application from connecting to its database. With this fix, Connector/J returns null whenever a connection string does not start with jdbc:mysql: or mysqlx:, so connections to non-MySQL databases are not blocked. (Bug #26724154, Bug #87600)

  • A wasNull() call on a ResultSet did not return the proper value unless AbstractResultsetRow.getNull() or AbstractResultsetRow.getValueFromByte() was called before. This caused data loss when Connector/J was used with frameworks like Hibernate, which rely on wasNull() calls to properly retrieve data. With this fix, wasNull() returns a correct value as long as some getter method has been called before on the ResultSet. (Bug #25924324, Bug #85941)