fix(Armory): fix charset sql request

This commit is contained in:
Axel Cocat 2022-03-16 23:46:32 +01:00
parent b8de1cbc8b
commit 4af6e7e8d0
3 changed files with 5 additions and 5 deletions

View file

@ -207,7 +207,7 @@ export class Armory {
if (!(realm in this.charsetCache)) {
const [rows, fields] = await db.query({
sql: `
SELECT CCSA.character_set_name FROM information_schema.\`TABLES\` T,
SELECT CCSA.character_set_name AS charset FROM information_schema.\`TABLES\` T,
information_schema.\`COLLATION_CHARACTER_SET_APPLICABILITY\` CCSA
WHERE CCSA.collation_name = T.table_collation
AND T.table_schema = "${(await db.getConnection()).config.database}"
@ -215,7 +215,7 @@ export class Armory {
`,
timeout: this.config.dbQueryTimeout,
});
this.charsetCache[realm] = rows[0].character_set_name;
this.charsetCache[realm] = rows[0].charset;
}
return this.charsetCache[realm];
}