You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Pool might return a common error ‘retrieve connection from pool timeout after XXXms’ in place of real error.[CONJS-200]
[CONJS-209] 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 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.
constpool=mariadb.createPool({host: 'mydb.com',user: 'myUser',connectionLimit: 5,trace: true});awaitpool.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'*/
Pool error description is improved indicating pool information, like [CONJS-208]:
New option checkNumberRange. When used in conjunction of decimalAsNumber, insertIdAsNumber or bigIntAsNumber, if conversion to number is not exact, connector will throw an error [CONJS-198]. This permits easier compatibility with mysql/mysql2 and 2.x version driver version.
Performance enhancement for multi-rows resultset. Internal benchmarks show improved performance by 10% for a result-set of 1000 rows.[CONJS-210]
Issues Fixed
Wrong error returned "Cannot read properties of undefined… … (reading 'charset')" when error during handshake [CONJS-193]
[CONJS-194] Charset change using parameterized query fails with "Uncaught TypeError: opts.emit is not a function"
[CONJS-195] Error "cannot mix BigInt and other types" when parsing negative bigint
[CONJS-196] connection.close() is now really an alias or connection.release()
[CONJS-199] wrong return type for batch() on typescript
[CONJS-201] typecast geometry parsing error
[CONJS-202] support pre 4.1 error format for 'too many connection' error
[CONJS-203] encoding error for connection attributes when using changeUser with connection attributes
[CONJS-206] possible race condition on connection destroy when no other connection can be created
[CONJS-204] handle password array when using authentication plugin “pam_use_cleartext_plugin”
[CONJS-205] query hanging when using batch with option timeout in place of error thrown