Description:
Snip from my protocol slightly edited:
--------------------------------------
...
CREATE DATABASE mydb;
CREATE TABLE mydb.t_ndb (f1 VARCHAR(20))
ENGINE = ndb;
CREATE TABLE mydb.t_myisam (f1 VARCHAR(20))
ENGINE = myisam;
CREATE DATABASE db_datadict;
SELECT table_schema, table_name, engine
FROM information_schema.tables
WHERE TABLE_SCHEMA = 'mydb' ORDER BY table_name;
table_schema table_name engine
mydb t_myisam MyISAM
mydb t_ndb ndbcluster
CREATE USER testuser@localhost;
GRANT SELECT ON db_datadict.* TO testuser@localhost;
# Establish connection testuser (user=testuser)
connect(localhost,testuser,,db_datadict,MYSQL_PORT,MYSQL_SOCK);
SELECT USER();
USER()
testuser@localhost
SELECT table_schema, table_name, engine
FROM information_schema.tables
WHERE TABLE_SCHEMA = 'mydb' ORDER BY table_name;
table_schema table_name engine
mydb t_ndb ndbcluster
<--- Why is this row presented?
The behaviour in case of the MyISAM
table is correct.
SHOW TABLES FROM mydb;
ERROR 42000: Access denied for user
'testuser'@'localhost' to database 'mydb'
SELECT * FROM mydb.t_ndb;
ERROR 42000: SELECT command denied to user
'testuser'@'localhost' for table 't_ndb'
SELECT * FROM mydb.t_myisam;
ERROR 42000: SELECT command denied to user
'testuser'@'localhost' for table 't_myisam'
The MySQL versions 5.1 and 6.0 do not show
this bug.
My environment:
- Intel Core2Duo (64Bit)
- OpenSuSE 10.3 (64 Bit)
- mysql compiled from source (bugteam trees)
How to repeat:
Please run the attached testscript via
mysql-test-run.pl.
Description: Snip from my protocol slightly edited: -------------------------------------- ... CREATE DATABASE mydb; CREATE TABLE mydb.t_ndb (f1 VARCHAR(20)) ENGINE = ndb; CREATE TABLE mydb.t_myisam (f1 VARCHAR(20)) ENGINE = myisam; CREATE DATABASE db_datadict; SELECT table_schema, table_name, engine FROM information_schema.tables WHERE TABLE_SCHEMA = 'mydb' ORDER BY table_name; table_schema table_name engine mydb t_myisam MyISAM mydb t_ndb ndbcluster CREATE USER testuser@localhost; GRANT SELECT ON db_datadict.* TO testuser@localhost; # Establish connection testuser (user=testuser) connect(localhost,testuser,,db_datadict,MYSQL_PORT,MYSQL_SOCK); SELECT USER(); USER() testuser@localhost SELECT table_schema, table_name, engine FROM information_schema.tables WHERE TABLE_SCHEMA = 'mydb' ORDER BY table_name; table_schema table_name engine mydb t_ndb ndbcluster <--- Why is this row presented? The behaviour in case of the MyISAM table is correct. SHOW TABLES FROM mydb; ERROR 42000: Access denied for user 'testuser'@'localhost' to database 'mydb' SELECT * FROM mydb.t_ndb; ERROR 42000: SELECT command denied to user 'testuser'@'localhost' for table 't_ndb' SELECT * FROM mydb.t_myisam; ERROR 42000: SELECT command denied to user 'testuser'@'localhost' for table 't_myisam' The MySQL versions 5.1 and 6.0 do not show this bug. My environment: - Intel Core2Duo (64Bit) - OpenSuSE 10.3 (64 Bit) - mysql compiled from source (bugteam trees) How to repeat: Please run the attached testscript via mysql-test-run.pl.