Details
-
New Feature
-
Status: In Progress (View Workflow)
-
Critical
-
Resolution: Unresolved
-
Q2/2025 Development
Description
DROP USER deletes specified user, while there is connected session of user deleted. After deletion user is still able to select or modify data in that session. Is that a bug or designed behavior? How can I prevent deleted user from further actions in that session?
Version:11.4.2-MariaDB
Voting initiated on the page https://mariadb.org/tell-us-how-to-drop-user/ gives the result shown in the attachments section.
In according with voting results, the most popular choice on possible behavior of the statement "DROP USER" seems to be "Terminate all existing connections of the user". But note that the set of choices was not mutually exclusive. There were only three mutually exclusive choices "Keep the old behaviour", "DROP USER should terminate all existing connections", "DROP USER should wait". And the third option "should wait" got the most votes. Also, most of people who thought that DROP USER should wait, also thought there should be a FORCE option.
Summing up the survey, server should do the following steps on executing the DROP USER statement:
- Server stops accepting any connections on behalf the user being dropped
- In case the option `FORCE` is NOT specified for DROP USER statement, MariaDB server is waiting until all connections established on behalf the user specified by DROP USER statement be disconnected
- The specified user is dropped
- In case the option FORCE is specified for DROP USER statement, all active connections be forcibly terminated
Attachments
Issue Links
- blocks
-
MDEV-36429 Counters of used resources are not reset when account is recreated
-
- Open
-
- is blocked by
-
MDBF-996 Blog about the idea of disconnecting users after DROP USER
-
- Closed
-
- links to
This is intended behavior. At least it was intended when this code was implemented, more than 20 years ago.
I agree it might not be desirable anymore, so while this behavior is certainly not a bug, changing it is a feature request that we should consider. Thanks!