1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

MDEV-35617: DROP USER should leave no active session for that user

DROP USER looks for sessions by the do-be-dropped user and if found:
* fails with ER_CANNOT_USER in Oracle mode
* continues with ER_ACTIVE_CONNECTIONS_FOR_USER_TO_DROP warning otherwise

Every user being dropped is marked with flag that disallow establishing
a new connections on behalf this user.
This commit is contained in:
Dmitry Shulga
2025-05-28 00:05:05 +07:00
parent e3d9369774
commit ce7ab467db
51 changed files with 410 additions and 6 deletions

View File

@@ -30,6 +30,8 @@ n
==== Delete new replication user ====
connection master;
DROP USER rpl@127.0.0.1;
Warnings:
Note 4240 Dropped users 'rpl'@'127.0.0.1' have active connections. Use KILL CONNECTION if they should not be used anymore.
FLUSH PRIVILEGES;
connection slave;
==== Restart slave without privileges =====