All pages
Powered by GitBook
1 of 1

Loading...

Connector/Node.js 2.2.0 Release Notes

Download | Release Notes | Changelog |

Release date: 4 Feb 2019

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

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

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.

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:

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.

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

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

  • dependencies update

Changelog

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

CONJS-119
CONJS-20
CONJS-110
CONJS-117
CONJS-120
CONJS-118
changelog
//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'
          // }
  });

The most recent release of is:

Connector/Node.js 3.4.5 Download Now

Connector/Node.js Overview
About MariaDB Connector/Node.js
MariaDB Connector/Node.js

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