MySQL 8.4 Release Notes
28.3.32 INFORMATION_SCHEMA SCHEMATA扩展表
SCHEMATA_EXTENSIONS 表扩展了SCHEMATA
表,提供了关于架构选项的信息。
SCHEMATA_EXTENSIONS 表具有以下列:
-
CATALOG_NAME
架构所属的目录名称。这一值始终是
def
。 -
SCHEMA_NAME
架构名称。
-
OPTIONS
架构选项。如果架构是只读的,值包含
READ ONLY=1
。如果架构不是只读的,不会出现READ ONLY
选项。
mysql> ALTER SCHEMA mydb READ ONLY = 1;
mysql> SELECT * FROM INFORMATION_SCHEMA.SCHEMATA_EXTENSIONS
WHERE SCHEMA_NAME = 'mydb';
+--------------+-------------+-------------+
| CATALOG_NAME | SCHEMA_NAME | OPTIONS |
+--------------+-------------+-------------+
| def | mydb | READ ONLY=1 |
+--------------+-------------+-------------+
mysql> ALTER SCHEMA mydb READ ONLY = 0;
mysql> SELECT * FROM INFORMATION_SCHEMA.SCHEMATA_EXTENSIONS
WHERE SCHEMA_NAME = 'mydb';
+--------------+-------------+---------+
| CATALOG_NAME | SCHEMA_NAME | OPTIONS |
+--------------+-------------+---------+
| def | mydb | |
+--------------+-------------+---------+
-
SCHEMATA_EXTENSIONS
是一个非标准的INFORMATION_SCHEMA
表。