Details
Description
Deleting a user can break unrelated databases.
The problem, as far as I understand it is that deleting a user, causes all views (and possible other constructs) that he created not to be queryable anymore. Even worse, recreating that user doesn't solve the whole problem, because he has to have enough access rights to actually see the views he created to allow other users to query them.
This seems very arbitrary and unrelated and is highly surprising. I vote to either:
- disable this 'feature' outright (the user who initially created a view / database / table) should not need to stick around (imagine him changing companies, I want to get rid of him!) and the ability of another user to query a construct should not depend on another user being able to see / query it.
- Deprecate it, that is start by adding an option to disable it, and then switch that option to be default on in some future release
Some example error messages that we saw:
SQL Fehler (1449): The user specified as a definer (´$foo´@´%´) does not exist
1356: View '$bar' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
Gliffy Diagrams
Attachments
Activity
- All
- Comments
- Work Log
- History
- Activity
- Transitions
The user, who created the view doesn't need to stick around. But the user whose privileges the view uses — he does.
In this case the view was created with explicit instructions „use the access rights of the user foo@%“. It's not surprising when this user foo@% is deleted the view stops working. There is nothing we can do in this case, MariaDB is doing exactly what you told it to.
Alternatives are: