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 returnstrue/falseforVARCHARvalues of “T”/“F”. (Bug #33185116)In line with good XML practices, the
getSource()method ofMysqlSQLXMLno 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 theTlsSettings.propertiesfile, and both theTLS_andSSL_prefixes are added to the cipher suites names in theALLOWED_CIPHERSlist of theExportControlledobject. (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 theequals()method was blocked due to the synchronization. This patch restructures the synchronization to avoid locking on ubiquitous methods likeequals()andtoString(). (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.opensslandcom.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 anIncorrect 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 aNullPointerExceptioninstead. (Bug #104559, Bug #33232419)After a
Calendarwas passed as a parameter to aClientPreparedStatementset method, theSimpleDateFormatobject used to render the parameter value actually modified theCalendar, so that using the sameCalendarobject with several set methods resulted sometimes in the wrong date or time being set. With this fix, a clone of theCalendaris passed to theSimpleDateFormatobject when it is created, to avoid changing the originalCalendar. Thanks to Björn Michael for his contribution to the fix. (Bug #104170, Bug #33064455)When using cursor-based fetching (
useCursorFetch=true),SHOWandEXPLAINstatements failed with anSQLException. (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 aWITHclause, 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)