Bug #2829 Don't silently fail when GRANT does not work due to out-of-date priv tables
Submitted: 16 Feb 2004 10:50 Modified: 28 Jan 2006 12:58
Reporter: Jim Winstead Email Updates:
Status: Verified Impact on me:
Category:MySQL Server: Security: Privileges Severity:S4 (Feature request)
Version:4.0.12 OS:Linux (Linux)
Assigned to: CPU Architecture:Any

[16 Feb 2004 10:50] Jim Winstead
When doing a "GRANT LOCK TABLES ON db.* TO user@localhost" and the Lock_tables_priv field does 
not exist in the mysql.user table, there is no error message. It just silently fails.

How to repeat:
With an out-of-date mysql.user table, run the query above.

Suggested fix:
Provide feedback when the GRANT fails due to missing fields in the mysql.* tables.

(There may be replication ramifications. Perhaps a server variable will be needed to tell the server to 
allow grants to fail that can be set in the replication slave thread?)
[28 Jan 2006 12:58] Valeriy Kravchuk
Thank you for a reasonable feature request.
[3 Oct 2008 16:04] Konstantin Osipov
Still repeatable in 6.0