Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
10.3(EOL), 10.4(EOL), 10.5, 10.6, 10.7(EOL), 10.8(EOL), 10.9(EOL)
-
None
Description
If I start the server with --skip-grant-tables, then CREATE EVENT doesn't work:
The error message is extremely misleading: "Cannot proceed, because event scheduler is disabled", even if (as in this case) I've explicitly set EVENT_SCHEDULER=ON.
$ ./mariadbd --version
|
./mariadbd Ver 10.6.10-MariaDB for Linux on x86_64
|
|
$ ./mariadbd --no-defaults --socket=$PATH --skip-grant-tables --skip-networking --datadir=$DATADIR --event-scheduler=ON &
|
...
|
|
$ ./mariadb --no-defaults --socket=$PATH \
|
-e 'select @@global.event_scheduler; create event if not exists mysql.test on schedule at current_timestamp + interval 1 minute do select 1;'
|
+--------------------------+
|
| @@global.event_scheduler |
|
+--------------------------+
|
| ON |
|
+--------------------------+
|
ERROR 1577 (HY000) at line 1: Cannot proceed, because event scheduler is disabled
|
This misleading message is a consequence of the fix for MDEV-19262, which changed the previous error message, even though it was more accurate in this case:
From https://github.com/mariadb/server/commit/6c9a6bad4fe90c8bfcfe6dbf46835a39edc95c6f by wlad:
--- a/sql/share/errmsg-utf8.txt
|
+++ b/sql/share/errmsg-utf8.txt
|
@@ -5974,2 +5974,2 @@
|
ER_EVENTS_DB_ERROR
|
- eng "Cannot proceed because system tables used by Event Scheduler were found damaged at server start"
|
+ eng "Cannot proceed, because event scheduler is disabled" |
Ideas:
- There should be ≥2 error messages that actually distinguish the distinct cases:
- Cannot proceed, because event scheduler is disabled (should only be used when EVENT_SCHEDULER=DISABLED, obviously)
- Cannot proceed, because grant tables are disabled ((this case)
- Anything else?
- Is there any reason the event scheduler can't/shouldn't work with grant tables disabled?
- The event scheduler docs say nothing about not working with --skip-grant-tables.
Attachments
Issue Links
- is caused by
-
MDEV-19262 Server error message is unclear if event is created and event_scheduler = DISABLED
- Closed