Bug #98275 workbench connection with specific user still working even if user is dropped

Submitted: 17 Jan 2020 16:29 Modified: 4 Feb 2020 7:11
Reporter: mohamed atef Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Workbench Severity:S1 (Critical)
Version:8.0.19 OS:Windows
Assigned to: CPU Architecture:Any
Tags: workbench connection with specific user still working even if user is dropped

[17 Jan 2020 16:29] mohamed atef
Description:
when connection is opened using specific user
and the user is already dropped the connection still working 
and when execute select user() will return the dropped user

How to repeat:
open connection1 with root user then create new user
CREATE USER IF NOT EXISTS 'admin'@'%' IDENTIFIED WITH mysql_native_password BY 'admin' PASSWORD EXPIRE NEVER;
grant all privileges on *.* to 'admin'@'%' with grant option;

then open connection2 with the new user

then use the root user in connection1 and execute 
DROP USER IF EXISTS 'admin'@'%' ;

then in the admin user connection2 execute any statement it still work

SELECT USER()
will return admin

Suggested fix:
i don`t konw
[17 Jan 2020 20:18] MySQL Verification Team
https://bugs.mysql.com/bug.php?id=98276 marked as duplicate of this one.
[4 Feb 2020 7:11] MySQL Verification Team
Hello mohamed atef,

Thank you for the bug report.
Imho this is not a bug, please close the connection after dropping the user and try to reconnect to the user connection, it works as expected.

Regards,
Ashwini Patil

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.040 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.