MariaDB Connector/J 3.0.0 Release Notes
Release date: 04 May 2021
MariaDB Connector/J 3.0.0 is a Alpha (Alpha) release.
Do not use alpha releases in production!
NOTE: MariaDB Connector/J 3.0.0 is fully compatible with the latest release of version 2.7. Further maintenance releases will not be provided for version 2.7 after MariaDB Connector/J 3.0 becomes stable (GA).
For an overview of MariaDB Connector/J see the About MariaDB Connector/J page
This version is a complete rewrite of the Java driver. The goal being to have a more performant, easy to read, extendable, small driver.
- Complete rewrite, code simplification / clarification, reduced size (15%), more than 90% coverage tested.
- Performance Improvements:
New Options :
|Indicate SSL demand. Possible values : |
* 'trust': no certificate to provide and no hostname validation, permit encryption without any validation
* 'verify-ca': Encryption, certificates validation, BUT no hostname verification
* 'verify-full': Standard SSL use: Encryption, certificate validation, and hostname
disableSslHostnameVerification still exist, but
sslMode allows for easier configuration.
log4j, just enable the package "org.mariadb.jdbc" log.
ERRORwill log connection errors
WARNINGwill log query errors
DEBUGwill log queries
TRACEwill log all exchanges with server
If not using
log4j, console logging will be used.
If you really want to use the JDK logger, the System property
mariadb.logging.fallback" set to
JDK will indicate to use common
The Failover implementation now permits redoing transactions : when creating a transaction, all commands will be cached, and can be replayed in case of failover.
This functionality can be enabled using the option
This is not enabled by default, because it requires that the application avoid using non-idempotent commands.
START TRANSACTION; select next_val(hibernate_sequence); INSERT INTO myCar(id, name) VALUE (?, ?) //with parameters: 1, 'car1' INSERT INTO myCarDetail(id, carId, name) VALUE (?, ?, ?) //with parameters: 2, 1, 'detail1' INSERT INTO myCarDetail(id, carId, name) VALUE (?, ?, ?) //with parameters: 3, 2, 'detail2' COMMIT;
Allow setup of socket TCP_KEEPIDLE, TCP_KEEPCOUNT, TCP_KEEPINTERVAL
Equivalent options are
Because these are available only with Java 11, setting these options with java < 11 will have no effect.
permit authentication plugin restriction
New Options :
|restrictedAuth||if set, restrict authentication plugin to secure list. Default provided plugins are mysql_native_password,client_ed25519,auth_gssapi_client,caching_sha2_password,dialog and mysql_clear_password|
restrictedAuth to "mysql_native_password,client_ed25519,auth_gssapi_client", only those plugins can be use. If server return ask for an authentication plugin not listed in
restrictedAuth, driver will throw an exception.
The driver is built with a Service Provider Interface (SPI), permitting easy ways to extend the driver.
org.mariadb.jdbc.codec.Codec: Allows encoding/decoding types
org.mariadb.jdbc.plugin.authentication.AuthenticationPlugin: Allows authentication plugin additions. Defaults are "mysql_clear_password", "auth_gssapi_client", "client_ed25519", "mysql_native_password", "dialog" (PAM), and "caching_sha2_password"
org.mariadb.jdbc.plugin.credential.CredentialPlugin: Allows login/password retrieval. Defaults are "AwsIamCredentialPlugin" to permit retrieve a temporary IAM authentication, "EnvCredentialPlugin" to get environment authentication, and "PropertiesCredentialPlugin" to get authentication info from java property
org.mariadb.jdbc.plugin.tls.TlsSocketPlugin: Allows extended TLS implementation
- CONJ-864 -
includeThreadDumpInDeadlockExceptionsalways includes the thread dump, even when it is not a deadlock exception
- CONJ-858 - Properties parameters that differ from string not taken in account
For a complete list of changes made in MariaDB Connector/J 3.0.0, with links to detailed information on each push, see the changelog.