Connector/Node.js 3.0.1 Release Notes

Connector/Node.js 3.0.1 is a Stable (GA) release of MariaDB Connector/Node.js, released on 2022-07-26

circle-info

Downloadarrow-up-right | Release Notes | Changelog | Connector/Node.js Overview

Release date: 26 Jul 2022

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

circle-check

Notable Changes

Error description improvement

  • Pool might return a common error ‘retrieve connection from pool timeout after XXXms’ in place of real error.[CONJS-200arrow-up-right]

  • Trace option now works when using pool/cluster. It is recommended to activate the trace option in development Since driver is asynchronous, enabling this option to save initial stack when calling any driver methods. This allows having the caller method and line in the error stack, permitting error easy debugging. The problem is this error stack is created using Error.captureStackTrace that is very slow. To give an idea, this slows down by 10% a query like 'select * from mysql.user LIMIT 1', so not recommended in production. [CONJS-209arrow-up-right]

const pool = mariadb.createPool({
      host: 'mydb.com',
      user: 'myUser',
      connectionLimit: 5,
      trace: true
      });
      await pool.query('wrong query');
      /* will throw an error like :
        SqlError: (conn=15868, no: 1064, SQLState: 42000) You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'wrong query' at line 1
          sql: wrong query - parameters:[]
            at Object.module.exports.createError (errors.js:57:10)
            at ...
          From event:
            at Function._PARAM (\integration\test-pool.js:60:18)
            at …
          text: "You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'wrong query' at line 1",
          sql: 'wrong query - parameters:[]',
          fatal: false,
          errno: 1064,
          sqlState: '42000',
          code: 'ER_PARSE_ERROR'
      */

Other improvement

  • node.js 18 supported [CONJS-197arrow-up-right]

  • New option checkNumberRange. When used in conjunction of decimalAsNumber, insertIdAsNumber or bigIntAsNumber, if conversion to number is not exact, connector will throw an error. This permits easier compatibility with mysql/mysql2 and 2.x version driver version. [CONJS-198arrow-up-right]

  • Performance enhancement for multi-rows resultset. Internal benchmarks show improved performance by 10% for a result-set of 1000 rows.[CONJS-210arrow-up-right]

Issues Fixed

Changelog

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

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

spinner

Last updated

Was this helpful?