github mariadb-corporation/mariadb-connector-j 3.0.0-alpha
MariaDB Connector/Java 3.0.0-alpha

latest releases: 3.5.6, 3.5.5, 3.5.4...
pre-release4 years ago

3.0.0-alpha (3 May 2021)

Full Changelog

This version is a total rewrite of java driver.

  • complete rewrite, code clarification, reduced size (15%), more than 90% coverage tested.
  • Encoding/decoding implementation are now registred by Codec, permitting codec registry implementation
    • example support of Geometry Object
  • Permit authentication plugin restriction by option restrictedAuth
  • performance improvement:
    • Prepare and execution are now using pipelining when using option useServerPrepStmts
    • performance enhancement with MariaDB 10.6 server when using option useServerPrepStmts, skipping metadata (see https://jira.mariadb.org/browse/MDEV-19237)

correction:

  • CONJ-864 includeThreadDumpInDeadlockExceptions always includes the thread dump, even when it is not a deadlock exception
  • CONJ-858 Properties parameter that differ from string not taken in account

Easy logging

If using log4j, just enabled package "org.mariadb.jdbc" log.

level ERROR will log connection error
level WARNING will log query errors
level DEBUG will log queries
level TRACE will log all exchanges with server.

If not using log4j, console will be used.
If really wanting to use JDK logger, System property "mariadb.logging.fallback" set to JDK will indicate to use common logging.

Failover

Failover implementation now permit to redo transaction :
when creating a transaction, all command will be cached, and can be replay in case of failover.

This functionality can be enabled using option transactionReplay.

This is not enabled by default, because this required that application to avoid using non-idempotent commands.

example:

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 TCP_KEEPIDLE, TCP_KEEPCOUNT, TCP_KEEPINTERVAL

Equivalent options are tcpKeepIdle, tcpKeepCount, tcpKeepInterval
Since available only with java 11, setting this option with java < 11 will have no effect.

Don't miss a new mariadb-connector-j release

NewReleases is sending notifications on new releases.