mirror of
				https://github.com/Fabio286/antares.git
				synced 2025-06-05 21:59:22 +02:00 
			
		
		
		
	fix(MariaDB): exception with event_scheduler DISABLED with MariaDB 10, fixes #535
This commit is contained in:
		| @@ -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[] = []; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user