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
/false
forVARCHAR
values of “T”/“F”. (Bug #33185116)In line with good XML practices, the
getSource()
method ofMysqlSQLXML
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 theTlsSettings.properties
file, and both theTLS_
andSSL_
prefixes are added to the cipher suites names in theALLOWED_CIPHERS
list of theExportControlled
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 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_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
andcom.mysql.cj.testsuite.mysqlx.url.openssl
are now ignored. (WL #14660)
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 anIncorrect 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 aNullPointerException
instead. (Bug #104559, Bug #33232419)After a
Calendar
was passed as a parameter to aClientPreparedStatement
set method, theSimpleDateFormat
object used to render the parameter value actually modified theCalendar
, so that using the sameCalendar
object with several set methods resulted sometimes in the wrong date or time being set. With this fix, a clone of theCalendar
is passed to theSimpleDateFormat
object 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
),SHOW
andEXPLAIN
statements 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
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 aWITH
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)