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.
- The - ResultSet.getBoolean()method now returns- true/- falsefor- VARCHARvalues of “T”/“F”. (Bug #33185116)
- In line with good XML practices, the - getSource()method of- MysqlSQLXMLno 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.propertiesfile, and both the- TLS_and- SSL_prefixes are added to the cipher suites names in the- ALLOWED_CIPHERSlist of the- ExportControlledobject. (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_ociplugin. 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/configfor Unix-like systems and- %HOMEDRIVE%%HOMEPATH%\.oci\configfor 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.openssland- com.mysql.cj.testsuite.mysqlx.url.opensslare now ignored. (WL #14660)
- The method - DatabaseMetaData.getImportedKeys()sometimes returned multiple rows for the same foreign key. (Bug #33237255, Bug #104641)
- When - cacheServerConfigurationwas enabled and subsequent connections were configured with different character set options, inserting strings into a table resulted in an- Incorrect string valueerror 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- NullPointerExceptioninstead. (Bug #104559, Bug #33232419)
- After a - Calendarwas passed as a parameter to a- ClientPreparedStatementset method, the- SimpleDateFormatobject used to render the parameter value actually modified the- Calendar, so that using the same- Calendarobject with several set methods resulted sometimes in the wrong date or time being set. With this fix, a clone of the- Calendaris passed to the- SimpleDateFormatobject 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),- SHOWand- EXPLAINstatements 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 - createDatabaseIfNotExistwas 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,- SELECTstatements starting with a- WITHclause, statements preceded by consecutive comments, and so on) and, at other times, inappropriate statements were executed (for example,- DOstatements), 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)