mariadb/mysql-test/suite/roles/drop_current_user-5176.result
Dmitry Shulga ce7ab467db 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.
2025-07-16 09:14:33 +07:00

13 lines
495 B
Text

create user foo@localhost;
grant create user on *.* to foo@localhost;
connect foo,localhost,foo,,;
drop user foo@localhost;
Warnings:
Note 4227 Dropped users 'foo'@'localhost' have active connections. Use KILL CONNECTION if they should not be used anymore.
select * from information_schema.applicable_roles;
GRANTEE ROLE_NAME IS_GRANTABLE IS_DEFAULT
show grants;
ERROR 42000: There is no such grant defined for user 'foo' on host 'localhost'
select current_user();
current_user()
foo@localhost