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 338353ce3ff add shardingsphere built in database - 1 (#21269)
338353ce3ff is described below
commit 338353ce3ffa0176c9010f3737fb124c61273f36
Author: Chuxin Chen <[email protected]>
AuthorDate: Fri Sep 30 17:43:45 2022 +0800
add shardingsphere built in database - 1 (#21269)
* use yaml to simulate sharding sphere built in table
* use yaml to simulate sharding sphere built in table
* use yaml to simulate sharding sphere built in table
* use yaml to simulate sharding sphere built in table
* use yaml to simulate sharding sphere built in table
* use yaml to simulate sharding sphere built in table
* use yaml to simulate sharding sphere built in table
---
.../database/type/dialect/MySQLDatabaseType.java | 1 +
.../type/dialect/OpenGaussDatabaseType.java | 2 +-
.../type/dialect/PostgreSQLDatabaseType.java | 2 +-
.../schema/builder/SystemSchemaBuilderRule.java | 8 ++-
.../shardingsphere/sharding_statistics_table.yaml | 62 ++++++++++++++++++++++
.../shardingsphere/sharding_statistics_table.yaml | 62 ++++++++++++++++++++++
.../shardingsphere/sharding_statistics_table.yaml | 62 ++++++++++++++++++++++
.../type/dialect/MySQLDatabaseTypeTest.java | 3 +-
.../type/dialect/PostgreSQLDatabaseTypeTest.java | 2 +-
.../schema/builder/SystemSchemaBuilderTest.java | 4 +-
.../cases/dal/dataset/db/mysql/show_databases.xml | 5 +-
.../mysql/show_databases.xml | 5 +-
.../mysql/show_databases.xml | 3 +-
.../dal/dataset/encrypt/mysql/show_databases.xml | 5 +-
.../mysql/show_databases.xml | 3 +-
.../readwrite_splitting/mysql/show_databases.xml | 3 +-
.../sharding_and_encrypt/mysql/show_databases.xml | 3 +-
.../sharding_governance/mysql/show_databases.xml | 5 +-
.../cases/dal/dataset/tbl/mysql/show_databases.xml | 5 +-
19 files changed, 225 insertions(+), 20 deletions(-)
diff --git
a/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/database/type/dialect/MySQLDatabaseType.java
b/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/database/type/dialect/MySQLDatabaseType.java
index 5e626112ff3..f1d10fd1a62 100644
---
a/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/database/type/dialect/MySQLDatabaseType.java
+++
b/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/database/type/dialect/MySQLDatabaseType.java
@@ -39,6 +39,7 @@ public final class MySQLDatabaseType implements DatabaseType {
SYSTEM_DATABASE_SCHEMA_MAP.put("performance_schema",
Collections.singletonList("performance_schema"));
SYSTEM_DATABASE_SCHEMA_MAP.put("mysql",
Collections.singletonList("mysql"));
SYSTEM_DATABASE_SCHEMA_MAP.put("sys",
Collections.singletonList("sys"));
+ SYSTEM_DATABASE_SCHEMA_MAP.put("shardingsphere",
Collections.singletonList("shardingsphere"));
}
@Override
diff --git
a/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/database/type/dialect/OpenGaussDatabaseType.java
b/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/database/type/dialect/OpenGaussDatabaseType.java
index 1784fef50c4..f461249d7b6 100644
---
a/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/database/type/dialect/OpenGaussDatabaseType.java
+++
b/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/database/type/dialect/OpenGaussDatabaseType.java
@@ -42,7 +42,7 @@ public final class OpenGaussDatabaseType implements
SchemaSupportedDatabaseType
private static final Map<String, Collection<String>>
SYSTEM_DATABASE_SCHEMA_MAP = new HashMap<>();
private static final Collection<String> SYSTEM_SCHEMAS = new
HashSet<>(Arrays.asList("information_schema", "pg_catalog",
- "blockchain", "cstore", "db4ai", "dbe_perf", "dbe_pldebugger",
"gaussdb", "oracle", "pkg_service", "snapshot", "sqladvisor",
"dbe_pldeveloper", "pg_toast", "pkg_util"));
+ "blockchain", "cstore", "db4ai", "dbe_perf", "dbe_pldebugger",
"gaussdb", "oracle", "pkg_service", "snapshot", "sqladvisor",
"dbe_pldeveloper", "pg_toast", "pkg_util", "shardingsphere"));
static {
SYSTEM_DATABASE_SCHEMA_MAP.put("postgres", SYSTEM_SCHEMAS);
diff --git
a/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/database/type/dialect/PostgreSQLDatabaseType.java
b/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/database/type/dialect/PostgreSQLDatabaseType.java
index 7e83b6ba356..4136f53cfb2 100644
---
a/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/database/type/dialect/PostgreSQLDatabaseType.java
+++
b/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/database/type/dialect/PostgreSQLDatabaseType.java
@@ -41,7 +41,7 @@ public final class PostgreSQLDatabaseType implements
SchemaSupportedDatabaseType
private static final Map<String, Collection<String>>
SYSTEM_DATABASE_SCHEMA_MAP = new HashMap<>();
- private static final Collection<String> SYSTEM_SCHEMAS = new
HashSet<>(Arrays.asList("information_schema", "pg_catalog"));
+ private static final Collection<String> SYSTEM_SCHEMAS = new
HashSet<>(Arrays.asList("information_schema", "pg_catalog", "shardingsphere"));
static {
SYSTEM_DATABASE_SCHEMA_MAP.put("postgres", SYSTEM_SCHEMAS);
diff --git
a/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/metadata/database/schema/builder/SystemSchemaBuilderRule.java
b/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/metadata/database/schema/builder/SystemSchemaBuilderRule.java
index bbdea445865..d6dba8ca6ef 100644
---
a/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/metadata/database/schema/builder/SystemSchemaBuilderRule.java
+++
b/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/metadata/database/schema/builder/SystemSchemaBuilderRule.java
@@ -44,10 +44,14 @@ public enum SystemSchemaBuilderRule {
MYSQL_SYS("MySQL", "sys", new HashSet<>(Collections.singleton("sys"))),
+ MYSQL_SHARDING_SPHERE("MySQL", "shardingsphere", new
HashSet<>(Collections.singleton("sharding_statistics_table"))),
+
POSTGRESQL_INFORMATION_SCHEMA("PostgreSQL", "information_schema", new
HashSet<>(Arrays.asList("columns", "tables", "views"))),
POSTGRESQL_PG_CATALOG("PostgreSQL", "pg_catalog", new
HashSet<>(Arrays.asList("pg_class", "pg_database", "pg_inherits",
"pg_tablespace", "pg_trigger"))),
+ POSTGRESQL_SHARDING_SPHERE("PostgreSQL", "shardingsphere", new
HashSet<>(Collections.singleton("sharding_statistics_table"))),
+
OPEN_GAUSS_INFORMATION_SCHEMA("openGauss", "information_schema",
Collections.emptySet()),
OPEN_GAUSS_PG_CATALOG("openGauss", "pg_catalog", Collections.emptySet()),
@@ -76,7 +80,9 @@ public enum SystemSchemaBuilderRule {
OPEN_GAUSS_pkg_util("openGauss", "pkg_util", Collections.emptySet()),
- OPEN_GAUSS_SQLADVISOR("openGauss", "sqladvisor", Collections.emptySet());
+ OPEN_GAUSS_SQLADVISOR("openGauss", "sqladvisor", Collections.emptySet()),
+
+ OPEN_GAUSS_SHARDING_SPHERE("openGauss", "shardingsphere", new
HashSet<>(Collections.singleton("sharding_statistics_table")));
private static final Map<String, SystemSchemaBuilderRule>
SCHEMA_PATH_SYSTEM_SCHEMA_BUILDER_RULE_MAP = new HashMap<>(values().length, 1);
diff --git
a/shardingsphere-infra/shardingsphere-infra-common/src/main/resources/schema/mysql/shardingsphere/sharding_statistics_table.yaml
b/shardingsphere-infra/shardingsphere-infra-common/src/main/resources/schema/mysql/shardingsphere/sharding_statistics_table.yaml
new file mode 100644
index 00000000000..14e8874962f
--- /dev/null
+++
b/shardingsphere-infra/shardingsphere-infra-common/src/main/resources/schema/mysql/shardingsphere/sharding_statistics_table.yaml
@@ -0,0 +1,62 @@
+#
+# 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: sharding_statistics_table
+
+columns:
+ id:
+ caseSensitive: false
+ dataType: 4
+ generated: false
+ name: id
+ primaryKey: true
+ logic_database_name:
+ caseSensitive: false
+ dataType: 12
+ generated: false
+ name: logic_database_name
+ primaryKey: false
+ logic_table_name:
+ caseSensitive: false
+ dataType: 12
+ generated: false
+ name: logic_table_name
+ primaryKey: false
+ actual_database_name:
+ caseSensitive: false
+ dataType: 12
+ generated: false
+ name: actual_database_name
+ primaryKey: false
+ actual_table_name:
+ caseSensitive: false
+ dataType: 12
+ generated: false
+ name: actual_table_name
+ primaryKey: false
+ row_count:
+ caseSensitive: false
+ dataType: -5
+ generated: false
+ name: row_count
+ primaryKey: false
+ size:
+ caseSensitive: false
+ dataType: -5
+ generated: false
+ name: size
+ primaryKey: false
diff --git
a/shardingsphere-infra/shardingsphere-infra-common/src/main/resources/schema/opengauss/shardingsphere/sharding_statistics_table.yaml
b/shardingsphere-infra/shardingsphere-infra-common/src/main/resources/schema/opengauss/shardingsphere/sharding_statistics_table.yaml
new file mode 100644
index 00000000000..14e8874962f
--- /dev/null
+++
b/shardingsphere-infra/shardingsphere-infra-common/src/main/resources/schema/opengauss/shardingsphere/sharding_statistics_table.yaml
@@ -0,0 +1,62 @@
+#
+# 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: sharding_statistics_table
+
+columns:
+ id:
+ caseSensitive: false
+ dataType: 4
+ generated: false
+ name: id
+ primaryKey: true
+ logic_database_name:
+ caseSensitive: false
+ dataType: 12
+ generated: false
+ name: logic_database_name
+ primaryKey: false
+ logic_table_name:
+ caseSensitive: false
+ dataType: 12
+ generated: false
+ name: logic_table_name
+ primaryKey: false
+ actual_database_name:
+ caseSensitive: false
+ dataType: 12
+ generated: false
+ name: actual_database_name
+ primaryKey: false
+ actual_table_name:
+ caseSensitive: false
+ dataType: 12
+ generated: false
+ name: actual_table_name
+ primaryKey: false
+ row_count:
+ caseSensitive: false
+ dataType: -5
+ generated: false
+ name: row_count
+ primaryKey: false
+ size:
+ caseSensitive: false
+ dataType: -5
+ generated: false
+ name: size
+ primaryKey: false
diff --git
a/shardingsphere-infra/shardingsphere-infra-common/src/main/resources/schema/postgresql/shardingsphere/sharding_statistics_table.yaml
b/shardingsphere-infra/shardingsphere-infra-common/src/main/resources/schema/postgresql/shardingsphere/sharding_statistics_table.yaml
new file mode 100644
index 00000000000..14e8874962f
--- /dev/null
+++
b/shardingsphere-infra/shardingsphere-infra-common/src/main/resources/schema/postgresql/shardingsphere/sharding_statistics_table.yaml
@@ -0,0 +1,62 @@
+#
+# 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: sharding_statistics_table
+
+columns:
+ id:
+ caseSensitive: false
+ dataType: 4
+ generated: false
+ name: id
+ primaryKey: true
+ logic_database_name:
+ caseSensitive: false
+ dataType: 12
+ generated: false
+ name: logic_database_name
+ primaryKey: false
+ logic_table_name:
+ caseSensitive: false
+ dataType: 12
+ generated: false
+ name: logic_table_name
+ primaryKey: false
+ actual_database_name:
+ caseSensitive: false
+ dataType: 12
+ generated: false
+ name: actual_database_name
+ primaryKey: false
+ actual_table_name:
+ caseSensitive: false
+ dataType: 12
+ generated: false
+ name: actual_table_name
+ primaryKey: false
+ row_count:
+ caseSensitive: false
+ dataType: -5
+ generated: false
+ name: row_count
+ primaryKey: false
+ size:
+ caseSensitive: false
+ dataType: -5
+ generated: false
+ name: size
+ primaryKey: false
diff --git
a/shardingsphere-infra/shardingsphere-infra-common/src/test/java/org/apache/shardingsphere/infra/database/type/dialect/MySQLDatabaseTypeTest.java
b/shardingsphere-infra/shardingsphere-infra-common/src/test/java/org/apache/shardingsphere/infra/database/type/dialect/MySQLDatabaseTypeTest.java
index a3a29988aa9..2501e9052f0 100644
---
a/shardingsphere-infra/shardingsphere-infra-common/src/test/java/org/apache/shardingsphere/infra/database/type/dialect/MySQLDatabaseTypeTest.java
+++
b/shardingsphere-infra/shardingsphere-infra-common/src/test/java/org/apache/shardingsphere/infra/database/type/dialect/MySQLDatabaseTypeTest.java
@@ -52,10 +52,11 @@ public final class MySQLDatabaseTypeTest {
assertTrue(new
MySQLDatabaseType().getSystemDatabaseSchemaMap().containsKey("performance_schema"));
assertTrue(new
MySQLDatabaseType().getSystemDatabaseSchemaMap().containsKey("mysql"));
assertTrue(new
MySQLDatabaseType().getSystemDatabaseSchemaMap().containsKey("sys"));
+ assertTrue(new
MySQLDatabaseType().getSystemDatabaseSchemaMap().containsKey("shardingsphere"));
}
@Test
public void assertGetSystemSchemas() {
- assertThat(new MySQLDatabaseType().getSystemSchemas(), is(new
HashSet<>(Arrays.asList("information_schema", "performance_schema", "mysql",
"sys"))));
+ assertThat(new MySQLDatabaseType().getSystemSchemas(), is(new
HashSet<>(Arrays.asList("information_schema", "performance_schema", "mysql",
"sys", "shardingsphere"))));
}
}
diff --git
a/shardingsphere-infra/shardingsphere-infra-common/src/test/java/org/apache/shardingsphere/infra/database/type/dialect/PostgreSQLDatabaseTypeTest.java
b/shardingsphere-infra/shardingsphere-infra-common/src/test/java/org/apache/shardingsphere/infra/database/type/dialect/PostgreSQLDatabaseTypeTest.java
index f93b275d020..56a59f6a00d 100644
---
a/shardingsphere-infra/shardingsphere-infra-common/src/test/java/org/apache/shardingsphere/infra/database/type/dialect/PostgreSQLDatabaseTypeTest.java
+++
b/shardingsphere-infra/shardingsphere-infra-common/src/test/java/org/apache/shardingsphere/infra/database/type/dialect/PostgreSQLDatabaseTypeTest.java
@@ -80,7 +80,7 @@ public final class PostgreSQLDatabaseTypeTest {
@Test
public void assertGetSystemSchemas() {
- assertThat(new PostgreSQLDatabaseType().getSystemSchemas(), is(new
HashSet<>(Arrays.asList("information_schema", "pg_catalog"))));
+ assertThat(new PostgreSQLDatabaseType().getSystemSchemas(), is(new
HashSet<>(Arrays.asList("information_schema", "pg_catalog",
"shardingsphere"))));
}
@Test
diff --git
a/shardingsphere-infra/shardingsphere-infra-common/src/test/java/org/apache/shardingsphere/infra/metadata/database/schema/builder/SystemSchemaBuilderTest.java
b/shardingsphere-infra/shardingsphere-infra-common/src/test/java/org/apache/shardingsphere/infra/metadata/database/schema/builder/SystemSchemaBuilderTest.java
index bb2a75ae74a..9c928c6bf1a 100644
---
a/shardingsphere-infra/shardingsphere-infra-common/src/test/java/org/apache/shardingsphere/infra/metadata/database/schema/builder/SystemSchemaBuilderTest.java
+++
b/shardingsphere-infra/shardingsphere-infra-common/src/test/java/org/apache/shardingsphere/infra/metadata/database/schema/builder/SystemSchemaBuilderTest.java
@@ -41,10 +41,12 @@ public final class SystemSchemaBuilderTest {
@Test
public void assertBuildForPostgreSQL() {
Map<String, ShardingSphereSchema> actual =
SystemSchemaBuilder.build("sharding_db", new PostgreSQLDatabaseType());
- assertThat(actual.size(), is(2));
+ assertThat(actual.size(), is(3));
assertTrue(actual.containsKey("information_schema"));
assertTrue(actual.containsKey("pg_catalog"));
+ assertTrue(actual.containsKey("shardingsphere"));
assertThat(actual.get("information_schema").getTables().size(), is(3));
assertThat(actual.get("pg_catalog").getTables().size(), is(5));
+ assertThat(actual.get("shardingsphere").getTables().size(), is(1));
}
}
diff --git
a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dal/dataset/db/mysql/show_databases.xml
b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dal/dataset/db/mysql/show_databases.xml
index e781a7b14f8..13290bc2827 100644
---
a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dal/dataset/db/mysql/show_databases.xml
+++
b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dal/dataset/db/mysql/show_databases.xml
@@ -19,9 +19,10 @@
<metadata>
<column name="schema_name" />
</metadata>
- <row values="db" />
<row values="information_schema" />
<row values="performance_schema" />
- <row values="mysql" />
<row values="sys" />
+ <row values="shardingsphere" />
+ <row values="mysql" />
+ <row values="db" />
</dataset>
diff --git
a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dal/dataset/dbtbl_with_readwrite_splitting/mysql/show_databases.xml
b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dal/dataset/dbtbl_with_readwrite_splitting/mysql/show_databases.xml
index 9e95dd770e9..b3ee8fb4c60 100644
---
a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dal/dataset/dbtbl_with_readwrite_splitting/mysql/show_databases.xml
+++
b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dal/dataset/dbtbl_with_readwrite_splitting/mysql/show_databases.xml
@@ -19,9 +19,10 @@
<metadata>
<column name="schema_name" />
</metadata>
- <row values="dbtbl_with_readwrite_splitting" />
<row values="information_schema" />
<row values="performance_schema" />
- <row values="mysql" />
<row values="sys" />
+ <row values="dbtbl_with_readwrite_splitting" />
+ <row values="shardingsphere" />
+ <row values="mysql" />
</dataset>
diff --git
a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dal/dataset/dbtbl_with_readwrite_splitting_and_encrypt/mysql/show_databases.xml
b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dal/dataset/dbtbl_with_readwrite_splitting_and_encrypt/mysql/show_databases.xml
index 6c82fe5a8ca..2e9a88127aa 100644
---
a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dal/dataset/dbtbl_with_readwrite_splitting_and_encrypt/mysql/show_databases.xml
+++
b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dal/dataset/dbtbl_with_readwrite_splitting_and_encrypt/mysql/show_databases.xml
@@ -22,6 +22,7 @@
<row values="dbtbl_with_readwrite_splitting_and_encrypt" />
<row values="information_schema" />
<row values="performance_schema" />
- <row values="mysql" />
<row values="sys" />
+ <row values="shardingsphere" />
+ <row values="mysql" />
</dataset>
diff --git
a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dal/dataset/encrypt/mysql/show_databases.xml
b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dal/dataset/encrypt/mysql/show_databases.xml
index 52ed5f58683..bbc061af811 100644
---
a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dal/dataset/encrypt/mysql/show_databases.xml
+++
b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dal/dataset/encrypt/mysql/show_databases.xml
@@ -19,9 +19,10 @@
<metadata>
<column name="schema_name" />
</metadata>
- <row values="encrypt" />
<row values="information_schema" />
<row values="performance_schema" />
- <row values="mysql" />
<row values="sys" />
+ <row values="shardingsphere" />
+ <row values="encrypt" />
+ <row values="mysql" />
</dataset>
diff --git
a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dal/dataset/encrypt_and_readwrite_splitting/mysql/show_databases.xml
b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dal/dataset/encrypt_and_readwrite_splitting/mysql/show_databases.xml
index 255ae25bd51..c901eabd41c 100644
---
a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dal/dataset/encrypt_and_readwrite_splitting/mysql/show_databases.xml
+++
b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dal/dataset/encrypt_and_readwrite_splitting/mysql/show_databases.xml
@@ -22,6 +22,7 @@
<row values="information_schema" />
<row values="performance_schema" />
<row values="encrypt_and_readwrite_splitting" />
- <row values="mysql" />
<row values="sys" />
+ <row values="shardingsphere" />
+ <row values="mysql" />
</dataset>
diff --git
a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dal/dataset/readwrite_splitting/mysql/show_databases.xml
b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dal/dataset/readwrite_splitting/mysql/show_databases.xml
index 3a86c6f9fc8..bd9b4f4af8f 100644
---
a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dal/dataset/readwrite_splitting/mysql/show_databases.xml
+++
b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dal/dataset/readwrite_splitting/mysql/show_databases.xml
@@ -21,7 +21,8 @@
</metadata>
<row values="information_schema" />
<row values="performance_schema" />
+ <row values="sys" />
+ <row values="shardingsphere" />
<row values="readwrite_splitting" />
<row values="mysql" />
- <row values="sys" />
</dataset>
diff --git
a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dal/dataset/sharding_and_encrypt/mysql/show_databases.xml
b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dal/dataset/sharding_and_encrypt/mysql/show_databases.xml
index 7e9adf115dc..769e9393476 100644
---
a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dal/dataset/sharding_and_encrypt/mysql/show_databases.xml
+++
b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dal/dataset/sharding_and_encrypt/mysql/show_databases.xml
@@ -21,7 +21,8 @@
</metadata>
<row values="information_schema" />
<row values="performance_schema" />
+ <row values="sys" />
+ <row values="shardingsphere" />
<row values="sharding_and_encrypt" />
<row values="mysql" />
- <row values="sys" />
</dataset>
diff --git
a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dal/dataset/sharding_governance/mysql/show_databases.xml
b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dal/dataset/sharding_governance/mysql/show_databases.xml
index 4bd1cb613dc..2b1af7259c7 100644
---
a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dal/dataset/sharding_governance/mysql/show_databases.xml
+++
b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dal/dataset/sharding_governance/mysql/show_databases.xml
@@ -19,9 +19,10 @@
<metadata>
<column name="schema_name" />
</metadata>
- <row values="sharding_governance" />
<row values="information_schema" />
<row values="performance_schema" />
- <row values="mysql" />
<row values="sys" />
+ <row values="shardingsphere" />
+ <row values="sharding_governance" />
+ <row values="mysql" />
</dataset>
diff --git
a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dal/dataset/tbl/mysql/show_databases.xml
b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dal/dataset/tbl/mysql/show_databases.xml
index e60d4eb0a15..1ed1262774c 100644
---
a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dal/dataset/tbl/mysql/show_databases.xml
+++
b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dal/dataset/tbl/mysql/show_databases.xml
@@ -19,9 +19,10 @@
<metadata>
<column name="schema_name" />
</metadata>
- <row values="tbl" />
<row values="information_schema" />
<row values="performance_schema" />
- <row values="mysql" />
<row values="sys" />
+ <row values="shardingsphere" />
+ <row values="mysql" />
+ <row values="tbl" />
</dataset>