| 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.schemata |
| 10 |
WHERE schema_name IN ('information_schema','mysql','test') |
| 11 |
ORDER BY schema_name; |
| 12 |
CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH DEFAULT_ENCRYPTION |
| 13 |
def information_schema utf8mb3 utf8mb3_general_ci NULL NO |
| 14 |
def mysql utf8mb4 utf8mb4_0900_ai_ci NULL NO |
| 15 |
def test utf8mb4 utf8mb4_0900_ai_ci NULL NO |
| 16 |
SHOW DATABASES LIKE 'information_schema'; |
| 17 |
Database (information_schema) |
| 18 |
information_schema |
| 19 |
SHOW DATABASES LIKE 'mysql'; |
| 20 |
Database (mysql) |
| 21 |
mysql |
| 22 |
SHOW DATABASES LIKE 'test'; |
| 23 |
Database (test) |
| 24 |
test |
| 25 |
# Establish connection testuser1 (user=testuser1) |
| 26 |
SELECT * FROM information_schema.schemata |
| 27 |
WHERE schema_name IN ('information_schema','mysql','test') |
| 28 |
ORDER BY schema_name; |
| 29 |
CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH DEFAULT_ENCRYPTION |
| 30 |
def information_schema utf8mb3 utf8mb3_general_ci NULL NO |
| 31 |
def test utf8mb4 utf8mb4_0900_ai_ci NULL NO |
| 32 |
SHOW DATABASES LIKE 'information_schema'; |
| 33 |
Database (information_schema) |
| 34 |
information_schema |
| 35 |
SHOW DATABASES LIKE 'mysql'; |
| 36 |
Database (mysql) |
| 37 |
SHOW DATABASES LIKE 'test'; |
| 38 |
Database (test) |
| 39 |
test |
| 40 |
# Switch to connection default and close connection testuser1 |
| 41 |
DROP USER 'testuser1'@'localhost'; |
| 42 |
DROP DATABASE db_datadict; |