[MDEV-29827] Misleading error messages about event scheduler when using --skip-grant-tables Created: 2022-10-19 Updated: 2023-07-04 Resolved: 2023-04-27 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Events |
| Affects Version/s: | 10.3, 10.4, 10.5, 10.6, 10.7, 10.8, 10.9 |
| Fix Version/s: | 11.1.1 |
| Type: | Bug | Priority: | Major |
| Reporter: | Daniel Lenski | Assignee: | Daniel Black |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Attachments: |
|
||||||||
| Issue Links: |
|
||||||||
| 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.
This misleading message is a consequence of the fix for From https://github.com/mariadb/server/commit/6c9a6bad4fe90c8bfcfe6dbf46835a39edc95c6f by wlad:
Ideas:
|
| Comments |
| Comment by Daniel Lenski [ 2023-03-10 ] | |||||||||||
|
I am working on a PR for this. | |||||||||||
| Comment by Daniel Lenski [ 2023-03-10 ] | |||||||||||
|
wenhug pointed out that MySQL docs (https://dev.mysql.com/doc/refman/8.0/en/server-options.html#option_mysqld_skip-grant-tables) reference this behavior (event scheduler disabled as a side effect of --skip-grant-tables). We should update MariaDB docs to explain it as well. | |||||||||||
| Comment by Otto Kekäläinen [ 2023-03-18 ] | |||||||||||
|
PR that addresses this was submitted in https://github.com/MariaDB/server/pull/2539 (posting URL here since the Jira git integration is broken and most people reading this Jira will not see the link unless it is posted in a comment). | |||||||||||
| Comment by Daniel Lenski [ 2023-07-03 ] | |||||||||||
|
Although my PR was approved and merged by danblack, back in April, a recently commit by serg largely reverts it, by removing the distinctive error message for this specific case. Sergei, can you explain why you decided to revert this change? | |||||||||||
| Comment by Sergei Golubchik [ 2023-07-03 ] | |||||||||||
|
Did I? There is still an error message when an event scheduler is disabled by --bootstrap or --skip-grants. There is still a message in the error log when a user tries to enable event scheduler with --bootstrap or --skip-grants. I just consolidated error numbers, using the same error code that the server uses in all similar cases. And I've clarified it, so that the server would directly say what option caused the event scheduler to be disabled, instead of listing every possible option and letting user to figure it out what exactly was used. Otherwise the PR works as merged, reporting both an error to the user and a message to the log. | |||||||||||
| Comment by Daniel Lenski [ 2023-07-03 ] | |||||||||||
Yeah, that's true. It is an improvement to be explicit about whether it's -
I see. And the consolidated replacement is The MariaDB server is running with the (- When I wrote this Jira, I was coming from the point of view that it's very non-obvious which functionality is or isn't disabled by - Probably the documentation for - | |||||||||||
| Comment by Daniel Lenski [ 2023-07-03 ] | |||||||||||
Done. https://mariadb.com/kb/en/mariadbd-options/#-skip-grant-tables https://mariadb.com/kb/en/event-limitations/ | |||||||||||
| Comment by Sergei Golubchik [ 2023-07-04 ] | |||||||||||
|
Thanks. Another explanation could be that with --skip-grant-tables no tables are read from mysql.* on startup, so all features that need that are disabled. Applies to privileges, UDFs, events, plugins.
Yes, this is the error message the server uses when, well, some functionality is disabled by a certain command-line option.
|