Bug #3278 Permissions Tables not been read correctly at startup
Submitted: 24 Mar 2004 2:26 Modified: 26 Mar 2004 7:41
Reporter: Nick Meanley Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:4.1.1a-alpha-max-debug OS:Windows (windows)
Assigned to: CPU Architecture:Any

[24 Mar 2004 2:26] Nick Meanley
Description:
With the table detailed below I find I have to run the permissions script given twice befor the permissions are as expected.  When I first try to use the database using the user 'UserCheck' from php I get

againAccess denied for user: 'UserCheck'@'localhost' to database 'dbname'

if I run the permissions script it then alows me to access the table but not update it with the following error

UPDATE command denied to user: 'UserCheck'@'localhost' for column 'LastLogin' in table 'users'

if I run the permissions script again it all works.

Both the table permissions table and the column permissions table are as expected after running the permissions script and after a reboot.

How to repeat:
I have a table which actually contains more than this but this will do.

create table Users
(
	UserName	varchar(20) not null,
	LastLogin	datetime,
);

I have a script that configures permissions on tables

REVOKE ALL PRIVILEGES, GRANT from "UserCheck"@"localhost";
GRANT USAGE ON *.* TO "UserCheck"@"localhost";

GRANT USAGE ON `dbname`.* TO "UserCheck"@"localhost";
GRANT SELECT, UPDATE (`LastLogin`) ON `dbname`.`users` TO "UserCheck"@"localhost";
[26 Mar 2004 7:41] MySQL Verification Team
Already fixed in 4.1.2.

See bug #2546