You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by du...@apache.org on 2023/04/10 06:14:34 UTC

[shardingsphere] branch master updated: Add more information_schema tables (#25076)

This is an automated email from the ASF dual-hosted git repository.

duanzhengqiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shardingsphere.git


The following commit(s) were added to refs/heads/master by this push:
     new 5d00662ec17 Add more information_schema tables (#25076)
5d00662ec17 is described below

commit 5d00662ec1736e38f3cc966d8c97198ffae97fe8
Author: ZhangCheng <fl...@outlook.com>
AuthorDate: Mon Apr 10 14:14:27 2023 +0800

    Add more information_schema tables (#25076)
---
 .../schema/builder/SystemSchemaBuilderRule.java    |   5 +-
 .../mysql/information_schema/session_status.yaml   |  35 ++++
 .../information_schema/session_variables.yaml      |  35 ++++
 .../mysql/information_schema/statistics.yaml       | 147 ++++++++++++++++
 .../information_schema/table_constraints.yaml      |  67 +++++++
 .../mysql/information_schema/table_privileges.yaml |  67 +++++++
 .../mysql/information_schema/tablespaces.yaml      |  91 ++++++++++
 .../schema/mysql/information_schema/triggers.yaml  | 195 +++++++++++++++++++++
 .../mysql/information_schema/user_privileges.yaml  |  51 ++++++
 .../builder/SystemSchemaBuilderRuleTest.java       |   2 +-
 .../schema/builder/SystemSchemaBuilderTest.java    |   2 +-
 .../select_mysql_information_schema_schemata.xml   |  26 +++
 ...ect_mysql_information_schema_session_status.xml |  23 +++
 ..._mysql_information_schema_session_variables.xml |  23 +++
 .../select_mysql_information_schema_statistics.xml |  37 ++++
 ..._mysql_information_schema_table_constraints.xml |  27 +++
 ...t_mysql_information_schema_table_privileges.xml |  27 +++
 .../db/select_mysql_information_schema_tables.xml  |  42 +++++
 ...select_mysql_information_schema_tablespaces.xml |  30 ++++
 .../select_mysql_information_schema_triggers.xml   |  43 +++++
 ...ct_mysql_information_schema_user_privileges.xml |  25 +++
 .../dql/dql-integration-select-system-schema.xml   |  40 +++++
 22 files changed, 1036 insertions(+), 4 deletions(-)

diff --git a/infra/common/src/main/java/org/apache/shardingsphere/infra/metadata/database/schema/builder/SystemSchemaBuilderRule.java b/infra/common/src/main/java/org/apache/shardingsphere/infra/metadata/database/schema/builder/SystemSchemaBuilderRule.java
index 29ffa467d70..6bd0171108f 100644
--- a/infra/common/src/main/java/org/apache/shardingsphere/infra/metadata/database/schema/builder/SystemSchemaBuilderRule.java
+++ b/infra/common/src/main/java/org/apache/shardingsphere/infra/metadata/database/schema/builder/SystemSchemaBuilderRule.java
@@ -36,14 +36,15 @@ import java.util.Map;
 public enum SystemSchemaBuilderRule {
     
     MYSQL_INFORMATION_SCHEMA("MySQL", "information_schema", new HashSet<>(Arrays.asList("character_sets", "collation_character_set_applicability", "collations", "column_privileges", "columns",
-            "engines", "events", "files", "global_status", "global_variables", "schemata", "tables", "views",
+            "engines", "events", "files", "global_status", "global_variables",
             "innodb_buffer_page", "innodb_buffer_page_lru", "innodb_buffer_pool_stats", "innodb_cmp", "innodb_cmp_per_index", "innodb_cmp_per_index_reset", "innodb_cmp_reset",
             "innodb_cmpmem", "innodb_cmpmem_reset", "innodb_ft_being_deleted",
             "innodb_ft_config", "innodb_ft_default_stopword", "innodb_ft_deleted", "innodb_ft_index_cache", "innodb_ft_index_table", "innodb_lock_waits", "innodb_locks",
             "innodb_metrics", "innodb_sys_columns", "innodb_sys_datafiles",
             "innodb_sys_fields", "innodb_sys_foreign", "innodb_sys_foreign_cols", "innodb_sys_indexes", "innodb_sys_tables", "innodb_sys_tablespaces",
             "innodb_sys_tablestats", "innodb_sys_virtual", "innodb_temp_table_info", "innodb_trx", "key_column_usage", "optimizer_trace", "parameters", "partitions", "plugins",
-            "processlist", "profiling", "referential_constraints", "routines", "schema_privileges"))),
+            "processlist", "profiling", "referential_constraints", "routines", "schema_privileges", "schemata", "session_status", "session_variables", "statistics",
+            "table_constraints", "table_privileges", "tables", "tablespaces", "triggers", "user_privileges", "views"))),
     
     MYSQL_MYSQL("MySQL", "mysql", new HashSet<>(Collections.singleton("db"))),
     
diff --git a/infra/common/src/main/resources/schema/mysql/information_schema/session_status.yaml b/infra/common/src/main/resources/schema/mysql/information_schema/session_status.yaml
new file mode 100644
index 00000000000..2ab37dc9d72
--- /dev/null
+++ b/infra/common/src/main/resources/schema/mysql/information_schema/session_status.yaml
@@ -0,0 +1,35 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+name: SESSION_STATUS
+columns:
+  variable_name:
+    caseSensitive: false
+    dataType: 12
+    generated: false
+    name: VARIABLE_NAME
+    primaryKey: false
+    unsigned: false
+    visible: true
+  variable_value:
+    caseSensitive: false
+    dataType: 12
+    generated: false
+    name: VARIABLE_VALUE
+    primaryKey: false
+    unsigned: false
+    visible: true
diff --git a/infra/common/src/main/resources/schema/mysql/information_schema/session_variables.yaml b/infra/common/src/main/resources/schema/mysql/information_schema/session_variables.yaml
new file mode 100644
index 00000000000..28518e5c40b
--- /dev/null
+++ b/infra/common/src/main/resources/schema/mysql/information_schema/session_variables.yaml
@@ -0,0 +1,35 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+name: SESSION_VARIABLES
+columns:
+  variable_name:
+    caseSensitive: false
+    dataType: 12
+    generated: false
+    name: VARIABLE_NAME
+    primaryKey: false
+    unsigned: false
+    visible: true
+  variable_value:
+    caseSensitive: false
+    dataType: 12
+    generated: false
+    name: VARIABLE_VALUE
+    primaryKey: false
+    unsigned: false
+    visible: true
diff --git a/infra/common/src/main/resources/schema/mysql/information_schema/statistics.yaml b/infra/common/src/main/resources/schema/mysql/information_schema/statistics.yaml
new file mode 100644
index 00000000000..1bc80ad2987
--- /dev/null
+++ b/infra/common/src/main/resources/schema/mysql/information_schema/statistics.yaml
@@ -0,0 +1,147 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+name: STATISTICS
+columns:
+  table_catalog:
+    caseSensitive: false
+    dataType: 12
+    generated: false
+    name: TABLE_CATALOG
+    primaryKey: false
+    unsigned: false
+    visible: true
+  table_schema:
+    caseSensitive: false
+    dataType: 12
+    generated: false
+    name: TABLE_SCHEMA
+    primaryKey: false
+    unsigned: false
+    visible: true
+  table_name:
+    caseSensitive: false
+    dataType: 12
+    generated: false
+    name: TABLE_NAME
+    primaryKey: false
+    unsigned: false
+    visible: true
+  non_unique:
+    caseSensitive: false
+    dataType: 4
+    generated: false
+    name: NON_UNIQUE
+    primaryKey: false
+    unsigned: false
+    visible: true
+  index_schema:
+    caseSensitive: false
+    dataType: 12
+    generated: false
+    name: INDEX_SCHEMA
+    primaryKey: false
+    unsigned: false
+    visible: true
+  index_name:
+    caseSensitive: false
+    dataType: 12
+    generated: false
+    name: INDEX_NAME
+    primaryKey: false
+    unsigned: false
+    visible: true
+  seq_in_index:
+    caseSensitive: false
+    dataType: 4
+    generated: false
+    name: SEQ_IN_INDEX
+    primaryKey: false
+    unsigned: false
+    visible: true
+  column_name:
+    caseSensitive: false
+    dataType: 12
+    generated: false
+    name: COLUMN_NAME
+    primaryKey: false
+    unsigned: false
+    visible: true
+  collation:
+    caseSensitive: false
+    dataType: 12
+    generated: false
+    name: COLLATION
+    primaryKey: false
+    unsigned: false
+    visible: true
+  cardinality:
+    caseSensitive: false
+    dataType: 4
+    generated: false
+    name: CARDINALITY
+    primaryKey: false
+    unsigned: false
+    visible: true
+  sub_part:
+    caseSensitive: false
+    dataType: 4
+    generated: false
+    name: SUB_PART
+    primaryKey: false
+    unsigned: false
+    visible: true
+  packed:
+    caseSensitive: false
+    dataType: 12
+    generated: false
+    name: PACKED
+    primaryKey: false
+    unsigned: false
+    visible: true
+  nullable:
+    caseSensitive: false
+    dataType: 12
+    generated: false
+    name: NULLABLE
+    primaryKey: false
+    unsigned: false
+    visible: true
+  index_type:
+    caseSensitive: false
+    dataType: 12
+    generated: false
+    name: INDEX_TYPE
+    primaryKey: false
+    unsigned: false
+    visible: true
+  comment:
+    caseSensitive: false
+    dataType: 12
+    generated: false
+    name: COMMENT
+    primaryKey: false
+    unsigned: false
+    visible: true
+  index_comment:
+    caseSensitive: false
+    dataType: 12
+    generated: false
+    name: INDEX_COMMENT
+    primaryKey: false
+    unsigned: false
+    visible: true
diff --git a/infra/common/src/main/resources/schema/mysql/information_schema/table_constraints.yaml b/infra/common/src/main/resources/schema/mysql/information_schema/table_constraints.yaml
new file mode 100644
index 00000000000..66bbf4585d2
--- /dev/null
+++ b/infra/common/src/main/resources/schema/mysql/information_schema/table_constraints.yaml
@@ -0,0 +1,67 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+name: TABLE_CONSTRAINTS
+columns:
+  constraint_catalog:
+    caseSensitive: false
+    dataType: 12
+    generated: false
+    name: CONSTRAINT_CATALOG
+    primaryKey: false
+    unsigned: false
+    visible: true
+  constraint_schema:
+    caseSensitive: false
+    dataType: 12
+    generated: false
+    name: CONSTRAINT_SCHEMA
+    primaryKey: false
+    unsigned: false
+    visible: true
+  constraint_name:
+    caseSensitive: false
+    dataType: 12
+    generated: false
+    name: CONSTRAINT_NAME
+    primaryKey: false
+    unsigned: false
+    visible: true
+  table_schema:
+    caseSensitive: false
+    dataType: 12
+    generated: false
+    name: TABLE_SCHEMA
+    primaryKey: false
+    unsigned: false
+    visible: true
+  table_name:
+    caseSensitive: false
+    dataType: 12
+    generated: false
+    name: TABLE_NAME
+    primaryKey: false
+    unsigned: false
+    visible: true
+  constraint_type:
+    caseSensitive: false
+    dataType: 12
+    generated: false
+    name: CONSTRAINT_TYPE
+    primaryKey: false
+    unsigned: false
+    visible: true
diff --git a/infra/common/src/main/resources/schema/mysql/information_schema/table_privileges.yaml b/infra/common/src/main/resources/schema/mysql/information_schema/table_privileges.yaml
new file mode 100644
index 00000000000..f64da2b3274
--- /dev/null
+++ b/infra/common/src/main/resources/schema/mysql/information_schema/table_privileges.yaml
@@ -0,0 +1,67 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+name: TABLE_PRIVILEGES
+columns:
+  grantee:
+    caseSensitive: false
+    dataType: 12
+    generated: false
+    name: GRANTEE
+    primaryKey: false
+    unsigned: false
+    visible: true
+  table_catalog:
+    caseSensitive: false
+    dataType: 12
+    generated: false
+    name: TABLE_CATALOG
+    primaryKey: false
+    unsigned: false
+    visible: true
+  table_schema:
+    caseSensitive: false
+    dataType: 12
+    generated: false
+    name: TABLE_SCHEMA
+    primaryKey: false
+    unsigned: false
+    visible: true
+  table_name:
+    caseSensitive: false
+    dataType: 12
+    generated: false
+    name: TABLE_NAME
+    primaryKey: false
+    unsigned: false
+    visible: true
+  privilege_type:
+    caseSensitive: false
+    dataType: 12
+    generated: false
+    name: PRIVILEGE_TYPE
+    primaryKey: false
+    unsigned: false
+    visible: true
+  is_grantable:
+    caseSensitive: false
+    dataType: 12
+    generated: false
+    name: IS_GRANTABLE
+    primaryKey: false
+    unsigned: false
+    visible: true
diff --git a/infra/common/src/main/resources/schema/mysql/information_schema/tablespaces.yaml b/infra/common/src/main/resources/schema/mysql/information_schema/tablespaces.yaml
new file mode 100644
index 00000000000..6a4684ad602
--- /dev/null
+++ b/infra/common/src/main/resources/schema/mysql/information_schema/tablespaces.yaml
@@ -0,0 +1,91 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+name: TABLESPACES
+columns:
+  tablespace_name:
+    caseSensitive: false
+    dataType: 12
+    generated: false
+    name: TABLESPACE_NAME
+    primaryKey: false
+    unsigned: false
+    visible: true
+  engine:
+    caseSensitive: false
+    dataType: 12
+    generated: false
+    name: ENGINE
+    primaryKey: false
+    unsigned: false
+    visible: true
+  tablespace_type:
+    caseSensitive: false
+    dataType: 12
+    generated: false
+    name: TABLESPACE_TYPE
+    primaryKey: false
+    unsigned: false
+    visible: true
+  logfile_group_name:
+    caseSensitive: false
+    dataType: 12
+    generated: false
+    name: LOGFILE_GROUP_NAME
+    primaryKey: false
+    unsigned: false
+    visible: true
+  extent_size:
+    caseSensitive: false
+    dataType: 4
+    generated: false
+    name: EXTENT_SIZE
+    primaryKey: false
+    unsigned: true
+    visible: true
+  autoextend_size:
+    caseSensitive: false
+    dataType: 4
+    generated: false
+    name: AUTOEXTEND_SIZE
+    primaryKey: false
+    unsigned: true
+    visible: true
+  maximum_size:
+    caseSensitive: false
+    dataType: 4
+    generated: false
+    name: MAXIMUM_SIZE
+    primaryKey: false
+    unsigned: true
+    visible: true
+  nodegroup_id:
+    caseSensitive: false
+    dataType: 4
+    generated: false
+    name: NODEGROUP_ID
+    primaryKey: false
+    unsigned: true
+    visible: true
+  tablespace_comment:
+    caseSensitive: false
+    dataType: 12
+    generated: false
+    name: TABLESPACE_COMMENT
+    primaryKey: false
+    unsigned: false
+    visible: true
diff --git a/infra/common/src/main/resources/schema/mysql/information_schema/triggers.yaml b/infra/common/src/main/resources/schema/mysql/information_schema/triggers.yaml
new file mode 100644
index 00000000000..ccb34121240
--- /dev/null
+++ b/infra/common/src/main/resources/schema/mysql/information_schema/triggers.yaml
@@ -0,0 +1,195 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+name: TRIGGERS
+columns:
+  trigger_catalog:
+    caseSensitive: false
+    dataType: 12
+    generated: false
+    name: TRIGGER_CATALOG
+    primaryKey: false
+    unsigned: false
+    visible: true
+  trigger_schema:
+    caseSensitive: false
+    dataType: 12
+    generated: false
+    name: TRIGGER_SCHEMA
+    primaryKey: false
+    unsigned: false
+    visible: true
+  trigger_name:
+    caseSensitive: false
+    dataType: 12
+    generated: false
+    name: TRIGGER_NAME
+    primaryKey: false
+    unsigned: false
+    visible: true
+  event_manipulation:
+    caseSensitive: false
+    dataType: 12
+    generated: false
+    name: EVENT_MANIPULATION
+    primaryKey: false
+    unsigned: false
+    visible: true
+  event_object_catalog:
+    caseSensitive: false
+    dataType: 12
+    generated: false
+    name: EVENT_OBJECT_CATALOG
+    primaryKey: false
+    unsigned: false
+    visible: true
+  event_object_schema:
+    caseSensitive: false
+    dataType: 12
+    generated: false
+    name: EVENT_OBJECT_SCHEMA
+    primaryKey: false
+    unsigned: false
+    visible: true
+  event_object_table:
+    caseSensitive: false
+    dataType: 12
+    generated: false
+    name: EVENT_OBJECT_TABLE
+    primaryKey: false
+    unsigned: false
+    visible: true
+  action_order:
+    caseSensitive: false
+    dataType: 4
+    generated: false
+    name: ACTION_ORDER
+    primaryKey: false
+    unsigned: false
+    visible: true
+  action_condition:
+    caseSensitive: false
+    dataType: -1
+    generated: false
+    name: ACTION_CONDITION
+    primaryKey: false
+    unsigned: false
+    visible: true
+  action_statement:
+    caseSensitive: false
+    dataType: -1
+    generated: false
+    name: ACTION_STATEMENT
+    primaryKey: false
+    unsigned: false
+    visible: true
+  action_orientation:
+    caseSensitive: false
+    dataType: 12
+    generated: false
+    name: ACTION_ORIENTATION
+    primaryKey: false
+    unsigned: false
+    visible: true
+  action_timing:
+    caseSensitive: false
+    dataType: 12
+    generated: false
+    name: ACTION_TIMING
+    primaryKey: false
+    unsigned: false
+    visible: true
+  action_reference_old_table:
+    caseSensitive: false
+    dataType: 12
+    generated: false
+    name: ACTION_REFERENCE_OLD_TABLE
+    primaryKey: false
+    unsigned: false
+    visible: true
+  action_reference_new_table:
+    caseSensitive: false
+    dataType: 12
+    generated: false
+    name: ACTION_REFERENCE_NEW_TABLE
+    primaryKey: false
+    unsigned: false
+    visible: true
+  action_reference_old_row:
+    caseSensitive: false
+    dataType: 12
+    generated: false
+    name: ACTION_REFERENCE_OLD_ROW
+    primaryKey: false
+    unsigned: false
+    visible: true
+  action_reference_new_row:
+    caseSensitive: false
+    dataType: 12
+    generated: false
+    name: ACTION_REFERENCE_NEW_ROW
+    primaryKey: false
+    unsigned: false
+    visible: true
+  created:
+    caseSensitive: false
+    dataType: 93
+    generated: false
+    name: CREATED
+    primaryKey: false
+    unsigned: false
+    visible: true
+  sql_mode:
+    caseSensitive: false
+    dataType: 12
+    generated: false
+    name: SQL_MODE
+    primaryKey: false
+    unsigned: false
+    visible: true
+  definer:
+    caseSensitive: false
+    dataType: 12
+    generated: false
+    name: DEFINER
+    primaryKey: false
+    unsigned: false
+    visible: true
+  character_set_client:
+    caseSensitive: false
+    dataType: 12
+    generated: false
+    name: CHARACTER_SET_CLIENT
+    primaryKey: false
+    unsigned: false
+    visible: true
+  collation_connection:
+    caseSensitive: false
+    dataType: 12
+    generated: false
+    name: COLLATION_CONNECTION
+    primaryKey: false
+    unsigned: false
+    visible: true
+  database_collation:
+    caseSensitive: false
+    dataType: 12
+    generated: false
+    name: DATABASE_COLLATION
+    primaryKey: false
+    unsigned: false
+    visible: true
diff --git a/infra/common/src/main/resources/schema/mysql/information_schema/user_privileges.yaml b/infra/common/src/main/resources/schema/mysql/information_schema/user_privileges.yaml
new file mode 100644
index 00000000000..d0791e9192f
--- /dev/null
+++ b/infra/common/src/main/resources/schema/mysql/information_schema/user_privileges.yaml
@@ -0,0 +1,51 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+name: USER_PRIVILEGES
+columns:
+  grantee:
+    caseSensitive: false
+    dataType: 12
+    generated: false
+    name: GRANTEE
+    primaryKey: false
+    unsigned: false
+    visible: true
+  table_catalog:
+    caseSensitive: false
+    dataType: 12
+    generated: false
+    name: TABLE_CATALOG
+    primaryKey: false
+    unsigned: false
+    visible: true
+  privilege_type:
+    caseSensitive: false
+    dataType: 12
+    generated: false
+    name: PRIVILEGE_TYPE
+    primaryKey: false
+    unsigned: false
+    visible: true
+  is_grantable:
+    caseSensitive: false
+    dataType: 12
+    generated: false
+    name: IS_GRANTABLE
+    primaryKey: false
+    unsigned: false
+    visible: true
diff --git a/infra/common/src/test/java/org/apache/shardingsphere/infra/metadata/database/schema/builder/SystemSchemaBuilderRuleTest.java b/infra/common/src/test/java/org/apache/shardingsphere/infra/metadata/database/schema/builder/SystemSchemaBuilderRuleTest.java
index f3fe6e6bc62..60cd3e3d76d 100644
--- a/infra/common/src/test/java/org/apache/shardingsphere/infra/metadata/database/schema/builder/SystemSchemaBuilderRuleTest.java
+++ b/infra/common/src/test/java/org/apache/shardingsphere/infra/metadata/database/schema/builder/SystemSchemaBuilderRuleTest.java
@@ -32,7 +32,7 @@ class SystemSchemaBuilderRuleTest {
     void assertValueOfSchemaPathSuccess() {
         SystemSchemaBuilderRule actual = SystemSchemaBuilderRule.valueOf(new MySQLDatabaseType().getType(), "information_schema");
         assertThat(actual, is(SystemSchemaBuilderRule.MYSQL_INFORMATION_SCHEMA));
-        assertThat(actual.getTables().size(), is(53));
+        assertThat(actual.getTables().size(), is(61));
     }
     
     @Test
diff --git a/infra/common/src/test/java/org/apache/shardingsphere/infra/metadata/database/schema/builder/SystemSchemaBuilderTest.java b/infra/common/src/test/java/org/apache/shardingsphere/infra/metadata/database/schema/builder/SystemSchemaBuilderTest.java
index 6f025da9e26..71cb19dd6a5 100644
--- a/infra/common/src/test/java/org/apache/shardingsphere/infra/metadata/database/schema/builder/SystemSchemaBuilderTest.java
+++ b/infra/common/src/test/java/org/apache/shardingsphere/infra/metadata/database/schema/builder/SystemSchemaBuilderTest.java
@@ -36,7 +36,7 @@ class SystemSchemaBuilderTest {
         Map<String, ShardingSphereSchema> actual = SystemSchemaBuilder.build("information_schema", new MySQLDatabaseType());
         assertThat(actual.size(), is(1));
         assertTrue(actual.containsKey("information_schema"));
-        assertThat(actual.get("information_schema").getTables().size(), is(53));
+        assertThat(actual.get("information_schema").getTables().size(), is(61));
     }
     
     @Test
diff --git a/test/e2e/sql/src/test/resources/cases/dql/dataset/db/select_mysql_information_schema_schemata.xml b/test/e2e/sql/src/test/resources/cases/dql/dataset/db/select_mysql_information_schema_schemata.xml
new file mode 100644
index 00000000000..15585cf0c84
--- /dev/null
+++ b/test/e2e/sql/src/test/resources/cases/dql/dataset/db/select_mysql_information_schema_schemata.xml
@@ -0,0 +1,26 @@
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one or more
+  ~ contributor license agreements.  See the NOTICE file distributed with
+  ~ this work for additional information regarding copyright ownership.
+  ~ The ASF licenses this file to You under the Apache License, Version 2.0
+  ~ (the "License"); you may not use this file except in compliance with
+  ~ the License.  You may obtain a copy of the License at
+  ~
+  ~     http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
+
+<dataset>
+    <metadata>
+        <column name="catalog_name" />
+        <column name="schema_name" />
+        <column name="default_character_set_name" />
+        <column name="default_collation_name" />
+        <column name="sql_path" />
+    </metadata>
+</dataset>
diff --git a/test/e2e/sql/src/test/resources/cases/dql/dataset/db/select_mysql_information_schema_session_status.xml b/test/e2e/sql/src/test/resources/cases/dql/dataset/db/select_mysql_information_schema_session_status.xml
new file mode 100644
index 00000000000..f8eee419e82
--- /dev/null
+++ b/test/e2e/sql/src/test/resources/cases/dql/dataset/db/select_mysql_information_schema_session_status.xml
@@ -0,0 +1,23 @@
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one or more
+  ~ contributor license agreements.  See the NOTICE file distributed with
+  ~ this work for additional information regarding copyright ownership.
+  ~ The ASF licenses this file to You under the Apache License, Version 2.0
+  ~ (the "License"); you may not use this file except in compliance with
+  ~ the License.  You may obtain a copy of the License at
+  ~
+  ~     http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
+
+<dataset>
+    <metadata>
+        <column name="variable_name" />
+        <column name="variable_value" />
+    </metadata>
+</dataset>
diff --git a/test/e2e/sql/src/test/resources/cases/dql/dataset/db/select_mysql_information_schema_session_variables.xml b/test/e2e/sql/src/test/resources/cases/dql/dataset/db/select_mysql_information_schema_session_variables.xml
new file mode 100644
index 00000000000..f8eee419e82
--- /dev/null
+++ b/test/e2e/sql/src/test/resources/cases/dql/dataset/db/select_mysql_information_schema_session_variables.xml
@@ -0,0 +1,23 @@
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one or more
+  ~ contributor license agreements.  See the NOTICE file distributed with
+  ~ this work for additional information regarding copyright ownership.
+  ~ The ASF licenses this file to You under the Apache License, Version 2.0
+  ~ (the "License"); you may not use this file except in compliance with
+  ~ the License.  You may obtain a copy of the License at
+  ~
+  ~     http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
+
+<dataset>
+    <metadata>
+        <column name="variable_name" />
+        <column name="variable_value" />
+    </metadata>
+</dataset>
diff --git a/test/e2e/sql/src/test/resources/cases/dql/dataset/db/select_mysql_information_schema_statistics.xml b/test/e2e/sql/src/test/resources/cases/dql/dataset/db/select_mysql_information_schema_statistics.xml
new file mode 100644
index 00000000000..cea75be3243
--- /dev/null
+++ b/test/e2e/sql/src/test/resources/cases/dql/dataset/db/select_mysql_information_schema_statistics.xml
@@ -0,0 +1,37 @@
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one or more
+  ~ contributor license agreements.  See the NOTICE file distributed with
+  ~ this work for additional information regarding copyright ownership.
+  ~ The ASF licenses this file to You under the Apache License, Version 2.0
+  ~ (the "License"); you may not use this file except in compliance with
+  ~ the License.  You may obtain a copy of the License at
+  ~
+  ~     http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
+
+<dataset>
+    <metadata>
+        <column name="table_catalog" />
+        <column name="table_schema" />
+        <column name="table_name" />
+        <column name="non_unique" />
+        <column name="index_schema" />
+        <column name="index_name" />
+        <column name="seq_in_index" />
+        <column name="column_name" />
+        <column name="collation" />
+        <column name="cardinality" />
+        <column name="sub_part" />
+        <column name="packed" />
+        <column name="nullable" />
+        <column name="index_type" />
+        <column name="comment" />
+        <column name="index_comment" />
+    </metadata>
+</dataset>
diff --git a/test/e2e/sql/src/test/resources/cases/dql/dataset/db/select_mysql_information_schema_table_constraints.xml b/test/e2e/sql/src/test/resources/cases/dql/dataset/db/select_mysql_information_schema_table_constraints.xml
new file mode 100644
index 00000000000..f8282f4d655
--- /dev/null
+++ b/test/e2e/sql/src/test/resources/cases/dql/dataset/db/select_mysql_information_schema_table_constraints.xml
@@ -0,0 +1,27 @@
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one or more
+  ~ contributor license agreements.  See the NOTICE file distributed with
+  ~ this work for additional information regarding copyright ownership.
+  ~ The ASF licenses this file to You under the Apache License, Version 2.0
+  ~ (the "License"); you may not use this file except in compliance with
+  ~ the License.  You may obtain a copy of the License at
+  ~
+  ~     http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
+
+<dataset>
+    <metadata>
+        <column name="constraint_catalog" />
+        <column name="constraint_schema" />
+        <column name="constraint_name" />
+        <column name="table_schema" />
+        <column name="table_name" />
+        <column name="constraint_type" />
+    </metadata>
+</dataset>
diff --git a/test/e2e/sql/src/test/resources/cases/dql/dataset/db/select_mysql_information_schema_table_privileges.xml b/test/e2e/sql/src/test/resources/cases/dql/dataset/db/select_mysql_information_schema_table_privileges.xml
new file mode 100644
index 00000000000..2841403544d
--- /dev/null
+++ b/test/e2e/sql/src/test/resources/cases/dql/dataset/db/select_mysql_information_schema_table_privileges.xml
@@ -0,0 +1,27 @@
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one or more
+  ~ contributor license agreements.  See the NOTICE file distributed with
+  ~ this work for additional information regarding copyright ownership.
+  ~ The ASF licenses this file to You under the Apache License, Version 2.0
+  ~ (the "License"); you may not use this file except in compliance with
+  ~ the License.  You may obtain a copy of the License at
+  ~
+  ~     http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
+
+<dataset>
+    <metadata>
+        <column name="grantee" />
+        <column name="table_catalog" />
+        <column name="table_schema" />
+        <column name="table_name" />
+        <column name="privilege_type" />
+        <column name="is_grantable" />
+    </metadata>
+</dataset>
diff --git a/test/e2e/sql/src/test/resources/cases/dql/dataset/db/select_mysql_information_schema_tables.xml b/test/e2e/sql/src/test/resources/cases/dql/dataset/db/select_mysql_information_schema_tables.xml
new file mode 100644
index 00000000000..23866b62d58
--- /dev/null
+++ b/test/e2e/sql/src/test/resources/cases/dql/dataset/db/select_mysql_information_schema_tables.xml
@@ -0,0 +1,42 @@
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one or more
+  ~ contributor license agreements.  See the NOTICE file distributed with
+  ~ this work for additional information regarding copyright ownership.
+  ~ The ASF licenses this file to You under the Apache License, Version 2.0
+  ~ (the "License"); you may not use this file except in compliance with
+  ~ the License.  You may obtain a copy of the License at
+  ~
+  ~     http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
+
+<dataset>
+    <metadata>
+        <column name="table_catalog" />
+        <column name="table_schema" />
+        <column name="table_name" />
+        <column name="table_type" />
+        <column name="engine" />
+        <column name="version" />
+        <column name="row_format" />
+        <column name="table_rows" />
+        <column name="avg_row_length" />
+        <column name="data_length" />
+        <column name="max_data_length" />
+        <column name="index_length" />
+        <column name="data_free" />
+        <column name="auto_increment" />
+        <column name="create_time" />
+        <column name="update_time" />
+        <column name="check_time" />
+        <column name="table_collation" />
+        <column name="checksum" />
+        <column name="create_options" />
+        <column name="table_comment" />
+    </metadata>
+</dataset>
diff --git a/test/e2e/sql/src/test/resources/cases/dql/dataset/db/select_mysql_information_schema_tablespaces.xml b/test/e2e/sql/src/test/resources/cases/dql/dataset/db/select_mysql_information_schema_tablespaces.xml
new file mode 100644
index 00000000000..0121f6bc938
--- /dev/null
+++ b/test/e2e/sql/src/test/resources/cases/dql/dataset/db/select_mysql_information_schema_tablespaces.xml
@@ -0,0 +1,30 @@
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one or more
+  ~ contributor license agreements.  See the NOTICE file distributed with
+  ~ this work for additional information regarding copyright ownership.
+  ~ The ASF licenses this file to You under the Apache License, Version 2.0
+  ~ (the "License"); you may not use this file except in compliance with
+  ~ the License.  You may obtain a copy of the License at
+  ~
+  ~     http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
+
+<dataset>
+    <metadata>
+        <column name="tablespace_name" />
+        <column name="engine" />
+        <column name="tablespace_type" />
+        <column name="logfile_group_name" />
+        <column name="extent_size" />
+        <column name="autoextend_size" />
+        <column name="maximum_size" />
+        <column name="nodegroup_id" />
+        <column name="tablespace_comment" />
+    </metadata>
+</dataset>
diff --git a/test/e2e/sql/src/test/resources/cases/dql/dataset/db/select_mysql_information_schema_triggers.xml b/test/e2e/sql/src/test/resources/cases/dql/dataset/db/select_mysql_information_schema_triggers.xml
new file mode 100644
index 00000000000..72f0f49b346
--- /dev/null
+++ b/test/e2e/sql/src/test/resources/cases/dql/dataset/db/select_mysql_information_schema_triggers.xml
@@ -0,0 +1,43 @@
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one or more
+  ~ contributor license agreements.  See the NOTICE file distributed with
+  ~ this work for additional information regarding copyright ownership.
+  ~ The ASF licenses this file to You under the Apache License, Version 2.0
+  ~ (the "License"); you may not use this file except in compliance with
+  ~ the License.  You may obtain a copy of the License at
+  ~
+  ~     http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
+
+<dataset>
+    <metadata>
+        <column name="trigger_catalog" />
+        <column name="trigger_schema" />
+        <column name="trigger_name" />
+        <column name="event_manipulation" />
+        <column name="event_object_catalog" />
+        <column name="event_object_schema" />
+        <column name="event_object_table" />
+        <column name="action_order" />
+        <column name="action_condition" />
+        <column name="action_statement" />
+        <column name="action_orientation" />
+        <column name="action_timing" />
+        <column name="action_reference_old_table" />
+        <column name="action_reference_new_table" />
+        <column name="action_reference_old_row" />
+        <column name="action_reference_new_row" />
+        <column name="created" />
+        <column name="sql_mode" />
+        <column name="definer" />
+        <column name="character_set_client" />
+        <column name="collation_connection" />
+        <column name="database_collation" />
+    </metadata>
+</dataset>
diff --git a/test/e2e/sql/src/test/resources/cases/dql/dataset/db/select_mysql_information_schema_user_privileges.xml b/test/e2e/sql/src/test/resources/cases/dql/dataset/db/select_mysql_information_schema_user_privileges.xml
new file mode 100644
index 00000000000..a6dfef5a181
--- /dev/null
+++ b/test/e2e/sql/src/test/resources/cases/dql/dataset/db/select_mysql_information_schema_user_privileges.xml
@@ -0,0 +1,25 @@
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one or more
+  ~ contributor license agreements.  See the NOTICE file distributed with
+  ~ this work for additional information regarding copyright ownership.
+  ~ The ASF licenses this file to You under the Apache License, Version 2.0
+  ~ (the "License"); you may not use this file except in compliance with
+  ~ the License.  You may obtain a copy of the License at
+  ~
+  ~     http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
+
+<dataset>
+    <metadata>
+        <column name="grantee" />
+        <column name="table_catalog" />
+        <column name="privilege_type" />
+        <column name="is_grantable" />
+    </metadata>
+</dataset>
diff --git a/test/e2e/sql/src/test/resources/cases/dql/dql-integration-select-system-schema.xml b/test/e2e/sql/src/test/resources/cases/dql/dql-integration-select-system-schema.xml
index aa9cacfb5fe..ec8e9fd0fb1 100644
--- a/test/e2e/sql/src/test/resources/cases/dql/dql-integration-select-system-schema.xml
+++ b/test/e2e/sql/src/test/resources/cases/dql/dql-integration-select-system-schema.xml
@@ -204,4 +204,44 @@
     <test-case sql="SELECT * FROM information_schema.schema_privileges" db-types="MySQL" scenario-types="db">
         <assertion expected-data-file="select_mysql_information_schema_schema_privileges.xml" />
     </test-case>
+
+    <test-case sql="SELECT * FROM information_schema.schemata" db-types="MySQL" scenario-types="db">
+        <assertion expected-data-file="select_mysql_information_schema_schemata.xml" />
+    </test-case>
+    
+    <test-case sql="SELECT * FROM information_schema.session_status" db-types="MySQL" scenario-types="db">
+        <assertion expected-data-file="select_mysql_information_schema_session_status.xml" />
+    </test-case>
+    
+    <test-case sql="SELECT * FROM information_schema.session_variables" db-types="MySQL" scenario-types="db">
+        <assertion expected-data-file="select_mysql_information_schema_session_variables.xml" />
+    </test-case>
+    
+    <test-case sql="SELECT * FROM information_schema.statistics" db-types="MySQL" scenario-types="db">
+        <assertion expected-data-file="select_mysql_information_schema_statistics.xml" />
+    </test-case>
+    
+    <test-case sql="SELECT * FROM information_schema.table_constraints" db-types="MySQL" scenario-types="db">
+        <assertion expected-data-file="select_mysql_information_schema_table_constraints.xml" />
+    </test-case>
+    
+    <test-case sql="SELECT * FROM information_schema.table_privileges" db-types="MySQL" scenario-types="db">
+        <assertion expected-data-file="select_mysql_information_schema_table_privileges.xml" />
+    </test-case>
+    
+    <test-case sql="SELECT * FROM information_schema.tables" db-types="MySQL" scenario-types="db">
+        <assertion expected-data-file="select_mysql_information_schema_tables.xml" />
+    </test-case>
+    
+    <test-case sql="SELECT * FROM information_schema.tablespaces" db-types="MySQL" scenario-types="db">
+        <assertion expected-data-file="select_mysql_information_schema_tablespaces.xml" />
+    </test-case>
+    
+    <test-case sql="SELECT * FROM information_schema.triggers" db-types="MySQL" scenario-types="db">
+        <assertion expected-data-file="select_mysql_information_schema_triggers.xml" />
+    </test-case>
+    
+    <test-case sql="SELECT * FROM information_schema.user_privileges" db-types="MySQL" scenario-types="db">
+        <assertion expected-data-file="select_mysql_information_schema_user_privileges.xml" />
+    </test-case>
 </integration-test-cases>