Download Release Notes Changelog Connector/J Overview

Release date: 11 May 2017

MariaDB Connector/J 2.0.1 is a Stable (GA) release.

For an overview of MariaDB Connector/J see the About MariaDB Connector/J page

Notable Changes

Java 8 is the minimum required version
The last release with Java 7 compatibility is MariaDB Connector/J 1.6.0

Change from 2.0.1

The "useServerPrepStmts" option default now to false.

Benchmarks shows that if query has already been used (then prepared), there is some significant performance increase. On the other hand, when the command is not already prepared, the additional exchange for preparing this command will slow down in no small way the overall execution of the command


The applications that repeatedly use the same queries have value to activate this option, but the general case is to use the direct command (text protocol).

  • CONJ-467 - changing database metadata compability to 4.2
  • CONJ-460 - Query that contain multiqueries with fetch and EOF deprecation failed
  • CONJ-464 - Using of "slowQueryThresholdNanos" option with value > Integer.MAX_VALUE results in class cast exception
  • CONJ-452 - correcting inline ssl server certificate parsing
  • CONJ-461 - LAST_INSERT_ID() validation check correction for rewrite statement
  • CONJ-468 - autoIncrementIncrement value loaded during connection, avoiding a query for first statement for rewrite

New Option : CONJ-465 - new option "enablePacketDebug"

enablePacketDebugDriver will save the last 16 MySQL packet exchanges (limited to first 1000 bytes). Hexadecimal value of those packets will be added to stacktrace when an IOException occur.
This option has no impact on performance but driver will then take 16kb more memory.
Default: false. Since 1.6.0, 2.0.1

Change version 2.0.0 release candidate


Implement some protocol changes that permit to save some bytes. (part of


With server with version MariaDB 10.2, MySQL 5.7, ensure driver state :

  • driver does now always get current database, even when database is changed by query.
  • when using rewriteBatchedStatements does return correct autoincrement ids even when session variable @auto_increment_increment has change during session.

improve setQueryTimeout to use SET STATEMENT max_statement_time

Previous implementation of query timeout handling (using Statement.setQueryTimeout) will create an additional thread with a scheduler.
When timeout is reached, a temporary connection will be created to permit executing "KILL QUERY <current connection id>", then closing the temporary connection.
When query ended before timeout, the scheduled task will be canceled.

If server is > 10.1.2, query timeout will be handle server side using "SET MAX_STATEMENT_TIME FOR" command.

Real cancelling Streaming result sets

When closing a Statement that was fetching a result-set (using Statement.setFetchSize) and all rows where not read at the time of closing, a kill query command will be executed on close, to avoid having to parse all remaining results.

Memory optimization : streaming query

Very big command now doesn't use any intermediate buffer. Commands are send directly to socket avoiding using memory, This permit to send very large object (1G) without using any additional memory.

Faster connection

Faster connection : bundle first commands in authentication packet Driver execute different command on connection. Those queries are now send using pipeline (all queries are send, then only all results are reads).

New Options :

usePipelineAuthFast connection creation.Default: true. Since 2.0.0

Performance improvement storing data in resultset

Parsing row result optimisation to avoid creating byte array to the maximum for faster results and less memory use.

Remaining JDBC 4.2 missing implementation :

  • CONJ-414 - support for large update count [CONJ-414]
  • CONJ-409 - PrepareStatement.setObject(...) support for with java 8 temporal temporal object.
  • CONJ-411 - support for Statement maxFieldSize


  • CONJ-443 - NullpointerException when making concurrent procedure calls
  • CONJ-391 - Improve connection using SELECT in place of SHOW to avoid creating a mutex server side.
  • CONJ-402 - tcpKeepAlive option now default to true.
  • CONJ-448 - QueryException: Incorrect arguments to mysqld_stmt_execute on inserting an "emptyString"-Lob with JPA
  • CONJ-451 - Respect type parameter of ResultSet.getObject with type
  • CONJ-455 - MetaData : tinyInt1isBit doesn't work properly in TINYINT(1) column that is marked as UNSIGNED
  • CONJ-450 - NPE on setClientInfo if value is an empty string
  • CONJ-457 - trustStore : Retain leading slash when trust store beings with 'file:/'
  • CONJ-160 - ConnectionPool test using hikariCP
  • CONJ-307 - valid connector java 9 early access
  • CONJ-402 - make tcpKeepAlive option default to true
  • CONJ-411 - Implement Statement maxFieldSize
  • CONJ-449 - Permit CallableStatement streaming

Be notified of new releases automatically by subscribing to the announce 'at' announcement list (this is a low traffic, announce-only list).

MariaDB may already be included in your favorite OS distribution. More information can be found on the Distributions which Include MariaDB page.


Comments loading...