MariaDB Connector/Node.js is used to connect applications developed on Node.js to MariaDB and MySQL databases. MariaDB Connector/Node.js is LGPL licensed.
LGPL-2.1 License
Bot releases are hidden (Show)
Published by rusher about 4 years ago
This version is a minor correction release (Stable (GA)).
keepAliveDelay
)supportBigInt
)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.
Published by rusher about 4 years ago
This version is a minor correction release (Stable (GA)).
Published by rusher over 4 years ago
This version is a Stable (GA) release.
restoreNodeTimeout
to 1000 to avoid using blacklisted pool in clusterThis version is a Stable (GA) release.
This version removes compatibility with Node.js 6, needing 10+ version!
Published by rusher over 4 years ago
This version is a Stable (GA) release.
Corrective release of 2.3.0, changing new connection option timeout
to queryTimeout
to avoid any confusion.
Published by rusher over 4 years ago
This version is a Stable (GA) release.
misc:
Published by rusher over 4 years ago
This version is a Stable (GA) release.
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.
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:
//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'
// }
});
* 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.
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:
Published by rusher almost 5 years ago
minor evolutions:
Published by rusher almost 5 years ago
This version is a Stable (GA) release.
Published by rusher almost 5 years ago
This version is a Stable (GA) release.
misc:
Published by rusher about 5 years ago
This version is a Stable (GA) release.
Implemented enhancements:
Fixed bugs:
Published by rusher about 5 years ago
This version is a Stable (GA) release.
Published by rusher over 5 years ago
This version is a Stable (GA) release.
typeCast
restoreNodeTimeout
is not respected when removeNodeErrorCount is setNew Options
option | description | type | default |
---|---|---|---|
collation |
(used in replacement of charset) Permit to defined collation used for connection. This will defined the charset encoding used for exchanges with database and defines the order used when comparing strings. It's mainly used for micro-optimizations | string | UTF8MB4_UNICODE_CI |
permitConnectionWhenExpired |
Permit a user with expired password to connect. Only possible operation in this case will be to change password ('SET PASSWORD=PASSWORD('XXX')') | boolean | false |
The option charset
now corresponds to charset, still permitting collation for compatibility, but then a warning is thrown to console.
Published by rusher over 5 years ago
Published by rusher over 5 years ago
This version is a Stable (GA) release.
New Options
option | description | type | default |
---|---|---|---|
idleTimeout |
Indicate idle time after which a pool connection is released. Value must be lower than @@wait_timeout. In seconds (0 means never release) | integer | 1800 |
minimumIdle |
Permit to set a minimum number of connection in pool. Recommendation is to use fixed pool, so not setting this value. | integer | set to connectionLimit value |
This permits to set a minimum pool size, meaning that after a period of inactivity, pool will decrease inner number of connection to a minimum number of connection (defined with minimumIdle
).
By default, connections not used after idleTimeout
(default to 30 minutes) will be discarded, avoiding reaching server @@wait_timeout.
Pool handle connection creation automatically, with now some delayed after failing to establish a connection, to avoid using CPU unnecessary.
Authentication error in pool have now a better handling.
Published by rusher over 5 years ago
This version is the first Stable (GA) release.
ER_ACCESS_DENIED_ERROR
in place of a basic timeout errorPublished by rusher almost 6 years ago
This version is a RC (Release Candidate).
noControlAfterUse
permitting to disable reset or rollback when giving back a connection pool.connectAttributes
value _server_host
is correctly filled on Performance Schema.timezone
option parsing correction (correctly handle negative values)Published by rusher almost 6 years ago
This version is a Beta release.
Published by rusher about 6 years ago
This version is an Alpha release.
Due to previous malicious use of npm mariadb package before adoption by MariaDB (version 1.0.1 and 1.0.2), the version needs to be bigger to respect npm semver rules and avoid to be tagged by NPM Advisory due to those previous versions.
Published by rusher over 6 years ago
First alpha release.