Version 8.0.12 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, 5.6, and 5.5. It supports the Java Database Connectivity (JDBC) 4.2 API, and implements the X DevAPI.
-
X DevAPI: The following changes have been made to the API:
Removed
ModifyStatement.arrayDelete()
andModifyStatement.merge()
.Renamed
Colletion.find().limit().skip()
toColletion.find().limit().offset()
.-
To simplify the class hierarchy and to have the class names reflect better the classes' functions, the following changes have been made:
The
FindParams
class has been renamed toFilterParams
The
AbstractFindParams
class has been renamed toAbstractFilterParams
The
DocFindParams
class has been renamed toDocFilterParams
The
TableFindParams
class has been renamed toTableFilterParams
Notice that the methods in the original
FilterParams
class have been moved under the newAbstractFilterParams
class.
(Bug #28027459, WL #11858)
X DevAPI: Connector/J now uses synchronous client sockets (
java.net.Socket
) by default to communicate with MySQL servers for X Protocol connections. While asynchronous sockets can still be used by setting the connection propertyxdevapi.useAsyncProtocol=true
, this is not recommended, as it might result in performance degradation for Connector/J. (Bug #27522054)X DevAPI: Connector/J now gives provision for the use of a custom socket factory for X Protocol connections to MySQL Servers using Unix domain sockets. See Section 6.8, "Connecting Using Unix Domain Sockets" for details. (WL #9955)
Connector/J now retrieves the MySQL keyword list from the
INFORMATION_SCHEMA.KEYWORDS
table on the MySQL server when a connection session is established. The list can then be accessed by callingDatabaseMetaData.getSQLKeywords()
. (WL #10544)To simplify the code, the
ReadableProperty
andModifiableProperty
classes have been consolidated into theRuntimeProperty
class. (WL #11876)
X DevAPI: When creating an X DevAPI session using a
Properties
map instead of a connection string, referring to property keys likehost
,port
, andprotocol
in lowercase caused aNullPointerException
. With the fix, both upper and lower cases can now be used. (Bug #27652379)X DevAPI: When creating an X DevAPI session with an SSL connection using a
Properties
map instead of a connection string, aNullPointerException
was returned when no connection password was provided. (Bug #27629553)X DevAPI: When using the
getConnection()
method with themysqlx:
scheme in the connection URL, Connector/J returned an ordinary JDBC connection instead of an X-Protocol connection. (Bug #26089880)If
wait_timeout
was set on the server and the Connector/J had the connection propertyinteractiveClient=false
, or ifinteractive_timeout
was set on the server and Connector/J had the connection propertyinteractiveClient=true
, a connection is invalidated when it has idled for a longer time than the set timeout. When such a timeout occurred, Connector/J threw aCJCommunicationsException
, without indicating it was a timeout. With this fix, the error message returned explains the issue and suggests how to avoid it. (Bug #27977617, Bug #90753)When an application tried to connect to a non-MySQL database through some JDBC driver and Connector/J happened to be on the class path also, Connector/J threw a
SQLNonTransientConnectionException
, which prevented the application from connecting to its database. With this fix, Connector/J returns null whenever a connection string does not start withjdbc:mysql:
ormysqlx:
, so connections to non-MySQL databases are not blocked. (Bug #26724154, Bug #87600)A
wasNull()
call on aResultSet
did not return the proper value unlessAbstractResultsetRow.getNull()
orAbstractResultsetRow.getValueFromByte()
was called before. This caused data loss when Connector/J was used with frameworks like Hibernate, which rely onwasNull()
calls to properly retrieve data. With this fix,wasNull()
returns a correct value as long as some getter method has been called before on theResultSet
. (Bug #25924324, Bug #85941)