Version 8.0.28 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 and 5.7. It supports the Java Database Connectivity (JDBC) 4.2 API, and implements the X DevAPI.
-
The TLSv1 and TLSv1.1 connection protocols were deprecated in Connector/J 8.0.26 and are now removed in this release. The removed values are considered invalid for use with connection options and session settings. Connections can be made using the more-secure TLSv1.2 and TLSv1.3 protocols. Using TLSv1.3 requires that the server be compiled with OpenSSL 1.1.1 or higher and Connector/J be run with a JVM that supports TLSv1.3 (for example, Oracle Java 8u261 and above).
Also, the following connection properties have been renamed:
enabledTLSProtocols
renamed to tlsVersions; the original name remains as an alias.enabledSSLCipherSuites
renamed to tlsCiphersuites; the original name remains as an alias.
(WL #14805)
X DevAPI: A document
_id
check has been added to theCollection.addOrReplaceOne(id, doc)
andCollection.replaceOne(id, doc)
methods: If theid
supplied as an argument for the functions does not match the_id
indoc
(the supplied JSON document), the operation fails. (Bug #32770013)Connector/J now supports multifactor authentication for connections to MySQL Servers. Three new connection properties, password1, password2, and password3, have been added for that purpose. See Connecting Using Multifactor Authentication for details. (WL #14650)
The
README
file in the Connector/J distribution contained broken links in the Additional Resources section. (Bug #33507321)Storing a
java.time.LocalDate
object onto the server as aDATE
value using a batchedPreparedStatement
failed with the complaint thatjava.time.LocalDate
could not be cast tojava.sql.Date
. With this fix, the object is encoded correctly into aDATE
value. (Bug #33468860, Bug #105211)ResultSet
navigation methods likeabsolute()
,relative()
,first()
,last()
, and so on returned aNullPointerException
when they were applied to a non-navigableResultSet
. This was because the methods did not check if theResultSet
really had any rows before trying to navigate it. This patch makes all navigation methods perform the check and throw a properSQLException
when theResultSet
has no rows. (Bug #33461744)Running a
PreparedStatement
in the form ofINSERT INTO ... VALUE ... ON DUPLICATE KEY UPDATE ... VALUES(...)
resulted in aStringIndexOutOfBoundsException
. It was because Connector/J did not recognizeVALUE
as an alias forVALUES
in anINSERT
statement, and mistook theVALUES()
function as aVALUES
clause for the statement. With this fix, statements like this are parsed properly. (Bug #33425867, Bug #84365)When the connection session's character set was SJIS,
BLOB
values could not be handled properly by client-side prepared statements. (Bug #33350185)Some Java frameworks prevent changes of the
autocommit
value on the MySQL Server. When an application tried to changeautocommit
, the value was changed for the connectionSession
on the client side, but it failed to change on the server, so the settings became out of sync. With this fix, Connector/J resetsautocommit
to its original value for theSession
under the situation. Thanks to Tingyu Wei for contributing to the fix. (Bug #33054827, Bug #104067)getWarnings()
always sent aSHOW WARNINGS
query to the server. With this fix, the query is sent only if there really are warnings to be shown, in order to save resources. (Bug #32089018, Bug #101389)After calling
Statement.setQueryTimeout()
, when a query timeout was reached, a connection to the server was established to terminate the query, but the connection remained open afterward. With this fix, the new connection is closed after the query termination. (Bug #31189960, Bug #99260)A new session created for executing
Statement.cancel()
remained open after theStatement
had been cancelled. With this fix, the session is closed after theStatement
cancellation. (Bug #30355150, Bug #96900)Using the
setString()
method on anSQLXML
object resulted in aNullPointerException
. (Bug #25656020, Bug #85223)