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 03:15:44 UTC
[shardingsphere] branch master updated: Add more mysql inforamtion_schema system tables (#24908)
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 07efcba5b60 Add more mysql inforamtion_schema system tables (#24908)
07efcba5b60 is described below
commit 07efcba5b60d5d43bac0e6f5b0da4e8fd1c4f895
Author: ZhangCheng <fl...@outlook.com>
AuthorDate: Mon Apr 10 11:15:36 2023 +0800
Add more mysql inforamtion_schema system tables (#24908)
* Add mysql inforamtion_schema system tables
* Add mysql inforamtion_schema system tables
* fix
* Seata
* Seata
* Seata
---
.../schema/builder/SystemSchemaBuilderRule.java | 5 +-
.../mysql/information_schema/key_column_usage.yaml | 115 +++++++++++
.../mysql/information_schema/optimizer_trace.yaml | 51 +++++
.../mysql/information_schema/partitions.yaml | 219 +++++++++++++++++++++
.../schema/mysql/information_schema/plugins.yaml | 107 ++++++++++
.../mysql/information_schema/processlist.yaml | 83 ++++++++
.../schema/mysql/information_schema/profiling.yaml | 163 +++++++++++++++
.../referential_constraints.yaml | 107 ++++++++++
.../information_schema/schema_privileges.yaml | 59 ++++++
.../builder/SystemSchemaBuilderRuleTest.java | 2 +-
.../schema/builder/SystemSchemaBuilderTest.java | 2 +-
...eataATShardingSphereTransactionManagerTest.java | 28 +--
...t_mysql_information_schema_key_column_usage.xml | 33 ++++
...ct_mysql_information_schema_optimizer_trace.xml | 25 +++
.../select_mysql_information_schema_parameters.xml | 37 ++++
.../select_mysql_information_schema_partitions.xml | 46 +++++
.../db/select_mysql_information_schema_plugins.xml | 32 +++
...select_mysql_information_schema_processlist.xml | 29 +++
.../select_mysql_information_schema_profiling.xml | 39 ++++
..._information_schema_referential_constraints.xml | 32 +++
.../select_mysql_information_schema_routines.xml | 52 +++++
..._mysql_information_schema_schema_privileges.xml | 26 +++
.../dql/dql-integration-select-system-schema.xml | 117 +++++++----
23 files changed, 1354 insertions(+), 55 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 70412a77153..29ffa467d70 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,13 +36,14 @@ 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", "parameters", "routines", "schemata", "tables", "views",
+ "engines", "events", "files", "global_status", "global_variables", "schemata", "tables", "views",
"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"))),
+ "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"))),
MYSQL_MYSQL("MySQL", "mysql", new HashSet<>(Collections.singleton("db"))),
diff --git a/infra/common/src/main/resources/schema/mysql/information_schema/key_column_usage.yaml b/infra/common/src/main/resources/schema/mysql/information_schema/key_column_usage.yaml
new file mode 100644
index 00000000000..a62ac7e5b16
--- /dev/null
+++ b/infra/common/src/main/resources/schema/mysql/information_schema/key_column_usage.yaml
@@ -0,0 +1,115 @@
+#
+# 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: KEY_COLUMN_USAGE
+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_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
+ column_name:
+ caseSensitive: false
+ dataType: 12
+ generated: false
+ name: COLUMN_NAME
+ primaryKey: false
+ unsigned: false
+ visible: true
+ ordinal_position:
+ caseSensitive: false
+ dataType: 4
+ generated: false
+ name: ORDINAL_POSITION
+ primaryKey: false
+ unsigned: false
+ visible: true
+ position_in_unique_constraint:
+ caseSensitive: false
+ dataType: 4
+ generated: false
+ name: POSITION_IN_UNIQUE_CONSTRAINT
+ primaryKey: false
+ unsigned: false
+ visible: true
+ referenced_table_schema:
+ caseSensitive: false
+ dataType: 12
+ generated: false
+ name: REFERENCED_TABLE_SCHEMA
+ primaryKey: false
+ unsigned: false
+ visible: true
+ referenced_table_name:
+ caseSensitive: false
+ dataType: 12
+ generated: false
+ name: REFERENCED_TABLE_NAME
+ primaryKey: false
+ unsigned: false
+ visible: true
+ referenced_column_name:
+ caseSensitive: false
+ dataType: 12
+ generated: false
+ name: REFERENCED_COLUMN_NAME
+ primaryKey: false
+ unsigned: false
+ visible: true
diff --git a/infra/common/src/main/resources/schema/mysql/information_schema/optimizer_trace.yaml b/infra/common/src/main/resources/schema/mysql/information_schema/optimizer_trace.yaml
new file mode 100644
index 00000000000..677f92b97d1
--- /dev/null
+++ b/infra/common/src/main/resources/schema/mysql/information_schema/optimizer_trace.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: OPTIMIZER_TRACE
+columns:
+ query:
+ caseSensitive: false
+ dataType: -1
+ generated: false
+ name: QUERY
+ primaryKey: false
+ unsigned: false
+ visible: true
+ trace:
+ caseSensitive: false
+ dataType: -1
+ generated: false
+ name: TRACE
+ primaryKey: false
+ unsigned: false
+ visible: true
+ missing_bytes_beyond_max_mem_size:
+ caseSensitive: false
+ dataType: 4
+ generated: false
+ name: MISSING_BYTES_BEYOND_MAX_MEM_SIZE
+ primaryKey: false
+ unsigned: false
+ visible: true
+ insufficient_privileges:
+ caseSensitive: false
+ dataType: -6
+ generated: false
+ name: INSUFFICIENT_PRIVILEGES
+ primaryKey: false
+ unsigned: false
+ visible: true
diff --git a/infra/common/src/main/resources/schema/mysql/information_schema/partitions.yaml b/infra/common/src/main/resources/schema/mysql/information_schema/partitions.yaml
new file mode 100644
index 00000000000..4ec34719f97
--- /dev/null
+++ b/infra/common/src/main/resources/schema/mysql/information_schema/partitions.yaml
@@ -0,0 +1,219 @@
+#
+# 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: PARTITIONS
+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
+ partition_name:
+ caseSensitive: false
+ dataType: 12
+ generated: false
+ name: PARTITION_NAME
+ primaryKey: false
+ unsigned: false
+ visible: true
+ subpartition_name:
+ caseSensitive: false
+ dataType: 12
+ generated: false
+ name: SUBPARTITION_NAME
+ primaryKey: false
+ unsigned: false
+ visible: true
+ partition_ordinal_position:
+ caseSensitive: false
+ dataType: 4
+ generated: false
+ name: PARTITION_ORDINAL_POSITION
+ primaryKey: false
+ unsigned: true
+ visible: true
+ subpartition_ordinal_position:
+ caseSensitive: false
+ dataType: 4
+ generated: false
+ name: SUBPARTITION_ORDINAL_POSITION
+ primaryKey: false
+ unsigned: true
+ visible: true
+ partition_method:
+ caseSensitive: false
+ dataType: 12
+ generated: false
+ name: PARTITION_METHOD
+ primaryKey: false
+ unsigned: false
+ visible: true
+ subpartition_method:
+ caseSensitive: false
+ dataType: 12
+ generated: false
+ name: SUBPARTITION_METHOD
+ primaryKey: false
+ unsigned: false
+ visible: true
+ partition_expression:
+ caseSensitive: false
+ dataType: -1
+ generated: false
+ name: PARTITION_EXPRESSION
+ primaryKey: false
+ unsigned: false
+ visible: true
+ subpartition_expression:
+ caseSensitive: false
+ dataType: -1
+ generated: false
+ name: SUBPARTITION_EXPRESSION
+ primaryKey: false
+ unsigned: false
+ visible: true
+ partition_description:
+ caseSensitive: false
+ dataType: -1
+ generated: false
+ name: PARTITION_DESCRIPTION
+ primaryKey: false
+ unsigned: false
+ visible: true
+ table_rows:
+ caseSensitive: false
+ dataType: 4
+ generated: false
+ name: TABLE_ROWS
+ primaryKey: false
+ unsigned: true
+ visible: true
+ avg_row_length:
+ caseSensitive: false
+ dataType: 4
+ generated: false
+ name: AVG_ROW_LENGTH
+ primaryKey: false
+ unsigned: true
+ visible: true
+ data_length:
+ caseSensitive: false
+ dataType: 4
+ generated: false
+ name: DATA_LENGTH
+ primaryKey: false
+ unsigned: true
+ visible: true
+ max_data_length:
+ caseSensitive: false
+ dataType: 4
+ generated: false
+ name: MAX_DATA_LENGTH
+ primaryKey: false
+ unsigned: true
+ visible: true
+ index_length:
+ caseSensitive: false
+ dataType: 4
+ generated: false
+ name: INDEX_LENGTH
+ primaryKey: false
+ unsigned: true
+ visible: true
+ data_free:
+ caseSensitive: false
+ dataType: 4
+ generated: false
+ name: DATA_FREE
+ primaryKey: false
+ unsigned: true
+ visible: true
+ create_time:
+ caseSensitive: false
+ dataType: 93
+ generated: false
+ name: CREATE_TIME
+ primaryKey: false
+ unsigned: false
+ visible: true
+ update_time:
+ caseSensitive: false
+ dataType: 93
+ generated: false
+ name: UPDATE_TIME
+ primaryKey: false
+ unsigned: false
+ visible: true
+ check_time:
+ caseSensitive: false
+ dataType: 93
+ generated: false
+ name: CHECK_TIME
+ primaryKey: false
+ unsigned: false
+ visible: true
+ checksum:
+ caseSensitive: false
+ dataType: 4
+ generated: false
+ name: CHECKSUM
+ primaryKey: false
+ unsigned: true
+ visible: true
+ partition_comment:
+ caseSensitive: false
+ dataType: 12
+ generated: false
+ name: PARTITION_COMMENT
+ primaryKey: false
+ unsigned: false
+ visible: true
+ nodegroup:
+ caseSensitive: false
+ dataType: 12
+ generated: false
+ name: NODEGROUP
+ primaryKey: false
+ unsigned: false
+ visible: true
+ tablespace_name:
+ caseSensitive: false
+ dataType: 12
+ generated: false
+ name: TABLESPACE_NAME
+ primaryKey: false
+ unsigned: false
+ visible: true
diff --git a/infra/common/src/main/resources/schema/mysql/information_schema/plugins.yaml b/infra/common/src/main/resources/schema/mysql/information_schema/plugins.yaml
new file mode 100644
index 00000000000..50d0fe1d7d8
--- /dev/null
+++ b/infra/common/src/main/resources/schema/mysql/information_schema/plugins.yaml
@@ -0,0 +1,107 @@
+#
+# 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: PLUGINS
+columns:
+ plugin_name:
+ caseSensitive: false
+ dataType: 12
+ generated: false
+ name: PLUGIN_NAME
+ primaryKey: false
+ unsigned: false
+ visible: true
+ plugin_version:
+ caseSensitive: false
+ dataType: 12
+ generated: false
+ name: PLUGIN_VERSION
+ primaryKey: false
+ unsigned: false
+ visible: true
+ plugin_status:
+ caseSensitive: false
+ dataType: 12
+ generated: false
+ name: PLUGIN_STATUS
+ primaryKey: false
+ unsigned: false
+ visible: true
+ plugin_type:
+ caseSensitive: false
+ dataType: 12
+ generated: false
+ name: PLUGIN_TYPE
+ primaryKey: false
+ unsigned: false
+ visible: true
+ plugin_type_version:
+ caseSensitive: false
+ dataType: 12
+ generated: false
+ name: PLUGIN_TYPE_VERSION
+ primaryKey: false
+ unsigned: false
+ visible: true
+ plugin_library:
+ caseSensitive: false
+ dataType: 12
+ generated: false
+ name: PLUGIN_LIBRARY
+ primaryKey: false
+ unsigned: false
+ visible: true
+ plugin_library_version:
+ caseSensitive: false
+ dataType: 12
+ generated: false
+ name: PLUGIN_LIBRARY_VERSION
+ primaryKey: false
+ unsigned: false
+ visible: true
+ plugin_author:
+ caseSensitive: false
+ dataType: 12
+ generated: false
+ name: PLUGIN_AUTHOR
+ primaryKey: false
+ unsigned: false
+ visible: true
+ plugin_description:
+ caseSensitive: false
+ dataType: -1
+ generated: false
+ name: PLUGIN_DESCRIPTION
+ primaryKey: false
+ unsigned: false
+ visible: true
+ plugin_license:
+ caseSensitive: false
+ dataType: 12
+ generated: false
+ name: PLUGIN_LICENSE
+ primaryKey: false
+ unsigned: false
+ visible: true
+ load_option:
+ caseSensitive: false
+ dataType: 12
+ generated: false
+ name: LOAD_OPTION
+ primaryKey: false
+ unsigned: false
+ visible: true
diff --git a/infra/common/src/main/resources/schema/mysql/information_schema/processlist.yaml b/infra/common/src/main/resources/schema/mysql/information_schema/processlist.yaml
new file mode 100644
index 00000000000..f60b51d47dc
--- /dev/null
+++ b/infra/common/src/main/resources/schema/mysql/information_schema/processlist.yaml
@@ -0,0 +1,83 @@
+#
+# 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: PROCESSLIST
+columns:
+ id:
+ caseSensitive: false
+ dataType: 4
+ generated: false
+ name: ID
+ primaryKey: false
+ unsigned: true
+ visible: true
+ user:
+ caseSensitive: false
+ dataType: 12
+ generated: false
+ name: USER
+ primaryKey: false
+ unsigned: false
+ visible: true
+ host:
+ caseSensitive: false
+ dataType: 12
+ generated: false
+ name: HOST
+ primaryKey: false
+ unsigned: false
+ visible: true
+ db:
+ caseSensitive: false
+ dataType: 12
+ generated: false
+ name: DB
+ primaryKey: false
+ unsigned: false
+ visible: true
+ command:
+ caseSensitive: false
+ dataType: 12
+ generated: false
+ name: COMMAND
+ primaryKey: false
+ unsigned: false
+ visible: true
+ time:
+ caseSensitive: false
+ dataType: 4
+ generated: false
+ name: TIME
+ primaryKey: false
+ unsigned: false
+ visible: true
+ state:
+ caseSensitive: false
+ dataType: 12
+ generated: false
+ name: STATE
+ primaryKey: false
+ unsigned: false
+ visible: true
+ info:
+ caseSensitive: false
+ dataType: -1
+ generated: false
+ name: INFO
+ primaryKey: false
+ unsigned: false
+ visible: true
diff --git a/infra/common/src/main/resources/schema/mysql/information_schema/profiling.yaml b/infra/common/src/main/resources/schema/mysql/information_schema/profiling.yaml
new file mode 100644
index 00000000000..338a5f4a589
--- /dev/null
+++ b/infra/common/src/main/resources/schema/mysql/information_schema/profiling.yaml
@@ -0,0 +1,163 @@
+#
+# 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: PROFILING
+columns:
+ query_id:
+ caseSensitive: false
+ dataType: 4
+ generated: false
+ name: QUERY_ID
+ primaryKey: false
+ unsigned: false
+ visible: true
+ seq:
+ caseSensitive: false
+ dataType: 4
+ generated: false
+ name: SEQ
+ primaryKey: false
+ unsigned: false
+ visible: true
+ state:
+ caseSensitive: false
+ dataType: 12
+ generated: false
+ name: STATE
+ primaryKey: false
+ unsigned: false
+ visible: true
+ duration:
+ caseSensitive: false
+ dataType: 3
+ generated: false
+ name: DURATION
+ primaryKey: false
+ unsigned: false
+ visible: true
+ cpu_user:
+ caseSensitive: false
+ dataType: 3
+ generated: false
+ name: CPU_USER
+ primaryKey: false
+ unsigned: false
+ visible: true
+ cpu_system:
+ caseSensitive: false
+ dataType: 3
+ generated: false
+ name: CPU_SYSTEM
+ primaryKey: false
+ unsigned: false
+ visible: true
+ context_voluntary:
+ caseSensitive: false
+ dataType: 4
+ generated: false
+ name: CONTEXT_VOLUNTARY
+ primaryKey: false
+ unsigned: false
+ visible: true
+ context_involuntary:
+ caseSensitive: false
+ dataType: 4
+ generated: false
+ name: CONTEXT_INVOLUNTARY
+ primaryKey: false
+ unsigned: false
+ visible: true
+ block_ops_in:
+ caseSensitive: false
+ dataType: 4
+ generated: false
+ name: BLOCK_OPS_IN
+ primaryKey: false
+ unsigned: false
+ visible: true
+ block_ops_out:
+ caseSensitive: false
+ dataType: 4
+ generated: false
+ name: BLOCK_OPS_OUT
+ primaryKey: false
+ unsigned: false
+ visible: true
+ messages_sent:
+ caseSensitive: false
+ dataType: 4
+ generated: false
+ name: MESSAGES_SENT
+ primaryKey: false
+ unsigned: false
+ visible: true
+ messages_received:
+ caseSensitive: false
+ dataType: 4
+ generated: false
+ name: MESSAGES_RECEIVED
+ primaryKey: false
+ unsigned: false
+ visible: true
+ page_faults_major:
+ caseSensitive: false
+ dataType: 4
+ generated: false
+ name: PAGE_FAULTS_MAJOR
+ primaryKey: false
+ unsigned: false
+ visible: true
+ page_faults_minor:
+ caseSensitive: false
+ dataType: 4
+ generated: false
+ name: PAGE_FAULTS_MINOR
+ primaryKey: false
+ unsigned: false
+ visible: true
+ swaps:
+ caseSensitive: false
+ dataType: 4
+ generated: false
+ name: SWAPS
+ primaryKey: false
+ unsigned: false
+ visible: true
+ source_function:
+ caseSensitive: false
+ dataType: 12
+ generated: false
+ name: SOURCE_FUNCTION
+ primaryKey: false
+ unsigned: false
+ visible: true
+ source_file:
+ caseSensitive: false
+ dataType: 12
+ generated: false
+ name: SOURCE_FILE
+ primaryKey: false
+ unsigned: false
+ visible: true
+ source_line:
+ caseSensitive: false
+ dataType: 4
+ generated: false
+ name: SOURCE_LINE
+ primaryKey: false
+ unsigned: false
+ visible: true
diff --git a/infra/common/src/main/resources/schema/mysql/information_schema/referential_constraints.yaml b/infra/common/src/main/resources/schema/mysql/information_schema/referential_constraints.yaml
new file mode 100644
index 00000000000..fc71e80a833
--- /dev/null
+++ b/infra/common/src/main/resources/schema/mysql/information_schema/referential_constraints.yaml
@@ -0,0 +1,107 @@
+#
+# 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: REFERENTIAL_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
+ unique_constraint_catalog:
+ caseSensitive: false
+ dataType: 12
+ generated: false
+ name: UNIQUE_CONSTRAINT_CATALOG
+ primaryKey: false
+ unsigned: false
+ visible: true
+ unique_constraint_schema:
+ caseSensitive: false
+ dataType: 12
+ generated: false
+ name: UNIQUE_CONSTRAINT_SCHEMA
+ primaryKey: false
+ unsigned: false
+ visible: true
+ unique_constraint_name:
+ caseSensitive: false
+ dataType: 12
+ generated: false
+ name: UNIQUE_CONSTRAINT_NAME
+ primaryKey: false
+ unsigned: false
+ visible: true
+ match_option:
+ caseSensitive: false
+ dataType: 12
+ generated: false
+ name: MATCH_OPTION
+ primaryKey: false
+ unsigned: false
+ visible: true
+ update_rule:
+ caseSensitive: false
+ dataType: 12
+ generated: false
+ name: UPDATE_RULE
+ primaryKey: false
+ unsigned: false
+ visible: true
+ delete_rule:
+ caseSensitive: false
+ dataType: 12
+ generated: false
+ name: DELETE_RULE
+ primaryKey: false
+ unsigned: false
+ visible: true
+ table_name:
+ caseSensitive: false
+ dataType: 12
+ generated: false
+ name: TABLE_NAME
+ primaryKey: false
+ unsigned: false
+ visible: true
+ referenced_table_name:
+ caseSensitive: false
+ dataType: 12
+ generated: false
+ name: REFERENCED_TABLE_NAME
+ primaryKey: false
+ unsigned: false
+ visible: true
diff --git a/infra/common/src/main/resources/schema/mysql/information_schema/schema_privileges.yaml b/infra/common/src/main/resources/schema/mysql/information_schema/schema_privileges.yaml
new file mode 100644
index 00000000000..621152d7d81
--- /dev/null
+++ b/infra/common/src/main/resources/schema/mysql/information_schema/schema_privileges.yaml
@@ -0,0 +1,59 @@
+#
+# 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: SCHEMA_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
+ 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 1020a9c93b7..f3fe6e6bc62 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(45));
+ assertThat(actual.getTables().size(), is(53));
}
@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 5456d6228f8..6f025da9e26 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(45));
+ assertThat(actual.get("information_schema").getTables().size(), is(53));
}
@Test
diff --git a/kernel/transaction/type/base/seata-at/src/test/java/org/apache/shardingsphere/transaction/base/seata/at/SeataATShardingSphereTransactionManagerTest.java b/kernel/transaction/type/base/seata-at/src/test/java/org/apache/shardingsphere/transaction/base/seata/at/SeataATShardingSphereTransactionManagerTest.java
index d124fdaa66d..1397c777626 100644
--- a/kernel/transaction/type/base/seata-at/src/test/java/org/apache/shardingsphere/transaction/base/seata/at/SeataATShardingSphereTransactionManagerTest.java
+++ b/kernel/transaction/type/base/seata-at/src/test/java/org/apache/shardingsphere/transaction/base/seata/at/SeataATShardingSphereTransactionManagerTest.java
@@ -171,18 +171,22 @@ class SeataATShardingSphereTransactionManagerTest {
assertTrue(responseQueue.stream().anyMatch(each -> each instanceof RegisterTMResponse));
assertTrue(responseQueue.stream().anyMatch(each -> each instanceof RegisterRMResponse));
assertTrue(responseQueue.stream().anyMatch(each -> responseClass.equals(each.getClass())));
- if (requestQueue.poll() instanceof RegisterTMRequest) {
- assertThat(responseQueue.poll(), instanceOf(RegisterTMResponse.class));
- } else if (requestQueue.poll() instanceof RegisterRMRequest) {
- assertThat(responseQueue.poll(), instanceOf(RegisterRMResponse.class));
- } else if (requestQueue.poll() instanceof GlobalBeginRequest) {
- assertThat(responseQueue.poll(), instanceOf(GlobalBeginResponse.class));
- } else if (requestQueue.poll() instanceof GlobalCommitRequest) {
- assertThat(responseQueue.poll(), instanceOf(GlobalCommitResponse.class));
- } else if (requestQueue.poll() instanceof GlobalRollbackRequest) {
- assertThat(responseQueue.poll(), instanceOf(GlobalRollbackResponse.class));
- } else {
- fail("Request package type error");
+ while (!requestQueue.isEmpty()) {
+ Object requestPackage = requestQueue.poll();
+ Object responsePackage = responseQueue.poll();
+ if (requestPackage instanceof RegisterTMRequest) {
+ assertThat(responsePackage, instanceOf(RegisterTMResponse.class));
+ } else if (requestPackage instanceof RegisterRMRequest) {
+ assertThat(responsePackage, instanceOf(RegisterRMResponse.class));
+ } else if (requestPackage instanceof GlobalBeginRequest) {
+ assertThat(responsePackage, instanceOf(GlobalBeginResponse.class));
+ } else if (requestPackage instanceof GlobalCommitRequest) {
+ assertThat(responsePackage, instanceOf(GlobalCommitResponse.class));
+ } else if (requestPackage instanceof GlobalRollbackRequest) {
+ assertThat(responsePackage, instanceOf(GlobalRollbackResponse.class));
+ } else {
+ fail("Request package type error");
+ }
}
}
diff --git a/test/e2e/sql/src/test/resources/cases/dql/dataset/db/select_mysql_information_schema_key_column_usage.xml b/test/e2e/sql/src/test/resources/cases/dql/dataset/db/select_mysql_information_schema_key_column_usage.xml
new file mode 100644
index 00000000000..5eb5f4f59d6
--- /dev/null
+++ b/test/e2e/sql/src/test/resources/cases/dql/dataset/db/select_mysql_information_schema_key_column_usage.xml
@@ -0,0 +1,33 @@
+<!--
+ ~ 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_catalog" />
+ <column name="table_schema" />
+ <column name="table_name" />
+ <column name="column_name" />
+ <column name="ordinal_position" />
+ <column name="position_in_unique_constraint" />
+ <column name="referenced_table_schema" />
+ <column name="referenced_table_name" />
+ <column name="referenced_column_name" />
+ </metadata>
+</dataset>
diff --git a/test/e2e/sql/src/test/resources/cases/dql/dataset/db/select_mysql_information_schema_optimizer_trace.xml b/test/e2e/sql/src/test/resources/cases/dql/dataset/db/select_mysql_information_schema_optimizer_trace.xml
new file mode 100644
index 00000000000..3e82dd3e668
--- /dev/null
+++ b/test/e2e/sql/src/test/resources/cases/dql/dataset/db/select_mysql_information_schema_optimizer_trace.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="query" />
+ <column name="trace" />
+ <column name="missing_bytes_beyond_max_mem_size" />
+ <column name="insufficient_privileges" />
+ </metadata>
+</dataset>
diff --git a/test/e2e/sql/src/test/resources/cases/dql/dataset/db/select_mysql_information_schema_parameters.xml b/test/e2e/sql/src/test/resources/cases/dql/dataset/db/select_mysql_information_schema_parameters.xml
new file mode 100644
index 00000000000..b3df8a308d1
--- /dev/null
+++ b/test/e2e/sql/src/test/resources/cases/dql/dataset/db/select_mysql_information_schema_parameters.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="specific_catalog" />
+ <column name="specific_schema" />
+ <column name="specific_name" />
+ <column name="ordinal_position" />
+ <column name="parameter_mode" />
+ <column name="parameter_name" />
+ <column name="data_type" />
+ <column name="character_maximum_length" />
+ <column name="character_octet_length" />
+ <column name="numeric_precision" />
+ <column name="numeric_scale" />
+ <column name="datetime_precision" />
+ <column name="character_set_name" />
+ <column name="collation_name" />
+ <column name="dtd_identifier" />
+ <column name="routine_type" />
+ </metadata>
+</dataset>
diff --git a/test/e2e/sql/src/test/resources/cases/dql/dataset/db/select_mysql_information_schema_partitions.xml b/test/e2e/sql/src/test/resources/cases/dql/dataset/db/select_mysql_information_schema_partitions.xml
new file mode 100644
index 00000000000..21ed5de175e
--- /dev/null
+++ b/test/e2e/sql/src/test/resources/cases/dql/dataset/db/select_mysql_information_schema_partitions.xml
@@ -0,0 +1,46 @@
+<!--
+ ~ 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="partition_name" />
+ <column name="subpartition_name" />
+ <column name="partition_ordinal_position" />
+ <column name="subpartition_ordinal_position" />
+ <column name="partition_method" />
+ <column name="subpartition_method" />
+ <column name="partition_expression" />
+ <column name="subpartition_expression" />
+ <column name="partition_description" />
+ <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="create_time" />
+ <column name="update_time" />
+ <column name="check_time" />
+ <column name="checksum" />
+ <column name="partition_comment" />
+ <column name="nodegroup" />
+ <column name="tablespace_name" />
+ </metadata>
+</dataset>
diff --git a/test/e2e/sql/src/test/resources/cases/dql/dataset/db/select_mysql_information_schema_plugins.xml b/test/e2e/sql/src/test/resources/cases/dql/dataset/db/select_mysql_information_schema_plugins.xml
new file mode 100644
index 00000000000..92e6351dcd6
--- /dev/null
+++ b/test/e2e/sql/src/test/resources/cases/dql/dataset/db/select_mysql_information_schema_plugins.xml
@@ -0,0 +1,32 @@
+<!--
+ ~ 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="plugin_name" />
+ <column name="plugin_version" />
+ <column name="plugin_status" />
+ <column name="plugin_type" />
+ <column name="plugin_type_version" />
+ <column name="plugin_library" />
+ <column name="plugin_library_version" />
+ <column name="plugin_author" />
+ <column name="plugin_description" />
+ <column name="plugin_license" />
+ <column name="load_option" />
+ </metadata>
+</dataset>
diff --git a/test/e2e/sql/src/test/resources/cases/dql/dataset/db/select_mysql_information_schema_processlist.xml b/test/e2e/sql/src/test/resources/cases/dql/dataset/db/select_mysql_information_schema_processlist.xml
new file mode 100644
index 00000000000..ecb620c46a8
--- /dev/null
+++ b/test/e2e/sql/src/test/resources/cases/dql/dataset/db/select_mysql_information_schema_processlist.xml
@@ -0,0 +1,29 @@
+<!--
+ ~ 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="id" />
+ <column name="user" />
+ <column name="host" />
+ <column name="db" />
+ <column name="command" />
+ <column name="time" />
+ <column name="state" />
+ <column name="info" />
+ </metadata>
+</dataset>
diff --git a/test/e2e/sql/src/test/resources/cases/dql/dataset/db/select_mysql_information_schema_profiling.xml b/test/e2e/sql/src/test/resources/cases/dql/dataset/db/select_mysql_information_schema_profiling.xml
new file mode 100644
index 00000000000..79269b55674
--- /dev/null
+++ b/test/e2e/sql/src/test/resources/cases/dql/dataset/db/select_mysql_information_schema_profiling.xml
@@ -0,0 +1,39 @@
+<!--
+ ~ 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="query_id" />
+ <column name="seq" />
+ <column name="state" />
+ <column name="duration" />
+ <column name="cpu_user" />
+ <column name="cpu_system" />
+ <column name="context_voluntary" />
+ <column name="context_involuntary" />
+ <column name="block_ops_in" />
+ <column name="block_ops_out" />
+ <column name="messages_sent" />
+ <column name="messages_received" />
+ <column name="page_faults_major" />
+ <column name="page_faults_minor" />
+ <column name="swaps" />
+ <column name="source_function" />
+ <column name="source_file" />
+ <column name="source_line" />
+ </metadata>
+</dataset>
diff --git a/test/e2e/sql/src/test/resources/cases/dql/dataset/db/select_mysql_information_schema_referential_constraints.xml b/test/e2e/sql/src/test/resources/cases/dql/dataset/db/select_mysql_information_schema_referential_constraints.xml
new file mode 100644
index 00000000000..0a36aa836bd
--- /dev/null
+++ b/test/e2e/sql/src/test/resources/cases/dql/dataset/db/select_mysql_information_schema_referential_constraints.xml
@@ -0,0 +1,32 @@
+<!--
+ ~ 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="unique_constraint_catalog" />
+ <column name="unique_constraint_schema" />
+ <column name="unique_constraint_name" />
+ <column name="match_option" />
+ <column name="update_rule" />
+ <column name="delete_rule" />
+ <column name="table_name" />
+ <column name="referenced_table_name" />
+ </metadata>
+</dataset>
diff --git a/test/e2e/sql/src/test/resources/cases/dql/dataset/db/select_mysql_information_schema_routines.xml b/test/e2e/sql/src/test/resources/cases/dql/dataset/db/select_mysql_information_schema_routines.xml
new file mode 100644
index 00000000000..a4e4de0949f
--- /dev/null
+++ b/test/e2e/sql/src/test/resources/cases/dql/dataset/db/select_mysql_information_schema_routines.xml
@@ -0,0 +1,52 @@
+<!--
+ ~ 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="specific_name" />
+ <column name="routine_catalog" />
+ <column name="routine_schema" />
+ <column name="routine_name" />
+ <column name="routine_type" />
+ <column name="data_type" />
+ <column name="character_maximum_length" />
+ <column name="character_octet_length" />
+ <column name="numeric_precision" />
+ <column name="numeric_scale" />
+ <column name="datetime_precision" />
+ <column name="character_set_name" />
+ <column name="collation_name" />
+ <column name="dtd_identifier" />
+ <column name="routine_body" />
+ <column name="routine_definition" />
+ <column name="external_name" />
+ <column name="external_language" />
+ <column name="parameter_style" />
+ <column name="is_deterministic" />
+ <column name="sql_data_access" />
+ <column name="sql_path" />
+ <column name="security_type" />
+ <column name="created" />
+ <column name="last_altered" />
+ <column name="sql_mode" />
+ <column name="routine_comment" />
+ <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_schema_privileges.xml b/test/e2e/sql/src/test/resources/cases/dql/dataset/db/select_mysql_information_schema_schema_privileges.xml
new file mode 100644
index 00000000000..617ddc02b76
--- /dev/null
+++ b/test/e2e/sql/src/test/resources/cases/dql/dataset/db/select_mysql_information_schema_schema_privileges.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="grantee" />
+ <column name="table_catalog" />
+ <column name="table_schema" />
+ <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 59343919d94..aa9cacfb5fe 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
@@ -17,152 +17,191 @@
-->
<integration-test-cases>
- <test-case sql="select * from information_schema.innodb_buffer_page;" db-types="MySQL" scenario-types="db">
+ <test-case sql="SELECT * FROM information_schema.innodb_buffer_page" db-types="MySQL" scenario-types="db">
<assertion expected-data-file="select_mysql_information_schema_innodb_buffer_page.xml" />
</test-case>
- <test-case sql="select * from information_schema.innodb_buffer_page_lru;" db-types="MySQL" scenario-types="db">
+ <test-case sql="SELECT * FROM information_schema.innodb_buffer_page_lru" db-types="MySQL" scenario-types="db">
<assertion expected-data-file="select_mysql_information_schema_innodb_buffer_page_lru.xml" />
</test-case>
- <test-case sql="select * from information_schema.innodb_buffer_pool_stats;" db-types="MySQL" scenario-types="db">
+ <test-case sql="SELECT * FROM information_schema.innodb_buffer_pool_stats" db-types="MySQL" scenario-types="db">
<assertion expected-data-file="select_mysql_information_schema_innodb_buffer_pool_stats.xml" />
</test-case>
- <test-case sql="select * from information_schema.innodb_cmp;" db-types="MySQL" scenario-types="db">
+ <test-case sql="SELECT * FROM information_schema.innodb_cmp" db-types="MySQL" scenario-types="db">
<assertion expected-data-file="select_mysql_information_schema_innodb_cmp.xml" />
</test-case>
- <test-case sql="select * from information_schema.innodb_cmp_per_index;" db-types="MySQL" scenario-types="db">
+ <test-case sql="SELECT * FROM information_schema.innodb_cmp_per_index" db-types="MySQL" scenario-types="db">
<assertion expected-data-file="select_mysql_information_schema_innodb_cmp_per_index.xml" />
</test-case>
- <test-case sql="select * from information_schema.innodb_cmp_per_index_reset;" db-types="MySQL" scenario-types="db">
+ <test-case sql="SELECT * FROM information_schema.innodb_cmp_per_index_reset" db-types="MySQL" scenario-types="db">
<assertion expected-data-file="select_mysql_information_schema_innodb_cmp_per_index_reset.xml" />
</test-case>
- <test-case sql="select * from information_schema.innodb_cmp_reset;" db-types="MySQL" scenario-types="db">
+ <test-case sql="SELECT * FROM information_schema.innodb_cmp_reset" db-types="MySQL" scenario-types="db">
<assertion expected-data-file="select_mysql_information_schema_innodb_cmp_reset.xml" />
</test-case>
-
- <test-case sql="select * from information_schema.innodb_buffer_page;" db-types="MySQL" scenario-types="db">
+
+ <test-case sql="SELECT * FROM information_schema.innodb_buffer_page" db-types="MySQL" scenario-types="db">
<assertion expected-data-file="select_mysql_information_schema_innodb_buffer_page.xml" />
</test-case>
- <test-case sql="select * from information_schema.innodb_buffer_page_lru;" db-types="MySQL" scenario-types="db">
+ <test-case sql="SELECT * FROM information_schema.innodb_buffer_page_lru" db-types="MySQL" scenario-types="db">
<assertion expected-data-file="select_mysql_information_schema_innodb_buffer_page_lru.xml" />
</test-case>
- <test-case sql="select * from information_schema.innodb_buffer_pool_stats;" db-types="MySQL" scenario-types="db">
+ <test-case sql="SELECT * FROM information_schema.innodb_buffer_pool_stats" db-types="MySQL" scenario-types="db">
<assertion expected-data-file="select_mysql_information_schema_innodb_buffer_pool_stats.xml" />
</test-case>
- <test-case sql="select * from information_schema.innodb_cmp;" db-types="MySQL" scenario-types="db">
+ <test-case sql="SELECT * FROM information_schema.innodb_cmp" db-types="MySQL" scenario-types="db">
<assertion expected-data-file="select_mysql_information_schema_innodb_cmp.xml" />
</test-case>
- <test-case sql="select * from information_schema.innodb_cmp_per_index;" db-types="MySQL" scenario-types="db">
+ <test-case sql="SELECT * FROM information_schema.innodb_cmp_per_index" db-types="MySQL" scenario-types="db">
<assertion expected-data-file="select_mysql_information_schema_innodb_cmp_per_index.xml" />
</test-case>
- <test-case sql="select * from information_schema.innodb_cmp_per_index_reset;" db-types="MySQL" scenario-types="db">
+ <test-case sql="SELECT * FROM information_schema.innodb_cmp_per_index_reset" db-types="MySQL" scenario-types="db">
<assertion expected-data-file="select_mysql_information_schema_innodb_cmp_per_index_reset.xml" />
</test-case>
- <test-case sql="select * from information_schema.innodb_cmp_reset;" db-types="MySQL" scenario-types="db">
+ <test-case sql="SELECT * FROM information_schema.innodb_cmp_reset" db-types="MySQL" scenario-types="db">
<assertion expected-data-file="select_mysql_information_schema_innodb_cmp_reset.xml" />
</test-case>
- <test-case sql="select * from information_schema.innodb_cmpmem;" db-types="MySQL" scenario-types="db">
+ <test-case sql="SELECT * FROM information_schema.innodb_cmpmem" db-types="MySQL" scenario-types="db">
<assertion expected-data-file="select_mysql_information_schema_innodb_cmpmem.xml" />
</test-case>
- <test-case sql="select * from information_schema.innodb_cmpmem_reset;" db-types="MySQL" scenario-types="db">
+ <test-case sql="SELECT * FROM information_schema.innodb_cmpmem_reset" db-types="MySQL" scenario-types="db">
<assertion expected-data-file="select_mysql_information_schema_innodb_cmpmem_reset.xml" />
</test-case>
- <test-case sql="select * from information_schema.innodb_ft_being_deleted;" db-types="MySQL" scenario-types="db">
+ <test-case sql="SELECT * FROM information_schema.innodb_ft_being_deleted" db-types="MySQL" scenario-types="db">
<assertion expected-data-file="select_mysql_information_schema_innodb_ft_being_deleted.xml" />
</test-case>
- <test-case sql="select * from information_schema.innodb_ft_config;" db-types="MySQL" scenario-types="db">
+ <test-case sql="SELECT * FROM information_schema.innodb_ft_config" db-types="MySQL" scenario-types="db">
<assertion expected-data-file="select_mysql_information_schema_innodb_ft_config.xml" />
</test-case>
- <test-case sql="select * from information_schema.innodb_ft_default_stopword;" db-types="MySQL" scenario-types="db">
+ <test-case sql="SELECT * FROM information_schema.innodb_ft_default_stopword" db-types="MySQL" scenario-types="db">
<assertion expected-data-file="select_mysql_information_schema_innodb_ft_default_stopword.xml" />
</test-case>
- <test-case sql="select * from information_schema.innodb_ft_deleted;" db-types="MySQL" scenario-types="db">
+ <test-case sql="SELECT * FROM information_schema.innodb_ft_deleted" db-types="MySQL" scenario-types="db">
<assertion expected-data-file="select_mysql_information_schema_innodb_ft_deleted.xml" />
</test-case>
- <test-case sql="select * from information_schema.innodb_ft_index_cache;" db-types="MySQL" scenario-types="db">
+ <test-case sql="SELECT * FROM information_schema.innodb_ft_index_cache" db-types="MySQL" scenario-types="db">
<assertion expected-data-file="select_mysql_information_schema_innodb_ft_index_cache.xml" />
</test-case>
- <test-case sql="select * from information_schema.innodb_ft_index_table;" db-types="MySQL" scenario-types="db">
+ <test-case sql="SELECT * FROM information_schema.innodb_ft_index_table" db-types="MySQL" scenario-types="db">
<assertion expected-data-file="select_mysql_information_schema_innodb_ft_index_table.xml" />
</test-case>
- <test-case sql="select * from information_schema.innodb_lock_waits;" db-types="MySQL" scenario-types="db">
+ <test-case sql="SELECT * FROM information_schema.innodb_lock_waits" db-types="MySQL" scenario-types="db">
<assertion expected-data-file="select_mysql_information_schema_innodb_lock_waits.xml" />
</test-case>
- <test-case sql="select * from information_schema.innodb_locks;" db-types="MySQL" scenario-types="db">
+ <test-case sql="SELECT * FROM information_schema.innodb_locks" db-types="MySQL" scenario-types="db">
<assertion expected-data-file="select_mysql_information_schema_innodb_locks.xml" />
</test-case>
- <test-case sql="select * from information_schema.innodb_metrics;" db-types="MySQL" scenario-types="db">
+ <test-case sql="SELECT * FROM information_schema.innodb_metrics" db-types="MySQL" scenario-types="db">
<assertion expected-data-file="select_mysql_information_schema_innodb_metrics.xml" />
</test-case>
- <test-case sql="select * from information_schema.innodb_sys_columns;" db-types="MySQL" scenario-types="db">
+ <test-case sql="SELECT * FROM information_schema.innodb_sys_columns" db-types="MySQL" scenario-types="db">
<assertion expected-data-file="select_mysql_information_schema_innodb_sys_columns.xml" />
</test-case>
- <test-case sql="select * from information_schema.innodb_sys_datafiles;" db-types="MySQL" scenario-types="db">
+ <test-case sql="SELECT * FROM information_schema.innodb_sys_datafiles" db-types="MySQL" scenario-types="db">
<assertion expected-data-file="select_mysql_information_schema_innodb_sys_datafiles.xml" />
</test-case>
-
- <test-case sql="select * from information_schema.innodb_sys_fields;" db-types="MySQL" scenario-types="db">
+
+ <test-case sql="SELECT * FROM information_schema.innodb_sys_fields" db-types="MySQL" scenario-types="db">
<assertion expected-data-file="select_mysql_information_schema_innodb_sys_fields.xml" />
</test-case>
- <test-case sql="select * from information_schema.innodb_sys_foreign;" db-types="MySQL" scenario-types="db">
+ <test-case sql="SELECT * FROM information_schema.innodb_sys_foreign" db-types="MySQL" scenario-types="db">
<assertion expected-data-file="select_mysql_information_schema_innodb_sys_foreign.xml" />
</test-case>
- <test-case sql="select * from information_schema.innodb_sys_foreign_cols;" db-types="MySQL" scenario-types="db">
+ <test-case sql="SELECT * FROM information_schema.innodb_sys_foreign_cols" db-types="MySQL" scenario-types="db">
<assertion expected-data-file="select_mysql_information_schema_innodb_sys_foreign_cols.xml" />
</test-case>
- <test-case sql="select * from information_schema.innodb_sys_indexes;" db-types="MySQL" scenario-types="db">
+ <test-case sql="SELECT * FROM information_schema.innodb_sys_indexes" db-types="MySQL" scenario-types="db">
<assertion expected-data-file="select_mysql_information_schema_innodb_sys_indexes.xml" />
</test-case>
- <test-case sql="select * from information_schema.innodb_sys_tables;" db-types="MySQL" scenario-types="db">
+ <test-case sql="SELECT * FROM information_schema.innodb_sys_tables" db-types="MySQL" scenario-types="db">
<assertion expected-data-file="select_mysql_information_schema_innodb_sys_tables.xml" />
</test-case>
- <test-case sql="select * from information_schema.innodb_sys_tablespaces;" db-types="MySQL" scenario-types="db">
+ <test-case sql="SELECT * FROM information_schema.innodb_sys_tablespaces" db-types="MySQL" scenario-types="db">
<assertion expected-data-file="select_mysql_information_schema_innodb_sys_tablespaces.xml" />
</test-case>
- <test-case sql="select * from information_schema.innodb_sys_tablestats;" db-types="MySQL" scenario-types="db">
+ <test-case sql="SELECT * FROM information_schema.innodb_sys_tablestats" db-types="MySQL" scenario-types="db">
<assertion expected-data-file="select_mysql_information_schema_innodb_sys_tablestats.xml" />
</test-case>
- <test-case sql="select * from information_schema.innodb_sys_virtual;" db-types="MySQL" scenario-types="db">
+ <test-case sql="SELECT * FROM information_schema.innodb_sys_virtual" db-types="MySQL" scenario-types="db">
<assertion expected-data-file="select_mysql_information_schema_innodb_sys_virtual.xml" />
</test-case>
- <test-case sql="select * from information_schema.innodb_temp_table_info;" db-types="MySQL" scenario-types="db">
+ <test-case sql="SELECT * FROM information_schema.innodb_temp_table_info" db-types="MySQL" scenario-types="db">
<assertion expected-data-file="select_mysql_information_schema_innodb_temp_table_info.xml" />
</test-case>
- <test-case sql="select * from information_schema.innodb_trx;" db-types="MySQL" scenario-types="db">
+ <test-case sql="SELECT * FROM information_schema.innodb_trx" db-types="MySQL" scenario-types="db">
<assertion expected-data-file="select_mysql_information_schema_innodb_trx.xml" />
</test-case>
+ <test-case sql="SELECT * FROM information_schema.key_column_usage" db-types="MySQL" scenario-types="db">
+ <assertion expected-data-file="select_mysql_information_schema_key_column_usage.xml" />
+ </test-case>
+
+ <test-case sql="SELECT * FROM information_schema.optimizer_trace" db-types="MySQL" scenario-types="db">
+ <assertion expected-data-file="select_mysql_information_schema_optimizer_trace.xml" />
+ </test-case>
+
+ <test-case sql="SELECT * FROM information_schema.parameters" db-types="MySQL" scenario-types="db">
+ <assertion expected-data-file="select_mysql_information_schema_parameters.xml" />
+ </test-case>
+
+ <test-case sql="SELECT * FROM information_schema.partitions" db-types="MySQL" scenario-types="db">
+ <assertion expected-data-file="select_mysql_information_schema_partitions.xml" />
+ </test-case>
+
+ <test-case sql="SELECT * FROM information_schema.plugins" db-types="MySQL" scenario-types="db">
+ <assertion expected-data-file="select_mysql_information_schema_plugins.xml" />
+ </test-case>
+
+ <test-case sql="SELECT * FROM information_schema.processlist" db-types="MySQL" scenario-types="db">
+ <assertion expected-data-file="select_mysql_information_schema_processlist.xml" />
+ </test-case>
+
+ <test-case sql="SELECT * FROM information_schema.profiling" db-types="MySQL" scenario-types="db">
+ <assertion expected-data-file="select_mysql_information_schema_profiling.xml" />
+ </test-case>
+
+ <test-case sql="SELECT * FROM information_schema.referential_constraints" db-types="MySQL" scenario-types="db">
+ <assertion expected-data-file="select_mysql_information_schema_referential_constraints.xml" />
+ </test-case>
+
+ <test-case sql="SELECT * FROM information_schema.routines" db-types="MySQL" scenario-types="db">
+ <assertion expected-data-file="select_mysql_information_schema_routines.xml" />
+ </test-case>
+
+ <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>
</integration-test-cases>