Bug #60677 "User Has Rights To Database That Does Not Exist" gives false positives

Submitted: 28 Mar 2011 15:43 Modified: 23 Sep 2011 22:36
Reporter: Daniël van Eeden (OCA) Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Enterprise Monitor: Advisors/Rules Severity:S3 (Non-critical)
Version:2.3.1 OS:Any
Assigned to: CPU Architecture:Any

[28 Mar 2011 15:43] Daniël van Eeden
Description:
The "User Has Rights To Database That Does Not Exist" (v1.2) rule gives false positives as a wildcard is used in the database name for a GRANT statement.

How to repeat:
CREATE DATABASE test_t01;
CREATE DATABASE test_t02;
CREATE DATABASE test_t03;
CREATE USER 'testuser'@'localhost' IDENTIFIED BY 'test';
GRANT SELECT ON `test_%`.* TO 'test'@'localhost';

Suggested fix:
Update this rule.
[13 Apr 2011 11:06] Valeriy Kravchuk
Thank you for the bug report. Verified just as described.
[23 Sep 2011 22:36] John Russell
Added to 2.3.6 changelog:

If a GRANT statement used a SQL-style wildcard (% or _) in the
database name, the rule User Has Rights To Database That Does Not
Exist could produce an incorrect alert. For example, this statement
could cause a false positive when evaluating the rule expression:
GRANT SELECT ON `test_%`.* TO testuser@localhost;

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

Page generated in 2.873 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.