MySQL Connectors and other MySQL client tools and applications now synchronize the first digit of their version number with the (latest) MySQL server version they support. This change makes it easy and intuitive to decide which client version to use for which server version.
Connector/J 8.0.7 is the first release to use the new numbering. It is the successor to Connector/J 6.0.6.
-
X DevAPI: There are changes to some methods related to the
Result
interface:getLastDocumentId()
andgetLastDocumentIds()
have been replaced withgetDocumentId()
andgetDocumentIds()
, which are put under a newAddResult
interface that extendsResult
.A new
getAutoIncrementValue()
method is added to the newInsertResult
interface that extendsResult
.
See MySQL Connector/J X DevAPI Reference for more details. (Bug #25207784)
X DevAPI: It is no longer permitted to pass an empty search condition, such as the NULL value or an empty string, to the
Collection.Modify()
andCollection.Remove()
methods. (WL #10765)X DevAPI: Connections using the X Protocol are now secure by default. Also, the
xdevapi.ssl-enable
connection option has been replaced by thexdevapi.ssl-mode
option, which hasDISABLED
,REQUIRED
(default),VERIFY_CA
, andVERIFY_IDENTITY
as its permitted values; see the description for the new option in Configuration Properties for details. (WL #10528)-
X DevAPI: Consolidated the
BaseSession
,NodeSession
, andXSession
interfaces into a singlecom.mysql.cj.api.xdevapi.Session
interface. The following related changes were also made:Renamed
XSessionFactory
toSessionFactory
.Consolidated the
AbstractSession
,NodeSessionImpl
, andXSessionImpl
classes into thecom.mysql.cj.xdevapi.SessionImpl
class.Removed the
Session.bindToDefaultShard()
method and theVirtualNodeSession
interface.The
mysqlx.getNodeSession()
method has been renamed tomysqlx.getSession()
and it now returns aSession
object.The
DatabaseObject.getSession()
method now returns aSession
object (instead of the oldSession
interface).
See MySQL Connector/J X DevAPI Reference for more details. (WL #10530)
-
To avoid using JDBC statements inside core Connector/J classes, the following changes have been implemented:
Created a new
com.mysql.cj.api.Query
interface, which is implemented byStatementImpl
.Replaced the
com.mysql.cj.api.jdbc.interceptors.StatementInterceptor
interface with thecom.mysql.cj.api.interceptors.QueryInterceptor
interface.Added a new method,
PacketPayload preProcess(PacketPayload queryPacket)
, toQueryInterceptor
.Renamed the connection property
statementInterceptors
toqueryInterceptors
. See Configuration Properties for details.
(WL #10305)
Added Japanese collation for the
utf8mb4
character set. (WL #10553)
X DevAPI:
createView()
failed with aNullPointerException
when there were null inputs to it. This fix adds checks for nulls, and makes Connector/J throw the proper errors for them. (Bug #25575156)X DevAPI:
createaTable()
failed with aNullPointerException
when there were null inputs to it. This fix adds checks for nulls, and makes Connector/J throw the proper errors for them. (Bug #25575103)X DevAPI: The connection properties
enabledSSLCipherSuites
,clientCertificateKeyStoreUrl
,clientCertificateKeyStoreType
, andclientCertificateKeyStorePassword
were ignored for connections using the X Protocol. (Bug #25494338)X DevAPI: Calling
getNodeSession()
with an URL string containing SSL parameters caused aCJCommunicationsException
. This has been fixed by creating a byte buffer to handle SSL handshake data. (Notice thatgetNodeSession()
has since been consolidated intogetSession()
.) (Bug #23597281)X DevAPI: Concurrent asynchronous operations resulted in hangs, null pointer exceptions, or other unexpected exceptions. This has been fixed by correcting a number of problems with the
SerializingBufferWriter
and by limiting the number of buffers sent with a gathering write. (Bug #23510958)X DevAPI: When a thread failed to make a connection to the server using the X Protocol, the client application hung. A new connection property,
xdevapi.asyncResponseTimeout
(default value is 300s), now provides a duration beyond which the attempt to connect timeouts, and a proper error is then thrown. See description for the new option in Configuration Properties for details. (Bug #22972057)Connector/J failed a number of regression tests in the testsuite related to geographic information system (GIS) functions because of changes to GIS support by the MySQL server. The fix corrects the tests. (Bug #26239946, Bug #26140577)
Attempts to connect to a server started with collation
utf8mb4_de_pb_0900_ai_ci
resulted in null pointer exceptions. (Bug #26090721)Configuration templates named by the connection property
useConfigs
were not recognized by Connector/J. (Bug #25757019, Bug #85555)A
NullPointerException
was returned whengetDate()
,getTime()
, orgetTimestamp()
was called with a nullCalendar
. This fix makes Connector/J throw anSQLException
in the case. (Bug #25650305)An
ArrayIndexOutOfBoundsException
was thrown when a server-side prepared statement was used and there was aNULL
in aBLOB
,TEXT
, orJSON
type column in theResultSet
. (Bug #25215008, Bug #84084)