How to reproduce:
Create the same event doing a simple "SELECT 1"
in default and 'ORACLE' sql_modes:
SET GLOBAL event_scheduler=1;
|
|
SET sql_mode='';
|
CREATE EVENT e1 ON SCHEDULE EVERY 1 MINUTE DO SELECT 1;
|
|
SET sql_mode='ORACLE';
|
CREATE EVENT e2 ON SCHEDULE EVERY 1 MINUTE DO SELECT 1;
|
Creating the events succeeds just fine without problems.
But when it is time to execute the events the one that was created while "ORACLE" mode was in effect fails with a syntax error:
2018-08-03 11:38:11 14 [ERROR] Event Scheduler: error during compilation of test.e2
|
2018-08-03 11:38:11 14 [ERROR] Event Scheduler: [root@localhost][test.e2] 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 'select 1' at line 1
|
2018-08-03 11:38:11 14 [Note] Event Scheduler: [root@localhost].[test.e2] event execution failed.
|
Same way, if you have ORACLE mode by default (that is, if event scheduler itself starts with sql_mode=ORACLE), then the "normal" ev1 will cause the syntax error. It doesn't seem particularly surprising, but I'll leave it to bar to clarify whether it's expected behavior.