MySQL Connector/J 8.0 Release Notes

10 Changes in MySQL Connector/J 8.0.9 (2018-01-30, Release Candidate)

Version 8.0.9 Release Candidate is the first release candidate of the 8.0 branch of MySQL Connector/J, providing an insight into upcoming features. It is suitable for use with MySQL Server versions 5.5, 5.6, 5.7, and 8.0. It supports the Java Database Connectivity (JDBC) 4.2 API.

Functionality Added or Changed

  • X DevAPI: In the process of refining the definition of the X DevAPI to cover the most relevant usage scenarios, the following API components have been removed from the X DevAPI implementation for Connector/J:

    • Components that support DDLs for views, including the createView(), dropView(), and modifyView() methods.

    • Components that support DDLS for tables, including the createTable(), dropTable(), and modifyTable() methods.

    • Components that support session configurations, including the SessionConfig object, the PersistenceHandler interface, the PasswordHandler interface, and the SessionConfigManager class.

  • X DevAPI: Added the setSavepoint(), rollbackTo(), and releaseSavepoint() methods to the Session interface to support the SAVEPOINT, ROLLBACK TO SAVEPOINT, and RELEASE SAVEPOINT statements. See MySQL Connector/J X DevAPI Reference for more details.

  • X DevAPI: A new patch() function has been added to the ModifyStatement interface. The function accepts an JSON-like object describing document changes and applies them to documents matched by the modify() filter. See MySQL Connector/J X DevAPI Reference for more details.

  • X DevAPI: The createIndex() method for the Collection interface now has a new syntax. See MySQL Connector/J X DevAPI Reference for more details.

  • X DevAPI: Added the following methods for single-document operations in the X DevAPI:

    • replaceOne()

    • addOrReplaceOne()

    • getOne()

    • removeOne()

    See MySQL Connector/J X DevAPI Reference for more details.

  • X DevAPI: Setters and getters methods have been added for the configuration properties with the MysqlDataSource, MysqlXADataSource, and MysqlConnectionPoolDataSource classes.

  • X DevAPI: The connection property enabledTLSProtocols can now be used to select the allowed TLS versions for an X Protocol connection to the server.

  • Connector/J now supports the new caching_sha2_password authentication plugin, which is the default authentication plugin for MySQL 8.0.4 and later (see Caching SHA-2 Pluggable Authentication for details).

    Note

    To authenticate accounts with the caching_sha2_password plugin, either a secure connection to the server using SSL or an unencrypted connection that supports password exchange using an RSA key pair (enabled by setting one or both of the connecting properties allowPublicKeyRetrieval and serverRSAPublicKeyFile) must be used.

    Because earlier versions of Connector/J 8.0 do not support the caching_sha2_password authentication plugin and therefore will not be able to connect to accounts that authenticate with the new plugin (which might include the root account created by default during a new installation of a MySQL 8.0 Server), it is highly recommended that you upgrade now to Connector/J 8.0.9, to help ensure that your applications continue to work smoothly with the latest MySQL 8.0 Server.

  • Connector/J now takes advantage of the MySQL Server 8.0 data dictionary by making the connection property useInformationSchema true by default; this makes Connector/J, by default, access the data dictionary more efficiently by querying tables in the INFORMATION_SCHEME. See INFORMATION_SCHEMA and Data Dictionary Integration for details. Users can still set useInformationSchema to false; but for MySQL 8.0.3 and later, some data dictionary queries might then fail, due to deprecations of older data dictionary features.

  • In the past, query texts were always passed as strings to QueryInterceptor methods, even if the texts were not actually used by them. Now, only suppliers for the texts are passed, and the texts are only extracted by get() calls on the suppliers.

Bugs Fixed

  • The connection property nullNamePatternMatchesAll, when set to false (which was the default value), caused some DatabaseMetaData methods to throw an error when a null search string was used with them. The behavior was not compliant with the JDBC specification, which requires that a search criterion be ignored when a null search string is used for it. The connection property has now been removed from Connector/J 8.0. (Bug #26846249, Bug #87826)

  • Trying to print the query in a PreparedStatement using the toString() method after it has been closed resulted in an exception (No operations allowed after statement closed) being thrown. (Bug #26748909)

  • When working with MySQL Server 8.0, an update or delete statement for a CONCUR_UPDATABLE ResultSet failed when the ResultSet's primary keys included a boolean column and the character set used was not latin1. (Bug #26266731)

  • Connector/J failed to recognize a server greeting error it received during a handshake with the server and parsed the error message as a normal greeting packet, causing an ArrayIndexOutOfBoundsException to be thrown. (Bug #24924097)