Bug #29391 DROP USER requires FLUSH PRIVILEGES
Submitted: 27 Jun 2007 15:54 Modified: 28 Jun 2007 8:36
Reporter: Mr Wakazula Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Server: Security: Privileges Severity:S3 (Non-critical)
Version:5.0.41 OS:Windows (2003 Enterprise SP2)
Assigned to: CPU Architecture:Any

[27 Jun 2007 15:54] Mr Wakazula
Description:
If you execute a "DROP USER" followed by a "CREATE USER" in succession, MySql will *occasionally* throw the following non-descript error:

"Operation CREATE USER failed for 'corona_feed'@'%'"

:::CONTEXT:::
MySql Server v5.0.41 (running on Windows 2003 Enterprise SP2)
MySql Query Browser v1.2.12 (running on Windows XP Pro SP2)

How to repeat:
1) Open Query Browser (v1.2.12)
2) Login as the root user
3) Open a new script tab
4) Paste the following into the script tab:
DROP USER `corona_feed`@`%`;
CREATE USER `corona_feed`@`%` IDENTIFIED BY 'LEL49XD34G3GBATS';
5) Execute the script
6) Execute the script
7) Execute the script

Suggested fix:
The problem can be avoided by including a FLUSH PRIVILEGES as follows:
DROP USER `corona_feed`@`%`;
FLUSH PRIVILEGES;
CREATE USER `corona_feed`@`%` IDENTIFIED BY 'LEL49XD34G3GBATS';

The documentation for DROP USER should be updated, or MySql server should automatically perform a FLUSH PRIVILEGES.
[28 Jun 2007 8:36] Sveta Smirnova
Thank you for the report.

We can not repeat described behaviour.