arrow-left

All pages
gitbookPowered by GitBook
1 of 1

Loading...

Connector/Node.js 2.2.0 Release Notes

circle-info

The most recent release of is:

Connector/Node.js 3.5.2 Download Now

Downloadarrow-up-right | Release Notes | Changelog |

Release date: 4 Feb 2019

MariaDB Connector/Node.js 2.2.0 is a Stable (GA) release.

circle-check

For an overview of MariaDB Connector/Node.js see the page

hashtag
New option force Server version detection

Azure is using a proxy that will return a MySQL handshake not reflecting real server.

A new option forceVersionCheck is added to permit issuing a new SELECT @@Version command on connection creation,

to retrieve the correct server version. Connector will then act according to that server version.

hashtag
Query timeout implementation

This option is only permitted for MariaDB server >= 10.1.2, and permits to set a timeout to query operation.

Driver internally use SET STATEMENT max_statement_time=<timeout> FOR <command> permitting to cancel operation when timeout is reached,

Implementation of max_statement_time is engine dependent, so there might be some differences: For example, with Galera engine, a commits will ensure replication to other nodes to be done, possibly then exceeded timeout, to ensure proper server state.

example:

hashtag
Fast-authentication improvement

  • add mysql_native_password to fast-authentication path

  • plugin 'mysql_native_password' is used by default if default server plugin is unknown

  • unexpected packet type during handshake result will throw a good error.

hashtag
Pool leak detection

A new option leakDetection permits to indicate a timeout to log connection borrowed from pool.

When a connection is borrowed from pool and this timeout is reached, a message will be logged to console indicating a possible connection leak.

Another message will tell if the possible logged leak has been released.

A value of 0 (default) meaning Leak detection is disable

Additionally, some error messages have improved:

  • Connection timeout now indicate that this correspond to socket failing to establish

  • differentiate timeout error when closing pool to standard connection retrieving timeout

hashtag
misc:

  • Permit values in SQL object to permits compatibility with mysql/mysql2

  • missing import for Error when asking for connection when pool is closed. Thanks to @WayneMDB

  • correcting typescript import of @types/node to version >8 thanks to @SimonSchick

hashtag
Changelog

For a complete list of changes made in this release, with links to detailed information on each push, see the .

This page is: Copyright © 2025 MariaDB. All rights reserved.

dependencies update
//query that takes more than 20s
connection
  .query({sql: 'information_schema.tables, information_schema.tables as t2', timeout: 100 })
  .then(...)
  .catch(err => {
          // SQLError: (conn=2987, no: 1969, SQLState: 70100) Query execution was interrupted (max_statement_time exceeded)
          // sql: select * from information_schema.columns as c1, information_schema.tables, information_schema.tables as t2 - parameters:[]
          // at Object.module.exports.createError (C:\projets\mariadb-connector-nodejs.git\lib\misc\errors.js:55:10)
          // at PacketNodeEncoded.readError (C:\projets\mariadb-connector-nodejs.git\lib\io\packet.js:510:19)
          // at Query.readResponsePacket (C:\projets\mariadb-connector-nodejs.git\lib\cmd\resultset.js:46:28)
          // at PacketInputStream.receivePacketBasic (C:\projets\mariadb-connector-nodejs.git\lib\io\packet-input-stream.js:104:9)
          // at PacketInputStream.onData (C:\projets\mariadb-connector-nodejs.git\lib\io\packet-input-stream.js:160:20)
          // at Socket.emit (events.js:210:5)
          // at addChunk (_stream_readable.js:309:12)
          // at readableAddChunk (_stream_readable.js:290:11)
          // at Socket.Readable.push (_stream_readable.js:224:10)
          // at TCP.onStreamRead (internal/stream_base_commons.js:182:23) {
          //     fatal: true,
          //         errno: 1969,
          //         sqlState: '70100',
          //         code: 'ER_STATEMENT_TIMEOUT'
          // }
  });
CONJS-119arrow-up-right
CONJS-20arrow-up-right
CONJS-110arrow-up-right
CONJS-117arrow-up-right
CONJS-120arrow-up-right
CONJS-118arrow-up-right
changelog
spinner
MariaDB Connector/Node.js
Connector/Node.js Overview
About MariaDB Connector/Node.js