[MDEV-19262] Server error message is unclear if event is created and event_scheduler = DISABLED Created: 2019-04-16  Updated: 2022-10-19  Resolved: 2019-04-28

Status: Closed
Project: MariaDB Server
Component/s: Events
Affects Version/s: 10.1.38, 10.2.23, 10.3.14
Fix Version/s: 10.2.24, 10.1.39, 10.3.15, 10.4.5

Type: Bug Priority: Major
Reporter: Manjot Singh (Inactive) Assignee: Vladislav Vaintroub
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Duplicate
is duplicated by MDEV-17718 Setting event_scheduler to DISABLED c... Closed
Problem/Incident
causes MDEV-29827 Misleading error messages about event... Closed
Relates
relates to MDEV-19265 Server should throw warning if event ... Closed

 Description   

The server throws a somewhat nonsensical error message if an event is created when event_scheduler = DISABLED. For example:

MariaDB [(none)]> SHOW GLOBAL VARIABLES LIKE 'event_scheduler';
+-----------------+----------+
| Variable_name   | Value    |
+-----------------+----------+
| event_scheduler | DISABLED |
+-----------------+----------+
1 row in set (0.00 sec)
 
MariaDB [(none)]> CREATE EVENT db1.myevent
    ->     ON SCHEDULE AT CURRENT_TIMESTAMP + INTERVAL 1 HOUR
    ->     DO SELECT NOW();
ERROR 1577 (HY000): Cannot proceed because system tables used by Event Scheduler were found damaged at server start

The same nonsensical error message is thrown if SHOW EVENTS is executed or if information_schema.EVENTS is queried. For example:

MariaDB [db1]> SHOW GLOBAL VARIABLES LIKE 'event_scheduler';
+-----------------+----------+
| Variable_name   | Value    |
+-----------------+----------+
| event_scheduler | DISABLED |
+-----------------+----------+
1 row in set (0.01 sec)
 
MariaDB [db1]> SHOW EVENTS;
ERROR 1577 (HY000): Cannot proceed because system tables used by Event Scheduler were found damaged at server start
MariaDB [db1]> SELECT EVENT_SCHEMA, EVENT_NAME FROM information_schema.EVENTS;
ERROR 1577 (HY000): Cannot proceed because system tables used by Event Scheduler were found damaged at server start

The error message should say something like "Cannot proceed because event scheduler is DISABLED."



 Comments   
Comment by Daniel Lenski [ 2022-10-19 ]

The patch for this issue was https://github.com/mariadb/server/commit/6c9a6bad4fe90c8bfcfe6dbf46835a39edc95c6f by wlad. It basically consisted of changing the error message to Cannot proceed, because event scheduler is disabled.

This results in a highly misleading error message in cases when the event scheduler is not disabled, but other system tables’ state is (apparently) preventing it from working. MDEV-29827

Generated at Thu Feb 08 08:50:17 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.