Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
3.0.0
-
None
Description
see https://github.com/mariadb-corporation/mariadb-connector-nodejs/issues/199
(async () => {
|
const { strictEqual } = require("assert"); |
const Maria = require("mariadb"); |
const pool = Maria.createPool({ |
user: "user", |
password: "password", |
host: "host" |
});
|
|
const query = "SET NAMES 'utf8'"; |
|
// Using string directly works as expected |
const result1 = await pool.query(query); |
strictEqual(result1.constructor.name, "OkPacket"); |
console.log("result 1 ok"); |
 |
// Using { sql: string } fails |
const result2 = await pool.query({ sql: query }); |
strictEqual(result2.constructor.name, "OkPacket"); |
console.log("result 2 ok"); |
})();
|
At the same time, with MariaDB server 10.6, changing to utf8 might result in "Error: unknown charset : 'utf8mb3'"