This is an automated email from the ASF dual-hosted git repository.
zhangliang 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 16738a55ddd Expanded RQL Scenario IT Case. (#19316)
16738a55ddd is described below
commit 16738a55ddd55fac002101c3d85b4a0b5b8447f8
Author: Jieker <[email protected]>
AuthorDate: Wed Jul 20 11:33:15 2022 +0800
Expanded RQL Scenario IT Case. (#19316)
* feat(integration-test): add some db discovery cases
* feat(integration-test): add some addition cases
---
.../cases/rql/dataset/db/count_database_rules.xml | 32 ++++++++++++++++++++++
.../rql/dataset/db/count_single_table_rule.xml | 25 +++++++++++++++++
.../count_database_rules.xml | 32 ++++++++++++++++++++++
.../count_single_table_rule.xml | 25 +++++++++++++++++
.../count_database_rules.xml | 32 ++++++++++++++++++++++
.../count_single_table_rule.xml | 25 +++++++++++++++++
.../rql/dataset/encrypt/count_database_rules.xml | 32 ++++++++++++++++++++++
.../dataset/encrypt/count_single_table_rule.xml | 25 +++++++++++++++++
.../readwrite_splitting/count_database_rules.xml | 32 ++++++++++++++++++++++
.../count_single_table_rule.xml | 25 +++++++++++++++++
.../mysql/count_database_rules.xml | 32 ++++++++++++++++++++++
.../mysql/count_single_table_rule.xml | 25 +++++++++++++++++
.../mysql/show_discovery_heartbeats.xml | 23 ++++++++++++++++
.../mysql/show_discovery_types.xml | 24 ++++++++++++++++
.../cases/rql/dataset/tbl/count_database_rules.xml | 32 ++++++++++++++++++++++
.../rql/dataset/tbl/count_single_table_rule.xml | 25 +++++++++++++++++
.../cases/rql/rql-integration-test-cases.xml | 16 +++++++++++
17 files changed, 462 insertions(+)
diff --git
a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/rql/dataset/db/count_database_rules.xml
b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/rql/dataset/db/count_database_rules.xml
new file mode 100644
index 00000000000..8ea7b0304d2
--- /dev/null
+++
b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/rql/dataset/db/count_database_rules.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="rule_name"/>
+ <column name="count"/>
+ </metadata>
+ <row values="single_table| 3"/>
+ <row values="sharding_table| 5"/>
+ <row values="sharding_binding_table| 1"/>
+ <row values="sharding_broadcast_table| 2"/>
+ <row values="sharding_scaling| 0"/>
+ <row values="readwrite_splitting| 0"/>
+ <row values="db_discovery| 0"/>
+ <row values="encrypt| 0"/>
+ <row values="shadow| 0"/>
+</dataset>
diff --git
a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/rql/dataset/db/count_single_table_rule.xml
b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/rql/dataset/db/count_single_table_rule.xml
new file mode 100644
index 00000000000..b08b4b3fdfa
--- /dev/null
+++
b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/rql/dataset/db/count_single_table_rule.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="rule_name"/>
+ <column name="database"/>
+ <column name="count"/>
+ </metadata>
+ <row values="single_table| db| 3"/>
+</dataset>
diff --git
a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/rql/dataset/dbtbl_with_readwrite_splitting/count_database_rules.xml
b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/rql/dataset/dbtbl_with_readwrite_splitting/count_database_rules.xml
new file mode 100644
index 00000000000..e4cd47d5a93
--- /dev/null
+++
b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/rql/dataset/dbtbl_with_readwrite_splitting/count_database_rules.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="rule_name"/>
+ <column name="count"/>
+ </metadata>
+ <row values="single_table| 3"/>
+ <row values="sharding_table| 5"/>
+ <row values="sharding_binding_table| 1"/>
+ <row values="sharding_broadcast_table| 2"/>
+ <row values="sharding_scaling| 0"/>
+ <row values="readwrite_splitting| 10"/>
+ <row values="db_discovery| 0"/>
+ <row values="encrypt| 0"/>
+ <row values="shadow| 0"/>
+</dataset>
diff --git
a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/rql/dataset/dbtbl_with_readwrite_splitting/count_single_table_rule.xml
b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/rql/dataset/dbtbl_with_readwrite_splitting/count_single_table_rule.xml
new file mode 100644
index 00000000000..83699a89957
--- /dev/null
+++
b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/rql/dataset/dbtbl_with_readwrite_splitting/count_single_table_rule.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="rule_name"/>
+ <column name="database"/>
+ <column name="count"/>
+ </metadata>
+ <row values="single_table| dbtbl_with_readwrite_splitting| 3"/>
+</dataset>
diff --git
a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/rql/dataset/dbtbl_with_readwrite_splitting_and_encrypt/count_database_rules.xml
b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/rql/dataset/dbtbl_with_readwrite_splitting_and_encrypt/count_database_rules.xml
new file mode 100644
index 00000000000..9a0421c6d57
--- /dev/null
+++
b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/rql/dataset/dbtbl_with_readwrite_splitting_and_encrypt/count_database_rules.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="rule_name"/>
+ <column name="count"/>
+ </metadata>
+ <row values="single_table| 5"/>
+ <row values="sharding_table| 6"/>
+ <row values="sharding_binding_table| 1"/>
+ <row values="sharding_broadcast_table| 0"/>
+ <row values="sharding_scaling| 0"/>
+ <row values="readwrite_splitting| 10"/>
+ <row values="db_discovery| 0"/>
+ <row values="encrypt| 4"/>
+ <row values="shadow| 0"/>
+</dataset>
diff --git
a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/rql/dataset/dbtbl_with_readwrite_splitting_and_encrypt/count_single_table_rule.xml
b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/rql/dataset/dbtbl_with_readwrite_splitting_and_encrypt/count_single_table_rule.xml
new file mode 100644
index 00000000000..23e020f33c2
--- /dev/null
+++
b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/rql/dataset/dbtbl_with_readwrite_splitting_and_encrypt/count_single_table_rule.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="rule_name"/>
+ <column name="database"/>
+ <column name="count"/>
+ </metadata>
+ <row values="single_table| dbtbl_with_readwrite_splitting_and_encrypt| 5"/>
+</dataset>
diff --git
a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/rql/dataset/encrypt/count_database_rules.xml
b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/rql/dataset/encrypt/count_database_rules.xml
new file mode 100644
index 00000000000..290fc889ab2
--- /dev/null
+++
b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/rql/dataset/encrypt/count_database_rules.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="rule_name"/>
+ <column name="count"/>
+ </metadata>
+ <row values="single_table| 3"/>
+ <row values="sharding_table| 0"/>
+ <row values="sharding_binding_table| 0"/>
+ <row values="sharding_broadcast_table| 0"/>
+ <row values="sharding_scaling| 0"/>
+ <row values="readwrite_splitting| 0"/>
+ <row values="db_discovery| 0"/>
+ <row values="encrypt| 2"/>
+ <row values="shadow| 0"/>
+</dataset>
diff --git
a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/rql/dataset/encrypt/count_single_table_rule.xml
b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/rql/dataset/encrypt/count_single_table_rule.xml
new file mode 100644
index 00000000000..6db12414a34
--- /dev/null
+++
b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/rql/dataset/encrypt/count_single_table_rule.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="rule_name"/>
+ <column name="database"/>
+ <column name="count"/>
+ </metadata>
+ <row values="single_table| encrypt| 3"/>
+</dataset>
diff --git
a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/rql/dataset/readwrite_splitting/count_database_rules.xml
b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/rql/dataset/readwrite_splitting/count_database_rules.xml
new file mode 100644
index 00000000000..d96f0550a78
--- /dev/null
+++
b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/rql/dataset/readwrite_splitting/count_database_rules.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="rule_name"/>
+ <column name="count"/>
+ </metadata>
+ <row values="single_table| 1"/>
+ <row values="sharding_table| 3"/>
+ <row values="sharding_binding_table| 1"/>
+ <row values="sharding_broadcast_table| 2"/>
+ <row values="sharding_scaling| 0"/>
+ <row values="readwrite_splitting| 1"/>
+ <row values="db_discovery| 0"/>
+ <row values="encrypt| 0"/>
+ <row values="shadow| 0"/>
+</dataset>
diff --git
a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/rql/dataset/readwrite_splitting/count_single_table_rule.xml
b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/rql/dataset/readwrite_splitting/count_single_table_rule.xml
new file mode 100644
index 00000000000..0fba9672e25
--- /dev/null
+++
b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/rql/dataset/readwrite_splitting/count_single_table_rule.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="rule_name"/>
+ <column name="database"/>
+ <column name="count"/>
+ </metadata>
+ <row values="single_table| readwrite_splitting| 1"/>
+</dataset>
diff --git
a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/rql/dataset/sharding_governance/mysql/count_database_rules.xml
b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/rql/dataset/sharding_governance/mysql/count_database_rules.xml
new file mode 100644
index 00000000000..d96f0550a78
--- /dev/null
+++
b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/rql/dataset/sharding_governance/mysql/count_database_rules.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="rule_name"/>
+ <column name="count"/>
+ </metadata>
+ <row values="single_table| 1"/>
+ <row values="sharding_table| 3"/>
+ <row values="sharding_binding_table| 1"/>
+ <row values="sharding_broadcast_table| 2"/>
+ <row values="sharding_scaling| 0"/>
+ <row values="readwrite_splitting| 1"/>
+ <row values="db_discovery| 0"/>
+ <row values="encrypt| 0"/>
+ <row values="shadow| 0"/>
+</dataset>
diff --git
a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/rql/dataset/sharding_governance/mysql/count_single_table_rule.xml
b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/rql/dataset/sharding_governance/mysql/count_single_table_rule.xml
new file mode 100644
index 00000000000..b08b4b3fdfa
--- /dev/null
+++
b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/rql/dataset/sharding_governance/mysql/count_single_table_rule.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="rule_name"/>
+ <column name="database"/>
+ <column name="count"/>
+ </metadata>
+ <row values="single_table| db| 3"/>
+</dataset>
diff --git
a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/rql/dataset/sharding_governance/mysql/show_discovery_heartbeats.xml
b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/rql/dataset/sharding_governance/mysql/show_discovery_heartbeats.xml
new file mode 100644
index 00000000000..c6634b7b3b2
--- /dev/null
+++
b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/rql/dataset/sharding_governance/mysql/show_discovery_heartbeats.xml
@@ -0,0 +1,23 @@
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one or more
+ ~ contributor license agreements. See the NOTICE file distributed with
+ ~ this work for additional information regarding copyright ownership.
+ ~ The ASF licenses this file to You under the Apache License, Version 2.0
+ ~ (the "License"); you may not use this file except in compliance with
+ ~ the License. You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ -->
+
+<dataset>
+ <metadata>
+ <column name="name" />
+ <column name="props" />
+ </metadata>
+</dataset>
diff --git
a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/rql/dataset/sharding_governance/mysql/show_discovery_types.xml
b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/rql/dataset/sharding_governance/mysql/show_discovery_types.xml
new file mode 100644
index 00000000000..8af51b212cc
--- /dev/null
+++
b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/rql/dataset/sharding_governance/mysql/show_discovery_types.xml
@@ -0,0 +1,24 @@
+<!--
+ ~ 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="name" />
+ <column name="type" />
+ <column name="props" />
+ </metadata>
+</dataset>
diff --git
a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/rql/dataset/tbl/count_database_rules.xml
b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/rql/dataset/tbl/count_database_rules.xml
new file mode 100644
index 00000000000..15ea5138146
--- /dev/null
+++
b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/rql/dataset/tbl/count_database_rules.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="rule_name"/>
+ <column name="count"/>
+ </metadata>
+ <row values="single_table| 1"/>
+ <row values="sharding_table| 5"/>
+ <row values="sharding_binding_table| 1"/>
+ <row values="sharding_broadcast_table| 2"/>
+ <row values="sharding_scaling| 0"/>
+ <row values="readwrite_splitting| 0"/>
+ <row values="db_discovery| 0"/>
+ <row values="encrypt| 0"/>
+ <row values="shadow| 0"/>
+</dataset>
diff --git
a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/rql/dataset/tbl/count_single_table_rule.xml
b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/rql/dataset/tbl/count_single_table_rule.xml
new file mode 100644
index 00000000000..7913d252c80
--- /dev/null
+++
b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/rql/dataset/tbl/count_single_table_rule.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="rule_name"/>
+ <column name="database"/>
+ <column name="count"/>
+ </metadata>
+ <row values="single_table| tbl| 1"/>
+</dataset>
diff --git
a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/rql/rql-integration-test-cases.xml
b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/rql/rql-integration-test-cases.xml
index addb19d0d30..de487c29d26 100644
---
a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/rql/rql-integration-test-cases.xml
+++
b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/rql/rql-integration-test-cases.xml
@@ -97,6 +97,10 @@
<assertion expected-data-file="show_single_tables.xml" />
</test-case>
+ <test-case sql="COUNT SINGLE_TABLE RULE"
scenario-types="db,tbl,readwrite_splitting,encrypt,dbtbl_with_readwrite_splitting,dbtbl_with_readwrite_splitting_and_encrypt">
+ <assertion expected-data-file="count_single_table_rule.xml" />
+ </test-case>
+
<test-case sql="SHOW READWRITE_SPLITTING RULES"
scenario-types="dbtbl_with_readwrite_splitting,readwrite_splitting,dbtbl_with_readwrite_splitting_and_encrypt">
<assertion expected-data-file="show_readwrite_splitting_rules.xml" />
</test-case>
@@ -113,4 +117,16 @@
<test-case sql="SHOW DB_DISCOVERY RULES"
scenario-types="sharding_governance">
<assertion expected-data-file="show_discovery_rules.xml" />
</test-case>
+
+ <test-case sql="SHOW DB_DISCOVERY TYPES"
scenario-types="sharding_governance">
+ <assertion expected-data-file="show_discovery_types.xml" />
+ </test-case>
+
+ <test-case sql="SHOW DB_DISCOVERY HEARTBEATS"
scenario-types="sharding_governance">
+ <assertion expected-data-file="show_discovery_heartbeats.xml" />
+ </test-case>
+
+ <test-case sql="COUNT DATABASE RULES"
scenario-types="db,tbl,readwrite_splitting,encrypt,dbtbl_with_readwrite_splitting,dbtbl_with_readwrite_splitting_and_encrypt">
+ <assertion expected-data-file="count_database_rules.xml" />
+ </test-case>
</integration-test-cases>