Skip to content

Releases: mariadb-corporation/mariadb-connector-nodejs

MariaDB Connector/Node.js 3.0.0 RC

20 Oct 18:22
Compare
Choose a tag to compare
Pre-release

3.0.0-rc (19 Oct 2021)

Full Changelog

Notable change:

  • [CONJS-168] stream backpressure not handled well
  • [CONJS-172] performance improvement for multi-line result-set + update perf result with recent mysql/mysql2 drivers see dedicated part results.
  • [CONJS-168] correct stream backpressure
  • [CONJS-176] Change Pool cluster default option removeNodeErrorCount value to Infinity
  • [CONJS-175] Missing leakDetectionTimeout option in Typescript description
  • [CONJS-178] Update code to recent Ecma version
  • [CONJS-179] better pool option resetAfterUse default value
  • [CONJS-180] compatibility: support mysql2 stream option
  • Corrections:
  • [CONJS-125] permit using batch with returning clause
  • [CONJS-170] Pool.query(undefined) never release connection
  • [CONJS-173] not permitting providing null as a value without an array

MariaDB Connector/Node.js 2.5.5

20 Oct 18:16
Compare
Choose a tag to compare

2.5.5 (19 Oct 2021)

Full Changelog

  • [CONJS-170] Pool.query(undefined) never release connection
  • [CONJS-173] not permitting providing null as a value without an array
  • [CONJS-175] Missing leakDetectionTimeout option in Typescript description

MariaDB Connector/Node.js 3.0.0 Beta

11 Jun 18:03
Compare
Choose a tag to compare
Pre-release

3.0.0-beta (11 Jun 2021)

Full Changelog

Migrating from 2.x or mysql/mysql2 driver have some breaking changes, see dedicated part documentation.

  • [CONJS-153] support Prepared statement with 10.6 new feature metadata skip
  • [CONJS-165] Adding initial message error value on Error object
  • [CONJS-166] Restrict authentication plugin list
  • [CONJS-167] Permit custom logger configuration
  • [CONJS-168] correct stream backpressure

New Connection options

option description type default
insertIdAsNumber Whether the query should return last insert id from INSERT/UPDATE command as BigInt or Number. default return BigInt boolean false
decimalAsNumber Whether the query should return decimal as Number. If enable, this might return approximate values. boolean false
bigIntAsNumber Whether the query should return BigInt data type as Number. If enable, this might return approximate values. boolean false
logger Permit custom logger configuration. For more information, see the logger option documentation. mixed
prepareCacheLength Define prepare LRU cache length. 0 means no cache int 256

new Connection methods

This methods are compatible with mysql2 with some differences:

  • permit streaming parameters
  • execute use by default a prepared cache that hasn't infinite length.
  • implement mariadb 10.6 skipping metadata when possible for better performance
  • Doesn't have a unprepare methods.

MariaDB Connector/Node.js 2.5.4

11 Jun 17:32
Compare
Choose a tag to compare

2.5.4 (08 Jun 2021)

Full Changelog

  • [CONJS-163] Authentication plugin failing doesn't always return error
  • [CONJS-164] Add API that list options default value
  • [CONJS-161] Runtime error on escape() method when escaping array parameter type
  • update iconv-lite dependency to 0.6.3

MariaDB connector/node.js 2.5.3

16 Feb 14:02
Compare
Choose a tag to compare

This version is a correction release (Stable (GA)).

Full Changelog

  • [CONJS-157] Batch error when setting maxAllowedPacket less than an insert parameter value
  • [CONJS-158] use BigInt constructor in place of literal to ensure maximum compatibility
  • [CONJS-160] Wrong definition for typescript PoolConnection.release
  • [CONJS-159] test 10.6 server latest build

MariaDB connector/node.js 2.5.2

04 Dec 17:06
Compare
Choose a tag to compare

This version is a correction release (Stable (GA)).

Full Changelog

  • [CONJS-151] bulk batch error (parameter truncation) #137
  • [CONJS-152] correction when enabling the permitLocalInfile option and some initial commands
  • [CONJS-154] Timezone support correction and clarification
  • [CONJS-155] correction to support for node.js 10.13 to 10.19
  • [CONJS-156] Ensure setting capability PLUGIN_AUTH only if server has it

documentation improvement

MariaDB connector/node.js 2.5.1

23 Oct 13:53
Compare
Choose a tag to compare

This version is a correction release (Stable (GA)).

Full Changelog

  • CONJS-149 correcting possible TypeError [ERR_UNKNOWN_ENCODING], Node v15 compatibility

MariaDB connector/node.js 2.5.0

15 Oct 19:54
Compare
Choose a tag to compare

This version is a minor correction release (Stable (GA)).

Full Changelog

  • CONJS-148 - permit setting socket keep alive (option keepAliveDelay)
  • CONJS-145 - batch rewrite error when packet reach maxAllowedPacket
  • CONJS-146 - Using callback API, batch, avoid return error if connection not established
  • CONJS-144 - TypeScript type ssl wrong definitions
  • CONJS-143 - Array parameter escaping differ from mysql/mysql2
  • CONJS-133 - Support ES2020 BigInt object (option supportBigInt)
  • CONJS-77 - Support MySQL caching_sha256_password authentication
  • CONJS-76 - Support MySQL sha256_password authentication

New Options

option description type default
arrayParenthesis Indicate if array are included in parenthesis. This option permit compatibility with version < 2.5 boolean false
rsaPublicKey Indicate path/content to MySQL server RSA public key. use requires Node.js v11.6+ string
cachingRsaPublicKey Indicate path/content to MySQL server caching RSA public key. use requires Node.js v11.6+ string
allowPublicKeyRetrieval Indicate that if rsaPublicKey or cachingRsaPublicKey public key are not provided, if client can ask server to send public key. boolean false
supportBigInt Whether resultset should return javascript ES2020 BigInt for BIGINT data type. This ensures having expected value even for value > 2^53 (see safe range). boolean false
keepAliveDelay permit to enable socket keep alive, setting delay. 0 means not enabled. Keep in mind that this don't reset server @@wait_timeout (use pool option idleTimeout for that). in ms int

CONJS-143 is a breaking change. Queries that have a IN parameter with array parameters format change.
previous format did not accept parenthesis :

conn.query('SELECT * FROM arrayParam WHERE id = ? AND val IN ?', [1, ['b', 'c']]);

now, format is

conn.query('SELECT * FROM arrayParam WHERE id = ? AND val IN (?)', [1, ['b', 'c']]);

same than mysql/mysql2 drivers.
previous behaviour can be reverted setting option arrayParenthesis to true.

MariaDB connector/node.js 2.4.2

23 Jul 15:21
Compare
Choose a tag to compare

This version is a minor correction release (Stable (GA)).

Full Changelog

  • CONJS-142 - Number parsing loss of precision

MariaDB connector/node.js 2.4.1

01 Jul 23:24
Compare
Choose a tag to compare

This version is a Stable (GA) release.

Full Changelog

  • CONJS-138 - pool.getConnection() might not timeout even with acquireTimeout set
  • CONJS-139 - createConnection(string)` does not support URL-encoded credentials
  • CONJS-140 - Support passing null values in array when doing queries. thanks to @koendeschacht
  • CONJS-141 - set default value of option restoreNodeTimeout to 1000 to avoid using blacklisted pool in cluster