| 1 |
############################################################################## |
| 2 |
# Testcases 3.2.9.2+3.2.9.3 INFORMATION_SCHEMA.SCHEMATA accessible information |
| 3 |
############################################################################## |
| 4 |
DROP DATABASE IF EXISTS db_datadict; |
| 5 |
CREATE DATABASE db_datadict; |
| 6 |
DROP USER 'testuser1'@'localhost'; |
| 7 |
CREATE USER 'testuser1'@'localhost'; |
| 8 |
GRANT SELECT ON db_datadict.* TO 'testuser1'@'localhost'; |
| 9 |
SELECT * FROM information_schema.schema_privileges |
| 10 |
WHERE table_schema IN ('information_schema','mysql','test') |
| 11 |
ORDER BY grantee, table_schema, privilege_type; |
| 12 |
GRANTEE TABLE_CATALOG TABLE_SCHEMA PRIVILEGE_TYPE IS_GRANTABLE |
| 13 |
''@'%' def test ALTER NO |
| 14 |
''@'%' def test CREATE NO |
| 15 |
''@'%' def test CREATE ROUTINE NO |
| 16 |
''@'%' def test CREATE TEMPORARY TABLES NO |
| 17 |
''@'%' def test CREATE VIEW NO |
| 18 |
''@'%' def test DELETE NO |
| 19 |
''@'%' def test DROP NO |
| 20 |
''@'%' def test EVENT NO |
| 21 |
''@'%' def test INDEX NO |
| 22 |
''@'%' def test INSERT NO |
| 23 |
''@'%' def test LOCK TABLES NO |
| 24 |
''@'%' def test REFERENCES NO |
| 25 |
''@'%' def test SELECT NO |
| 26 |
''@'%' def test SHOW VIEW NO |
| 27 |
''@'%' def test TRIGGER NO |
| 28 |
''@'%' def test UPDATE NO |
| 29 |
SHOW DATABASES LIKE 'information_schema'; |
| 30 |
Database (information_schema) |
| 31 |
information_schema |
| 32 |
SHOW DATABASES LIKE 'mysql'; |
| 33 |
Database (mysql) |
| 34 |
mysql |
| 35 |
SHOW DATABASES LIKE 'test'; |
| 36 |
Database (test) |
| 37 |
test |
| 38 |
# Establish connection testuser1 (user=testuser1) |
| 39 |
SELECT * FROM information_schema.schema_privileges |
| 40 |
WHERE table_schema IN ('information_schema','mysql','test') |
| 41 |
ORDER BY grantee, table_schema, privilege_type; |
| 42 |
GRANTEE TABLE_CATALOG TABLE_SCHEMA PRIVILEGE_TYPE IS_GRANTABLE |
| 43 |
SHOW DATABASES LIKE 'information_schema'; |
| 44 |
Database (information_schema) |
| 45 |
information_schema |
| 46 |
SHOW DATABASES LIKE 'mysql'; |
| 47 |
Database (mysql) |
| 48 |
SHOW DATABASES LIKE 'test'; |
| 49 |
Database (test) |
| 50 |
test |
| 51 |
# Switch to connection default and close connection testuser1 |
| 52 |
DROP USER 'testuser1'@'localhost'; |
| 53 |
DROP DATABASE db_datadict; |