Documentation Home
MySQL Connector/J Release Notes
Related Documentation Download these Release Notes
PDF (US Ltr) - 362.7Kb
PDF (A4) - 361.4Kb


MySQL Connector/J Release Notes  /  Changes in MySQL Connector/J Version 8.x  /  Changes in MySQL Connector/J 8.0.27 (2021-10-19, General Availability)

Changes in MySQL Connector/J 8.0.27 (2021-10-19, General Availability)

Version 8.0.27 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, and 5.6. It supports the Java Database Connectivity (JDBC) 4.2 API, and implements the X DevAPI.

Functionality Added or Changed

  • The ResultSet.getBoolean() method now returns true/false for VARCHAR values of T/F. (Bug #33185116)

  • In line with good XML practices, the getSource() method of MysqlSQLXML no longer supports external DTD, external general entities, and external general parameters in XML sources. (Bug #33094420)

  • To allow compatibility with other implementations of Java, the TLS_ suffix has been removed from the names of cipher suites in the TlsSettings.properties file, and both the TLS_ and SSL_ prefixes are added to the cipher suites names in the ALLOWED_CIPHERS list of the ExportControlled object. (Bug #31117686)

  • Synchronization in the MultiHostConnectionProxy#invoke() method forced connection pools to wait for statements to finish executing before new or free connections could be provided, creating performance issues in some cases. It was because invocation by multiple threads of the equals() method was blocked due to the synchronization. This patch restructures the synchronization to avoid locking on ubiquitous methods like equals() and toString(). (Bug #28725534)

  • Connector/J now supports authentication of MySQL users created using the authentication_oci plugin. There is a new connection property, ociConfigFile, for specifying the location of the required OCI SDK and Client configuration file when it is not found at the default location of ~/.oci/config for Unix-like systems and %HOMEDRIVE%%HOMEPATH%\.oci\config for Windows systems (where ~ and %HOMEPATH% represent the home directory of the user who runs the application). (WL #14707)

  • The Connector/J test suite has been reworked to run against a single MySQL Server compiled with either yaSSL or OpenSSL; the Ant build properties com.mysql.cj.testsuite.url.openssl and com.mysql.cj.testsuite.mysqlx.url.openssl are now ignored. (WL #14660)

Bugs Fixed

  • The method DatabaseMetaData.getImportedKeys() sometimes returned multiple rows for the same foreign key. (Bug #33237255, Bug #104641)

  • When cacheServerConfiguration was enabled and subsequent connections were configured with different character set options, inserting strings into a table resulted in an Incorrect string value error from the server. It was because the cached character set information reused by Connector/J was mutable, and this patch fixed the issue. (Bug #29807572)

  • When ResultSet.getObject(columnIndex, java.util.Date.class) was expected to return null, it caused Connector/J to throw a NullPointerException instead. (Bug #104559, Bug #33232419)

  • After a Calendar was passed as a parameter to a ClientPreparedStatement set method, the SimpleDateFormat object used to render the parameter value actually modified the Calendar, so that using the same Calendar object with several set methods resulted sometimes in the wrong date or time being set. With this fix, a clone of the Calendar is passed to the SimpleDateFormat object when it is created, to avoid changing the original Calendar. Thanks to Björn Michael for his contribution to the fix. (Bug #104170, Bug #33064455)

  • When using cursor-based fetching (useCursorFetch=true), SHOW and EXPLAIN statements failed with an SQLException. (Bug #103878, Bug #32954449)

  • setQueryTimeout() failed to set a timeout for queries when a cursor was used for fetching rows (useCursorFetch=true). Thanks to Hong Wang for contributing the fix. (Bug #103796, Bug #32922715)

  • When the connection property createDatabaseIfNotExist was set to true, a non-existing database could not be created when its name included a hyphen. Thanks to Lukasz Sanek for contributing the fix. (Bug #95564, Bug #29894324)

  • When Statement.executeQuery() was called, Connector/J's check for whether a statement would return results was inadequate, so that sometimes appropriate statements were rejected (for examples, SELECT statements starting with a WITH clause, statements preceded by consecutive comments, and so on) and, at other times, inappropriate statements were executed (for example, DO statements), resulting in various kinds of errors. With this fix, Connector/J performs more accurate checks by looking at the statement keywords and the context, as well as handling properly different corner cases. In this new mechanism, Connector/J takes a permissive approach: statements that might return results are allowed to run. (Bug #71929, Bug #18346501, Bug #103612, Bug #32902019, Bug #23204652)