--disable_abort_on_error --disable_warnings DROP DATABASE IF EXISTS testdb; DROP TABLE IF EXISTS t1; DROP VIEW IF EXISTS v1; --enable_warnings CREATE DATABASE testdb; --error 0,1396 DROP USER test_user1@localhost; --error 0,1396 DROP USER test_user1; CREATE USER test_user1@localhost identified by 'PWD'; CREATE USER test_user1 identified by 'PWD'; CREATE TABLE testdb.t1 (f1 BIGINT); CREATE VIEW testdb.v1 AS SELECT * FROM testdb.t1; GRANT SELECT ON testdb.v1 TO test_user1; --replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK connect (con1,localhost,test_user1,PWD,test); #### I am able to SELECT on the VIEW SELECT * FROM testdb.v1; #### I am able to see the column definitions DESCRIBE testdb.v1; #### Here comes the bug. I expect to get the column definitions here. SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_SCHEMA = 'testdb' AND TABLE_NAME= 'v1'; ############## Some variations for comparison ###################### #### 1. Even the grant SHOW VIEW does not help connection default; GRANT SHOW VIEW ON testdb.v1 TO test_user1; connection con1; SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_SCHEMA = 'testdb' AND TABLE_NAME= 'v1'; #### 2. place the view into the database test connection default; CREATE VIEW test.v1 AS SELECT * FROM testdb.t1; GRANT SELECT ON test.v1 TO test_user1; connection con1; #### I am able to SELECT on the VIEW SELECT * FROM test.v1; #### I am able to see the column definitions DESCRIBE test.v1; #### I get the column definitions here, but I guess it is because of the #### special extereme open access rights for the database test. SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_SCHEMA = 'test' AND TABLE_NAME= 'v1';