Bug #9582 incorrect ACL system refresh after its update by GRANT command
Submitted: 2 Apr 2005 16:24 Modified: 7 May 2005 12:44
Reporter: Oleksandr Byelkin
Status: To be fixed later
Category:Server: Privileges Severity:S2 (Serious)
Version:5.0 OS:Any
Assigned to: Ramil Kalimullin Target Version:

[2 Apr 2005 16:24] Oleksandr Byelkin
Description:
following mysql-test script return error despite operation allowance.
But repeat of 'use <database>'  command refresh ACL and command becomes allowed (see
commented line in the script)

How to repeat:
connect (root,localhost,root,,test);
connection root;
--disable_warnings
create database mysqltest;
--enable_warnings

grant create,select on test.* to mysqltest_1@localhost;

connect (user1,localhost,mysqltest_1,,test);
connection user1;

create table t1 (a int);

connection root;
grant create,drop,select on test.* to mysqltest_1@localhost;

connection user1;
# if uncomment following command bug will gone
#use test;
drop table t1;

connection root;
revoke all privileges on test.* from mysqltest_1@localhost;

drop database mysqltest;