Releases: mariadb-corporation/mariadb-connector-j
MariaDB connector/j 1.7.2
This version is a general availability (GA) release for java 6+
Bug correction
[CONJ-564] Never ever throw an instance of java.lang.Error
[CONJ-579] Keywords missing from DatabaseMetaData.getSQLKeywords()
[CONJ-567] UrlParser.initialUrl gets overwritten
[CONJ-571] Permit java 9 serialization filtering
[CONJ-574] forcing using toLowerCase/toUpperCase with Locale.ROOT
[CONJ-560] Automatic module name for java 9
[CONJ-578] windows testing using all mariadb server
[CONJ-570] Add tests for 10.3.3 INVISIBLE column
MariaDB connector/j 2.2.1
This version is a general availability (GA) release.
Changelog
[CONJ-501] provide support for authentication plugin ed25519
Bug correction:
[CONJ-529] failover: the driver will pause for 250ms if no servers are available before attempting to reconnect another time
[CONJ-548] don't use COM_STMT_BULK_EXECUTE for INSERT ... SELECT statements
[CONJ-549] correction on connection reset when using MariaDbPoolDataSource with options useServerPrepStmts and useResetConnection enabled
[CONJ-555] failover caused by client timeout must not reuse connection
[CONJ-558] removing extra ".0" to resultset.getString() value for FLOAT/DOUBLE fields
[CONJ-550] fetching state correction when reusing statement without having read all results
[CONJ-553] RejectedExecutionException was thrown when having large amount of concurrent batches
MariaDB connector/j 1.7.1
This version is a general availability (GA) release.
Changelog
[CONJ-501] provide support for authentication plugin ed25519
Bug correction:
[CONJ-529] failover: the driver will pause for 250ms if no servers are available before attempting to reconnect another time
[CONJ-548] don't use COM_STMT_BULK_EXECUTE for INSERT ... SELECT statements
[CONJ-549] correction on connection reset when using MariaDbPoolDataSource with options useServerPrepStmts and useResetConnection enabled
[CONJ-555] failover caused by client timeout must not reuse connection
[CONJ-558] removing extra ".0" to resultset.getString() value for FLOAT/DOUBLE fields
[CONJ-550] fetching state correction when reusing statement without having read all results
[CONJ-553] RejectedExecutionException was thrown when having large amount of concurrent batches
MariaDB connector/j 2.2.0
This version is a general availability (GA) release.
Changelog
[CONJ-522] Pool datasource implementation
MariaDB has now 2 different Datasource implementation :
- MariaDbDataSource : Basic implementation. A new connection each time method getConnection() is called.
- MariaDbPoolDataSource : Connection pooling implementation. MariaDB Driver will keep a pool of connection and borrow Connections when asked for it.
New options
Option | Description |
---|---|
pool | Use pool. This option is useful only if not using a DataSource object, but only connection object. Default: false. since 2.2.0 |
poolName | Pool name that will permit to identify thread. default: auto-generated as MariaDb-pool-<pool-index>. Since 2.2.0 |
maxPoolSize | The maximum number of physical connections that the pool should contain. Default: 8. since 2.2.0 |
minPoolSize | When connection are removed since not used since more than "maxIdleTime", connections are closed and removed from pool. "minPoolSize" indicate the number of physical connections the pool should keep available at all times. Should be less or equal to maxPoolSize. Default: maxPoolSize value. Since 2.2.0 |
poolValidMinDelay | When asking a connection to pool, Pool will validate connection state. "poolValidMinDelay" permit to disable this validation if connection has been borrowed recently avoiding useless verification in case of frequent reuse of connection. 0 meaning validation is done each time connection is asked. Default: 1000 (in milliseconds). Since 2.2.0 |
maxIdleTime | The maximum amount of time in seconds that a connection can stay in pool when not used. This value must always be below @wait_timeout value minus 45s Default: 600 in seconds (=10 minutes), minimum value is 60 seconds. Since 2.2.0 |
staticGlobal | Indicate that the following global variable (@@max_allowed_packet,@@wait_timeout,@@autocommit,@@auto_increment_increment,@@time_zone,@@system_time_zone,@@tx_isolation) values won't changed, permitting to pool to create new connection faster. Default: false. Since 2.2.0 |
useResetConnection | When a connection is closed() (give back to pool), pool reset connection state. Setting this option, session variables change will be reset, and user variables will be destroyed when server permit it (MariaDB >= 10.2.4, MySQL >= 5.7.3), permitting to save memory on server if application make extensive use of variables Default: false. Since 2.2.0 |
Other evolutions:
[CONJ-530] Permit Connection.abort() forcing killing the connection, even if connection is stuck in another thread
[CONJ-531] permit cancelling streaming result-set using Statement.cancel.
[CONJ-495] Improve reading result-set data
[CONJ-510] allow execution of read-only statements on slaves when master is down
Bug correction :
[CONJ-532] correction Statement.getMoreResults() for multi-queries
[CONJ-533] PrepareStatement.setTime() may insert incorrect time according to current timezone, time and option "useLegacyDatetimeCode"
[CONJ-535] correction on numerical getter for big BIT data type fields
[CONJ-541] Fix behavior of ResultSet#relative when crossing result set boundaries
Misc:
[CONJ-469] Improve Blob/Clob implementation (avoiding array copy from result-set row)
[CONJ-539] better message when server close connection
[misc] resultset.findColumn method use column name if alias not found
[misc] default option "connectTimeout" value to 30 seconds (was 0 = no timeout)
[misc] ensure that enablePacketDebug option works when timer tick is big
MariaDB connector/j 1.7.0
This version is a general availability (GA) release.
Changelog
[CONJ-522] Pool datasource implementation
MariaDB has now 2 different Datasource implementation :
- MariaDbDataSource : Basic implementation. A new connection each time method getConnection() is called.
- MariaDbPoolDataSource : Connection pooling implementation. MariaDB Driver will keep a pool of connection and borrow Connections when asked for it.
New options
Option | Description |
---|---|
pool | Use pool. This option is useful only if not using a DataSource object, but only connection object. Default: false. since 2.2.0 |
poolName | Pool name that will permit to identify thread. default: auto-generated as MariaDb-pool-<pool-index>. Since 2.2.0 |
maxPoolSize | The maximum number of physical connections that the pool should contain. Default: 8. since 2.2.0 |
minPoolSize | When connection are removed since not used since more than "maxIdleTime", connections are closed and removed from pool. "minPoolSize" indicate the number of physical connections the pool should keep available at all times. Should be less or equal to maxPoolSize. Default: maxPoolSize value. Since 2.2.0 |
poolValidMinDelay | When asking a connection to pool, Pool will validate connection state. "poolValidMinDelay" permit to disable this validation if connection has been borrowed recently avoiding useless verification in case of frequent reuse of connection. 0 meaning validation is done each time connection is asked. Default: 1000 (in milliseconds). Since 2.2.0 |
maxIdleTime | The maximum amount of time in seconds that a connection can stay in pool when not used. This value must always be below @wait_timeout value minus 45s Default: 600 in seconds (=10 minutes), minimum value is 60 seconds. Since 2.2.0 |
staticGlobal | Indicate that the following global variable (@@max_allowed_packet,@@wait_timeout,@@autocommit,@@auto_increment_increment,@@time_zone,@@system_time_zone,@@tx_isolation) values won't changed, permitting to pool to create new connection faster. Default: false. Since 2.2.0 |
useResetConnection | When a connection is closed() (give back to pool), pool reset connection state. Setting this option, session variables change will be reset, and user variables will be destroyed when server permit it (MariaDB >= 10.2.4, MySQL >= 5.7.3), permitting to save memory on server if application make extensive use of variables Default: false. Since 2.2.0 |
Other evolutions:
[CONJ-530] Permit Connection.abort() forcing killing the connection, even if connection is stuck in another thread
[CONJ-531] permit cancelling streaming result-set using Statement.cancel.
[CONJ-495] Improve reading result-set data
[CONJ-510] allow execution of read-only statements on slaves when master is down
Bug correction :
[CONJ-532] correction Statement.getMoreResults() for multi-queries
[CONJ-533] PrepareStatement.setTime() may insert incorrect time according to current timezone, time and option "useLegacyDatetimeCode"
[CONJ-535] correction on numerical getter for big BIT data type fields
[CONJ-541] Fix behavior of ResultSet#relative when crossing result set boundaries
Misc:
[CONJ-469] Improve Blob/Clob implementation (avoiding array copy from result-set row)
[CONJ-539] better message when server close connection
[misc] resultset.findColumn method use column name if alias not found
[misc] default option "connectTimeout" value to 30 seconds (was 0 = no timeout)
[misc] ensure that enablePacketDebug option works when timer tick is big
MariaDB connector/j 2.1.2
This version is a general availability (GA) release.
Changelog
Bug correction:
- [CONJ-525] Batch result-set return array correction when DELETE statement when bulk option is used
- [CONJ-526] better error message getting metadata information when SQL syntax is wrong
- [CONJ-527] Resultset.last() return wrong value if resultset has only one result
- [CONJ-528] Error executing LOAD DATA LOCAL INFILE when file is larger than max_allowed_packet
MariaDB connector/j 1.6.5
This version is a general availability (GA) release.
Changelog
Bug correction:
- [CONJ-525] Batch result-set return array correction when DELETE statement when bulk option is used
- [CONJ-526] better error message getting metadata information when SQL syntax is wrong
- [CONJ-527] Resultset.last() return wrong value if resultset has only one result
- [CONJ-528] Error executing LOAD DATA LOCAL INFILE when file is larger than max_allowed_packet
MariaDB connector/j 2.1.1
This version is a general availability (GA) release.
Changelog
Bug correction:
- [CONJ-519] Updatable result-set possible NPE when same field is repeated.
- [CONJ-514] ResultSet method wasNull() always return true after a call on a "null-date" field binary protocol handling
- [CONJ-516] Permit using updatable result-set when fetching
- [CONJ-511] Add legacy SSL certificate Hostname verification with CN even when SAN are set
- [CONJ-515] Improve MariaDB driver stability in case JNA errors
misc :
- correct typo in error message when setting wrong parameter
- add trace to HostnameVerifier implementation
- handling connection error when no database is provided
MariaDB connector/j 1.6.4
This version is a general availability (GA) release.
Changelog
Bug correction :
- [CONJ-517] Result-set identification of OK_Packet with 0xFE header when using option useCompression
- [CONJ-514] ResultSet method wasNull() always return true after a call on a "null-date" field binary protocol handling
- [CONJ-515] Improve MariaDB driver stability in case JNA errors
misc :
- correct typo in error message when setting wrong parameter
- handling connection error when no database is provided
- correcting possible race condition when using Statement/PrepareStatement in multi-thread with fetch size set
MariaDB connector/j 2.1.0
This version is a general availability (GA) release.
(2.x version need java 8+)
Notable changes and additions
CONJ-422 : verification of SSL Certificate Name Mismatch
When using ssl, driver check hostname against the server's identity as presented in the server's Certificate (checking alternative names or certificate CN) to prevent man-in-the-middle attack.
A new option "disableSslHostnameVerification" permit to deactivate this validation.
Option | Description |
---|---|
disableSslHostnameVerification | When using ssl, driver check hostname against the server's identity as presented in the server's Certificate (checking alternative names or certificate CN) to prevent man-in-the-middle attack. This option permit to deactivate this validation. Hostname verification is disabled when the option trustServerCertificate is set Default: false. Since 2.1.0 |
CONJ-400 - Galera validation
When configuration with multi-master, Connection.isValid() will not only validate connection, but host state (@@wsrep_cluster_status).
A connection to a node that is not in primary mode will return false (meaning that in pool, connection will be discarded)
CONJ-322 - ResultSet.update* methods implementation
ResultSet.update* methods aren't implemented
statement using ResultSet.CONCUR_UPDATABLE are now able to update record.
exemple:
Statement stmt = con.createStatement(
ResultSet.TYPE_SCROLL_INSENSITIVE,
ResultSet.CONCUR_UPDATABLE);
ResultSet rs = stmt.executeQuery("SELECT age FROM TABLE2");
// rs will be scrollable, will not show changes made by others,
// and will be updatable
while(rs.next()){
//Retrieve by column name
int newAge = rs.getInt(1) + 5;
rs.updateDouble( 1 , newAge );
rs.updateRow();
}
CONJ-389 - faster batch insert
Use dedicated [COM_STMT_BULK_EXECUTE |https://mariadb.com/kb/en/mariadb/com_stmt_bulk_execute/] protocol for batch insert when possible.
(batch without Statement.RETURN_GENERATED_KEYS and streams) to have faster batch.
(significant only if server MariaDB ≥ 10.2.7)
A new option "useBulkStmts" permit to deactivate this functionality.
Option | Description |
---|---|
useBulkStmts | Use dedicated COM_STMT_BULK_EXECUTE protocol for batch insert when possible. (batch without Statement.RETURN_GENERATED_KEYS and streams) to have faster batch. (significant only if server MariaDB ≥ 10.2.7) Default: true. Since 2.1.0 |
other evolution
- [CONJ-508] Connection.getCatalog() optimisation for 10.2+ server using new session_track_schema capabilities
- [CONJ-492] Failover handle automatic reconnection on KILL command
Bug
- [CONJ-502] isolation leak when using multiple pools on same VM on failover
- [CONJ-503] regression on aurora Connection Connection.isReadOnly()
- [CONJ-505] correcting issue that ended throwing "Unknown prepared statement handler given to mysqld_stmt_execute"
- [CONJ-496] return rounded numeric when querying on a decimal field in place of throwing an exception for compatibility