Bug #3473 blank host in tables_priv or collumns_priv
Submitted: 14 Apr 2004 14:14 Modified: 28 Apr 2004 13:33
Reporter: Brian Nelson Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:4.0.18 OS:Solaris (Solaris 9 sparc)
Assigned to: Michael Widenius CPU Architecture:Any

[14 Apr 2004 14:14] Brian Nelson
Description:
Trying to use a blank host value for table-specific or collumn-specific privileges does not work as expected. Using a blank value results in non-working privilege. Using a '%' for the host value does work as expected. These should be equivalant values, according to secion 5.4.6 of the documentation.

How to repeat:
Create a user with only 'usage' privilege on a database. Then assign a table or collumn-specific privilege to the user, with a blank host value in tables_priv or collumns_priv. The user will not have the expected privilege.

Change the blank value to a '%' and the privilege will work as expected.

Please note that the user in question has a blank host value in the 'user' table as well (ie for the 'consult the host table' behavior).
[15 Apr 2004 8:23] Brian Nelson
FYI This happens on v 3.23.58 as well
[27 Apr 2004 16:17] Dean Ellis
Verified with 4.0.18 and 4.1.2:

GRANT ALL ON test.t1 TO testuser@'';
SHOW GRANTS FOR testuser@'';
FLUSH PRIVILEGES;
SHOW GRANTS FOR testuser@'';
[28 Apr 2004 13:33] Michael Widenius
Thank you for your bug report. This issue has been committed to our
source repository of that product and will be incorporated into the
next release.

If necessary, you can access the source repository and build the latest
available version, including the bugfix, yourself. More information 
about accessing the source trees is available at
    http://www.mysql.com/doc/en/Installing_source_tree.html

Additional info:

The fix will be in 4.0.19 and 4.1.2