mirror of
https://github.com/Fabio286/antares.git
synced 2025-02-02 18:36:52 +01:00
fix(MariaDB): exception with event_scheduler DISABLED with MariaDB 10, fixes #535
This commit is contained in:
parent
ea7865a086
commit
4458177688
@ -290,7 +290,16 @@ export class MySQLClient extends AntaresCore {
|
||||
|
||||
const { rows: functions } = await this.raw('SHOW FUNCTION STATUS');
|
||||
const { rows: procedures } = await this.raw('SHOW PROCEDURE STATUS');
|
||||
const { rows: schedulers } = await this.raw('SELECT *, EVENT_SCHEMA AS `Db`, EVENT_NAME AS `Name` FROM information_schema.`EVENTS`');
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
let schedulers: any[] = [];
|
||||
|
||||
try { // Avoid exception with event_scheduler DISABLED with MariaDB 10
|
||||
const { rows } = await this.raw('SELECT *, EVENT_SCHEMA AS `Db`, EVENT_NAME AS `Name` FROM information_schema.`EVENTS`');
|
||||
schedulers = rows;
|
||||
}
|
||||
catch (err) {
|
||||
console.log(err);
|
||||
}
|
||||
|
||||
const tablesArr: ShowTableResult[] = [];
|
||||
const triggersArr: ShowTriggersResult[] = [];
|
||||
|
Loading…
x
Reference in New Issue
Block a user