You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by zh...@apache.org on 2026/06/30 09:42:34 UTC
(shardingsphere) branch master updated: Fix documentation examples and DistSQL syntax (#38968)
This is an automated email from the ASF dual-hosted git repository.
terrymanu 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 61017bba021 Fix documentation examples and DistSQL syntax (#38968)
61017bba021 is described below
commit 61017bba0214129805797ec06fc57572b04aac00
Author: Liang Zhang <zh...@apache.org>
AuthorDate: Tue Jun 30 17:42:26 2026 +0800
Fix documentation examples and DistSQL syntax (#38968)
* Fix documentation examples and DistSQL syntax
- Correct Java API algorithm examples and AlgorithmConfiguration fields
- Align DistSQL grammar docs with parser rules for sharding, encrypt, mask, shadow, and migration
- Fix RQL/RAL result examples, row counts, and CDC documentation wording
* Fix documentation examples and DistSQL syntax
- Correct Java API algorithm examples and AlgorithmConfiguration fields
- Align DistSQL grammar docs with parser rules for sharding, encrypt, mask, shadow, and migration
- Fix RQL/RAL result examples, row counts, and CDC documentation wording
---
.../java-api/rules/encrypt.cn.md | 14 +++----
.../java-api/rules/encrypt.en.md | 14 +++----
.../shardingsphere-jdbc/java-api/rules/mask.cn.md | 9 ++--
.../shardingsphere-jdbc/java-api/rules/mask.en.md | 9 ++--
.../shardingsphere-jdbc/java-api/rules/mix.cn.md | 11 +++--
.../shardingsphere-jdbc/java-api/rules/mix.en.md | 11 +++--
.../java-api/rules/sharding.cn.md | 8 ++--
.../java-api/rules/sharding.en.md | 8 ++--
.../shardingsphere-proxy/cdc/build.cn.md | 41 +-----------------
.../shardingsphere-proxy/cdc/build.en.md | 40 +-----------------
.../shardingsphere-proxy/cdc/usage.cn.md | 3 +-
.../shardingsphere-proxy/cdc/usage.en.md | 3 +-
...show-status-from-readwrite-splitting-rule.cn.md | 8 ++--
...show-status-from-readwrite-splitting-rule.en.md | 8 ++--
.../ral/global-rule/alter-transaction-rule.cn.md | 2 +-
.../ral/global-rule/alter-transaction-rule.en.md | 2 +-
.../ral/migration/alter-migration-rule.cn.md | 9 ++--
.../ral/migration/alter-migration-rule.en.md | 9 ++--
.../syntax/ral/migration/check-migration.cn.md | 26 ++++++++----
.../syntax/ral/migration/check-migration.en.md | 26 ++++++++----
.../register-migration-source-storage-unit.cn.md | 2 +-
.../register-migration-source-storage-unit.en.md | 4 +-
.../syntax/ral/migration/show-migration-list.cn.md | 2 +-
.../syntax/ral/migration/show-migration-list.en.md | 2 +-
.../ral/migration/start-migration-check.en.md | 4 +-
.../syntax/ral/migration/start-migration.cn.md | 4 +-
.../distsql/syntax/ral/show-table-metadata.cn.md | 48 +++++++++++-----------
.../distsql/syntax/ral/show-table-metadata.en.md | 48 +++++++++++-----------
.../encrypt/alter-encrypt-rule.cn.md | 8 ++--
.../encrypt/alter-encrypt-rule.en.md | 8 ++--
.../encrypt/create-encrypt-rule.cn.md | 8 ++--
.../encrypt/create-encrypt-rule.en.md | 8 ++--
.../rdl/rule-definition/mask/alter-mask-rule.cn.md | 2 +-
.../rdl/rule-definition/mask/alter-mask-rule.en.md | 4 +-
.../rule-definition/mask/create-mask-rule.cn.md | 2 +-
.../rule-definition/mask/create-mask-rule.en.md | 2 +-
.../alter-readwrite-splitting-rule.cn.md | 2 +-
.../alter-readwrite-splitting-rule.en.md | 2 +-
.../create-readwrite-splitting-rule.cn.md | 2 +-
.../create-readwrite-splitting-rule.en.md | 2 +-
.../shadow/alter-default-shadow-algorithm.cn.md | 2 +-
.../shadow/alter-default-shadow-algorithm.en.md | 2 +-
.../rule-definition/shadow/alter-shadow-rule.cn.md | 4 +-
.../rule-definition/shadow/alter-shadow-rule.en.md | 4 +-
.../shadow/create-default-shadow-algorithm.cn.md | 2 +-
.../shadow/create-default-shadow-algorithm.en.md | 2 +-
.../shadow/create-shadow-rule.cn.md | 4 +-
.../shadow/create-shadow-rule.en.md | 4 +-
.../sharding/alter-default-sharding-strategy.cn.md | 13 +++---
.../sharding/alter-default-sharding-strategy.en.md | 13 +++---
.../alter-sharding-key-generate-strategy.cn.md | 2 +-
.../alter-sharding-key-generate-strategy.en.md | 2 +-
.../sharding/alter-sharding-key-generator.cn.md | 2 +-
.../sharding/alter-sharding-key-generator.en.md | 2 +-
.../sharding/alter-sharding-table-rule.cn.md | 20 +++++----
.../sharding/alter-sharding-table-rule.en.md | 22 +++++-----
.../create-default-sharding-strategy.cn.md | 13 +++---
.../create-default-sharding-strategy.en.md | 13 +++---
.../create-sharding-key-generate-strategy.cn.md | 2 +-
.../create-sharding-key-generate-strategy.en.md | 2 +-
.../sharding/create-sharding-key-generator.cn.md | 2 +-
.../sharding/create-sharding-key-generator.en.md | 2 +-
.../sharding/create-sharding-table-rule.cn.md | 20 +++++----
.../sharding/create-sharding-table-rule.en.md | 22 +++++-----
.../broadcast-table/count-broadcast-rule.cn.md | 4 +-
.../broadcast-table/count-broadcast-rule.en.md | 4 +-
.../rql/rule-query/mask/show-mask-rule.cn.md | 2 +-
.../rql/rule-query/mask/show-mask-rule.en.md | 2 +-
.../sharding/show-sharding-table-rule.cn.md | 36 ++++++++--------
.../sharding/show-sharding-table-rule.en.md | 34 +++++++--------
.../single-table/count-single-table.cn.md | 19 +++++----
.../single-table/count-single-table.en.md | 19 +++++----
.../show-default-single-table-storage-unit.cn.md | 5 +--
.../show-default-single-table-storage-unit.en.md | 4 +-
.../single-table/show-single-table.cn.md | 9 ++--
.../single-table/show-single-table.en.md | 1 +
.../show-rules-used-storage-unit.cn.md | 6 +--
.../show-rules-used-storage-unit.en.md | 6 +--
.../storage-unit-query/show-storage-units.cn.md | 2 +-
.../storage-unit-query/show-storage-units.en.md | 2 +-
80 files changed, 355 insertions(+), 401 deletions(-)
diff --git a/docs/document/content/user-manual/shardingsphere-jdbc/java-api/rules/encrypt.cn.md b/docs/document/content/user-manual/shardingsphere-jdbc/java-api/rules/encrypt.cn.md
index 224c63215c6..3d7d14b0c98 100644
--- a/docs/document/content/user-manual/shardingsphere-jdbc/java-api/rules/encrypt.cn.md
+++ b/docs/document/content/user-manual/shardingsphere-jdbc/java-api/rules/encrypt.cn.md
@@ -61,11 +61,10 @@ weight = 5
可配置属性:
-| *名称* | *数据类型* | *说明* |
-|------------|------------|-----------|
-| name | String | 加解密算法名称 |
-| type | String | 加解密算法类型 |
-| properties | Properties | 加解密算法属性配置 |
+| *名称* | *数据类型* | *说明* |
+|------|------------|-----------|
+| type | String | 加解密算法类型 |
+| props | Properties | 加解密算法属性配置 |
算法类型的详情,请参见[内置加密算法列表](/cn/user-manual/common-config/builtin-algorithm/encrypt)。
@@ -86,11 +85,12 @@ public final class EncryptDatabasesConfiguration {
props.setProperty("digest-algorithm-name", "SHA-1");
EncryptColumnRuleConfiguration columnConfigAes = new EncryptColumnRuleConfiguration("username", new EncryptColumnItemRuleConfiguration("username", "name_encryptor"));
EncryptColumnRuleConfiguration columnConfigTest = new EncryptColumnRuleConfiguration("pwd", new EncryptColumnItemRuleConfiguration("pwd", "pwd_encryptor"));
- columnConfigTest.setAssistedQuery(new EncryptColumnItemRuleConfiguration("assisted_query_pwd", "pwd_encryptor"));
+ columnConfigTest.setAssistedQuery(new EncryptColumnItemRuleConfiguration("assisted_query_pwd", "pwd_assisted_encryptor"));
EncryptTableRuleConfiguration encryptTableRuleConfig = new EncryptTableRuleConfiguration("t_user", Arrays.asList(columnConfigAes, columnConfigTest));
Map<String, AlgorithmConfiguration> encryptAlgorithmConfigs = new HashMap<>();
encryptAlgorithmConfigs.put("name_encryptor", new AlgorithmConfiguration("AES", props));
- encryptAlgorithmConfigs.put("pwd_encryptor", new AlgorithmConfiguration("assistedTest", props));
+ encryptAlgorithmConfigs.put("pwd_encryptor", new AlgorithmConfiguration("AES", props));
+ encryptAlgorithmConfigs.put("pwd_assisted_encryptor", new AlgorithmConfiguration("MD5", new Properties()));
EncryptRuleConfiguration encryptRuleConfig = new EncryptRuleConfiguration(Collections.singleton(encryptTableRuleConfig), encryptAlgorithmConfigs);
return ShardingSphereDataSourceFactory.createDataSource(DataSourceUtil.createDataSource("demo_ds"), Collections.singleton(encryptRuleConfig), props);
}
diff --git a/docs/document/content/user-manual/shardingsphere-jdbc/java-api/rules/encrypt.en.md b/docs/document/content/user-manual/shardingsphere-jdbc/java-api/rules/encrypt.en.md
index 4307b0c6e1f..1f305c6c78c 100644
--- a/docs/document/content/user-manual/shardingsphere-jdbc/java-api/rules/encrypt.en.md
+++ b/docs/document/content/user-manual/shardingsphere-jdbc/java-api/rules/encrypt.en.md
@@ -61,11 +61,10 @@ Class name: org.apache.shardingsphere.infra.algorithm.core.config.AlgorithmConfi
Attributes:
-| *Name* | *DataType* | *Description* |
-|------------|------------|------------------------------|
-| name | String | Encrypt algorithm name |
-| type | String | Encrypt algorithm type |
-| properties | Properties | Encrypt algorithm properties |
+| *Name* | *DataType* | *Description* |
+|--------|------------|------------------------------|
+| type | String | Encrypt algorithm type |
+| props | Properties | Encrypt algorithm properties |
Please refer to [Built-in Encrypt Algorithm List](/en/user-manual/common-config/builtin-algorithm/encrypt) for more details about type of algorithm.
@@ -86,11 +85,12 @@ public final class EncryptDatabasesConfiguration {
props.setProperty("digest-algorithm-name", "SHA-1");
EncryptColumnRuleConfiguration columnConfigAes = new EncryptColumnRuleConfiguration("username", new EncryptColumnItemRuleConfiguration("username", "name_encryptor"));
EncryptColumnRuleConfiguration columnConfigTest = new EncryptColumnRuleConfiguration("pwd", new EncryptColumnItemRuleConfiguration("pwd", "pwd_encryptor"));
- columnConfigTest.setAssistedQuery(new EncryptColumnItemRuleConfiguration("assisted_query_pwd", "pwd_encryptor"));
+ columnConfigTest.setAssistedQuery(new EncryptColumnItemRuleConfiguration("assisted_query_pwd", "pwd_assisted_encryptor"));
EncryptTableRuleConfiguration encryptTableRuleConfig = new EncryptTableRuleConfiguration("t_user", Arrays.asList(columnConfigAes, columnConfigTest));
Map<String, AlgorithmConfiguration> encryptAlgorithmConfigs = new HashMap<>();
encryptAlgorithmConfigs.put("name_encryptor", new AlgorithmConfiguration("AES", props));
- encryptAlgorithmConfigs.put("pwd_encryptor", new AlgorithmConfiguration("assistedTest", props));
+ encryptAlgorithmConfigs.put("pwd_encryptor", new AlgorithmConfiguration("AES", props));
+ encryptAlgorithmConfigs.put("pwd_assisted_encryptor", new AlgorithmConfiguration("MD5", new Properties()));
EncryptRuleConfiguration encryptRuleConfig = new EncryptRuleConfiguration(Collections.singleton(encryptTableRuleConfig), encryptAlgorithmConfigs);
return ShardingSphereDataSourceFactory.createDataSource(DataSourceUtil.createDataSource("demo_ds"), Collections.singleton(encryptRuleConfig), props);
}
diff --git a/docs/document/content/user-manual/shardingsphere-jdbc/java-api/rules/mask.cn.md b/docs/document/content/user-manual/shardingsphere-jdbc/java-api/rules/mask.cn.md
index 6ac9adcf224..a45038af6bb 100644
--- a/docs/document/content/user-manual/shardingsphere-jdbc/java-api/rules/mask.cn.md
+++ b/docs/document/content/user-manual/shardingsphere-jdbc/java-api/rules/mask.cn.md
@@ -48,11 +48,10 @@ weight = 6
可配置属性:
-| *名称* | *数据类型* | *说明* |
-|------------|------------|----------|
-| name | String | 脱敏算法名称 |
-| type | String | 脱敏算法类型 |
-| properties | Properties | 脱敏算法属性配置 |
+| *名称* | *数据类型* | *说明* |
+|------|------------|----------|
+| type | String | 脱敏算法类型 |
+| props | Properties | 脱敏算法属性配置 |
算法类型的详情,请参见[内置脱敏算法列表](/cn/user-manual/common-config/builtin-algorithm/mask)。
diff --git a/docs/document/content/user-manual/shardingsphere-jdbc/java-api/rules/mask.en.md b/docs/document/content/user-manual/shardingsphere-jdbc/java-api/rules/mask.en.md
index 7518b1cd627..c20717734cf 100644
--- a/docs/document/content/user-manual/shardingsphere-jdbc/java-api/rules/mask.en.md
+++ b/docs/document/content/user-manual/shardingsphere-jdbc/java-api/rules/mask.en.md
@@ -48,11 +48,10 @@ Class name: org.apache.shardingsphere.infra.algorithm.core.config.AlgorithmConfi
Attributes:
-| *Name* | *DataType* | *Description* |
-|------------|------------|---------------------------|
-| name | String | Mask algorithm name |
-| type | String | Mask algorithm type |
-| properties | Properties | Mask algorithm properties |
+| *Name* | *DataType* | *Description* |
+|--------|------------|---------------------------|
+| type | String | Mask algorithm type |
+| props | Properties | Mask algorithm properties |
Please refer to [Built-in Data Masking Algorithm List](/en/user-manual/common-config/builtin-algorithm/mask) for more details about type of algorithm.
diff --git a/docs/document/content/user-manual/shardingsphere-jdbc/java-api/rules/mix.cn.md b/docs/document/content/user-manual/shardingsphere-jdbc/java-api/rules/mix.cn.md
index 172a4438e6b..cd39002c7a0 100644
--- a/docs/document/content/user-manual/shardingsphere-jdbc/java-api/rules/mix.cn.md
+++ b/docs/document/content/user-manual/shardingsphere-jdbc/java-api/rules/mix.cn.md
@@ -15,11 +15,13 @@ private ShardingRuleConfiguration createShardingRuleConfiguration() {
ShardingRuleConfiguration result = new ShardingRuleConfiguration();
result.getTables().add(getOrderTableRuleConfiguration());
result.setDefaultDatabaseShardingStrategy(new StandardShardingStrategyConfiguration("user_id", "inline"));
- result.setDefaultTableShardingStrategy(new StandardShardingStrategyConfiguration("order_id", "standard_test_tbl"));
+ result.setDefaultTableShardingStrategy(new StandardShardingStrategyConfiguration("order_id", "hash_mod"));
Properties props = new Properties();
props.setProperty("algorithm-expression", "demo_ds_${user_id % 2}");
+ Properties tableShardingProps = new Properties();
+ tableShardingProps.setProperty("sharding-count", "2");
result.getShardingAlgorithms().put("inline", new AlgorithmConfiguration("INLINE", props));
- result.getShardingAlgorithms().put("standard_test_tbl", new AlgorithmConfiguration("STANDARD_TEST_TBL", new Properties()));
+ result.getShardingAlgorithms().put("hash_mod", new AlgorithmConfiguration("HASH_MOD", tableShardingProps));
result.getKeyGenerators().put("snowflake", new AlgorithmConfiguration("SNOWFLAKE", new Properties()));
result.getKeyGenerateStrategies().put("t_order_order_id", new ColumnKeyGenerateStrategiesRuleConfiguration("snowflake", "t_order", "order_id"));
return result;
@@ -47,11 +49,12 @@ private static EncryptRuleConfiguration createEncryptRuleConfiguration() {
props.setProperty("digest-algorithm-name", "SHA-1");
EncryptColumnRuleConfiguration columnConfigAes = new EncryptColumnRuleConfiguration("username", new EncryptColumnItemRuleConfiguration("username", "name_encryptor"));
EncryptColumnRuleConfiguration columnConfigTest = new EncryptColumnRuleConfiguration("pwd", new EncryptColumnItemRuleConfiguration("pwd", "pwd_encryptor"));
- columnConfigTest.setAssistedQuery(new EncryptColumnItemRuleConfiguration("assisted_query_pwd", "pwd_encryptor"));
+ columnConfigTest.setAssistedQuery(new EncryptColumnItemRuleConfiguration("assisted_query_pwd", "pwd_assisted_encryptor"));
EncryptTableRuleConfiguration encryptTableRuleConfig = new EncryptTableRuleConfiguration("t_user", Arrays.asList(columnConfigAes, columnConfigTest));
Map<String, AlgorithmConfiguration> encryptAlgorithmConfigs = new HashMap<>();
encryptAlgorithmConfigs.put("name_encryptor", new AlgorithmConfiguration("AES", props));
- encryptAlgorithmConfigs.put("pwd_encryptor", new AlgorithmConfiguration("assistedTest", props));
+ encryptAlgorithmConfigs.put("pwd_encryptor", new AlgorithmConfiguration("AES", props));
+ encryptAlgorithmConfigs.put("pwd_assisted_encryptor", new AlgorithmConfiguration("MD5", new Properties()));
return new EncryptRuleConfiguration(Collections.singleton(encryptTableRuleConfig), encryptAlgorithmConfigs);
}
```
diff --git a/docs/document/content/user-manual/shardingsphere-jdbc/java-api/rules/mix.en.md b/docs/document/content/user-manual/shardingsphere-jdbc/java-api/rules/mix.en.md
index 21649d65d4c..f08521e9f75 100644
--- a/docs/document/content/user-manual/shardingsphere-jdbc/java-api/rules/mix.en.md
+++ b/docs/document/content/user-manual/shardingsphere-jdbc/java-api/rules/mix.en.md
@@ -16,11 +16,13 @@ private ShardingRuleConfiguration createShardingRuleConfiguration() {
ShardingRuleConfiguration result = new ShardingRuleConfiguration();
result.getTables().add(getOrderTableRuleConfiguration());
result.setDefaultDatabaseShardingStrategy(new StandardShardingStrategyConfiguration("user_id", "inline"));
- result.setDefaultTableShardingStrategy(new StandardShardingStrategyConfiguration("order_id", "standard_test_tbl"));
+ result.setDefaultTableShardingStrategy(new StandardShardingStrategyConfiguration("order_id", "hash_mod"));
Properties props = new Properties();
props.setProperty("algorithm-expression", "demo_ds_${user_id % 2}");
+ Properties tableShardingProps = new Properties();
+ tableShardingProps.setProperty("sharding-count", "2");
result.getShardingAlgorithms().put("inline", new AlgorithmConfiguration("INLINE", props));
- result.getShardingAlgorithms().put("standard_test_tbl", new AlgorithmConfiguration("STANDARD_TEST_TBL", new Properties()));
+ result.getShardingAlgorithms().put("hash_mod", new AlgorithmConfiguration("HASH_MOD", tableShardingProps));
result.getKeyGenerators().put("snowflake", new AlgorithmConfiguration("SNOWFLAKE", new Properties()));
result.getKeyGenerateStrategies().put("t_order_order_id", new ColumnKeyGenerateStrategiesRuleConfiguration("snowflake", "t_order", "order_id"));
return result;
@@ -48,11 +50,12 @@ private static EncryptRuleConfiguration createEncryptRuleConfiguration() {
props.setProperty("digest-algorithm-name", "SHA-1");
EncryptColumnRuleConfiguration columnConfigAes = new EncryptColumnRuleConfiguration("username", new EncryptColumnItemRuleConfiguration("username", "name_encryptor"));
EncryptColumnRuleConfiguration columnConfigTest = new EncryptColumnRuleConfiguration("pwd", new EncryptColumnItemRuleConfiguration("pwd", "pwd_encryptor"));
- columnConfigTest.setAssistedQuery(new EncryptColumnItemRuleConfiguration("assisted_query_pwd", "pwd_encryptor"));
+ columnConfigTest.setAssistedQuery(new EncryptColumnItemRuleConfiguration("assisted_query_pwd", "pwd_assisted_encryptor"));
EncryptTableRuleConfiguration encryptTableRuleConfig = new EncryptTableRuleConfiguration("t_user", Arrays.asList(columnConfigAes, columnConfigTest));
Map<String, AlgorithmConfiguration> encryptAlgorithmConfigs = new HashMap<>();
encryptAlgorithmConfigs.put("name_encryptor", new AlgorithmConfiguration("AES", props));
- encryptAlgorithmConfigs.put("pwd_encryptor", new AlgorithmConfiguration("assistedTest", props));
+ encryptAlgorithmConfigs.put("pwd_encryptor", new AlgorithmConfiguration("AES", props));
+ encryptAlgorithmConfigs.put("pwd_assisted_encryptor", new AlgorithmConfiguration("MD5", new Properties()));
return new EncryptRuleConfiguration(Collections.singleton(encryptTableRuleConfig), encryptAlgorithmConfigs);
}
```
diff --git a/docs/document/content/user-manual/shardingsphere-jdbc/java-api/rules/sharding.cn.md b/docs/document/content/user-manual/shardingsphere-jdbc/java-api/rules/sharding.cn.md
index 47474019530..75a4842c183 100644
--- a/docs/document/content/user-manual/shardingsphere-jdbc/java-api/rules/sharding.cn.md
+++ b/docs/document/content/user-manual/shardingsphere-jdbc/java-api/rules/sharding.cn.md
@@ -174,11 +174,13 @@ public final class ShardingDatabasesAndTablesConfigurationPrecise {
result.getTables().add(getOrderItemTableRuleConfiguration());
result.getBindingTableGroups().add(new ShardingTableReferenceRuleConfiguration("foo", "t_order, t_order_item"));
result.setDefaultDatabaseShardingStrategy(new StandardShardingStrategyConfiguration("user_id", "inline"));
- result.setDefaultTableShardingStrategy(new StandardShardingStrategyConfiguration("order_id", "standard_test_tbl"));
+ result.setDefaultTableShardingStrategy(new StandardShardingStrategyConfiguration("order_id", "hash_mod"));
Properties props = new Properties();
props.setProperty("algorithm-expression", "demo_ds_${user_id % 2}");
+ Properties tableShardingProps = new Properties();
+ tableShardingProps.setProperty("sharding-count", "2");
result.getShardingAlgorithms().put("inline", new AlgorithmConfiguration("INLINE", props));
- result.getShardingAlgorithms().put("standard_test_tbl", new AlgorithmConfiguration("STANDARD_TEST_TBL", new Properties()));
+ result.getShardingAlgorithms().put("hash_mod", new AlgorithmConfiguration("HASH_MOD", tableShardingProps));
result.getKeyGenerators().put("snowflake", new AlgorithmConfiguration("SNOWFLAKE", new Properties()));
result.getKeyGenerateStrategies().put("t_order_order_id", new ColumnKeyGenerateStrategiesRuleConfiguration("snowflake", "t_order", "order_id"));
result.getKeyGenerateStrategies().put("t_order_item_order_item_id", new ColumnKeyGenerateStrategiesRuleConfiguration("snowflake", "t_order_item", "order_item_id"));
@@ -205,7 +207,7 @@ public final class ShardingDatabasesAndTablesConfigurationPrecise {
}
private BroadcastRuleConfiguration createBroadcastRuleConfiguration() {
- return new BroadcastRuleConfiguration(Collections.singletonList("t_address"));;
+ return new BroadcastRuleConfiguration(Collections.singletonList("t_address"));
}
}
```
diff --git a/docs/document/content/user-manual/shardingsphere-jdbc/java-api/rules/sharding.en.md b/docs/document/content/user-manual/shardingsphere-jdbc/java-api/rules/sharding.en.md
index bb431cf34e6..e0465c47e5a 100644
--- a/docs/document/content/user-manual/shardingsphere-jdbc/java-api/rules/sharding.en.md
+++ b/docs/document/content/user-manual/shardingsphere-jdbc/java-api/rules/sharding.en.md
@@ -173,11 +173,13 @@ public final class ShardingDatabasesAndTablesConfigurationPrecise {
result.getTables().add(getOrderItemTableRuleConfiguration());
result.getBindingTableGroups().add(new ShardingTableReferenceRuleConfiguration("foo", "t_order, t_order_item"));
result.setDefaultDatabaseShardingStrategy(new StandardShardingStrategyConfiguration("user_id", "inline"));
- result.setDefaultTableShardingStrategy(new StandardShardingStrategyConfiguration("order_id", "standard_test_tbl"));
+ result.setDefaultTableShardingStrategy(new StandardShardingStrategyConfiguration("order_id", "hash_mod"));
Properties props = new Properties();
props.setProperty("algorithm-expression", "demo_ds_${user_id % 2}");
+ Properties tableShardingProps = new Properties();
+ tableShardingProps.setProperty("sharding-count", "2");
result.getShardingAlgorithms().put("inline", new AlgorithmConfiguration("INLINE", props));
- result.getShardingAlgorithms().put("standard_test_tbl", new AlgorithmConfiguration("STANDARD_TEST_TBL", new Properties()));
+ result.getShardingAlgorithms().put("hash_mod", new AlgorithmConfiguration("HASH_MOD", tableShardingProps));
result.getKeyGenerators().put("snowflake", new AlgorithmConfiguration("SNOWFLAKE", new Properties()));
result.getKeyGenerateStrategies().put("t_order_order_id", new ColumnKeyGenerateStrategiesRuleConfiguration("snowflake", "t_order", "order_id"));
result.getKeyGenerateStrategies().put("t_order_item_order_item_id", new ColumnKeyGenerateStrategiesRuleConfiguration("snowflake", "t_order_item", "order_item_id"));
@@ -204,7 +206,7 @@ public final class ShardingDatabasesAndTablesConfigurationPrecise {
}
private BroadcastRuleConfiguration createBroadcastRuleConfiguration() {
- return new BroadcastRuleConfiguration(Collections.singletonList("t_address"));;
+ return new BroadcastRuleConfiguration(Collections.singletonList("t_address"));
}
}
```
diff --git a/docs/document/content/user-manual/shardingsphere-proxy/cdc/build.cn.md b/docs/document/content/user-manual/shardingsphere-proxy/cdc/build.cn.md
index 405eadd2bec..bc15a1e7724 100644
--- a/docs/document/content/user-manual/shardingsphere-proxy/cdc/build.cn.md
+++ b/docs/document/content/user-manual/shardingsphere-proxy/cdc/build.cn.md
@@ -14,7 +14,6 @@ ShardingSphere CDC 分为两个部分,一个是 CDC Server,另一个是 CDC
- 纯 JAVA 开发,JDK 建议 1.8 或以上版本。
- CDC Server 要求 ShardingSphere-Proxy 使用集群模式,目前支持 ZooKeeper 作为注册中心。
- CDC 只同步数据,不会同步表结构,目前也不支持 DDL 的语句同步。
-- CDC 增量阶段会按照分库事务的维度输出数据, 如果要开启 XA 事务的兼容,则 openGauss 和 ShardingSphere-Proxy 都需要 GLT 模块
## CDC Server 部署步骤
@@ -22,32 +21,9 @@ ShardingSphere CDC 分为两个部分,一个是 CDC Server,另一个是 CDC
由于 CDC Server 内置于 ShardingSphere-Proxy,所以需要获取 ShardingSphere-Proxy。详情请参见 [proxy 启动手册](/cn/user-manual/shardingsphere-proxy/startup/bin/)。
-### 配置 GLT 模块(可选)
-
-官网发布的二进制包默认不包含 GLT 模块,如果使用的是包含 GLT 功能的 openGauss 数据库,则可以额外引入 GLT 模块,保证 XA 事务的完整性。
-
-目前有两种方式引入 GLT 模块,并且需要在 global.yaml 中也进行相应的配置。
-
-#### 1. 源码编译安装
-
-1.1 准备代码环境,提前下载或者使用 Git clone,从 Github 下载 [ShardingSphere](https://github.com/apache/shardingsphere.git) 源码。
-
-1.2 删除 kernel/global-clock/type/tso/core/pom.xml 中 shardingsphere-global-clock-tso-provider-redis 依赖的 `<scope>provided</scope>` 标签和 kernel/global-clock/type/tso/provider/redis/pom.xml 中 jedis
- 的 `<scope>provided</scope>` 标签
-
-1.3 编译 ShardingSphere-Proxy,具体编译步骤请参考 [ShardingSphere 编译手册](https://github.com/apache/shardingsphere/wiki#build-apache-shardingsphere)。
-
-#### 2. 直接引入 GLT 依赖
-
-可以从 maven 仓库中引入
-
-2.1. [shardingsphere-global-clock-tso-provider-redis](https://repo1.maven.org/maven2/org/apache/shardingsphere/shardingsphere-global-clock-tso-provider-redis),下载和 ShardingSphere-Proxy 同名版本
-
-2.2. [jedis-4.3.1](https://repo1.maven.org/maven2/redis/clients/jedis/4.3.1/jedis-4.3.1.jar)
-
### CDC Server 使用手册
-修改配置文件 `conf/global.yaml`,打开 CDC 功能。 目前 `mode` 必须是 `Cluster`,需要提前启动对应的注册中心。如果 GLT provider 使用 Redis,需要提前启动 Redis。
+修改配置文件 `conf/global.yaml`,打开 CDC 功能。 目前 `mode` 必须是 `Cluster`,需要提前启动对应的注册中心。
配置示例:
@@ -73,19 +49,6 @@ authority:
privilege:
type: ALL_PERMITTED
-# 使用 GLT 的时候也需要开启分布式事务,目前 GLT 只有 openGauss 数据库支持
-#transaction:
-# defaultType: XA
-# providerType: Atomikos
-#
-#globalClock:
-# enabled: true
-# type: TSO
-# provider: redis
-# props:
-# host: 127.0.0.1
-# port: 6379
-
props:
proxy-default-port: 3307 # Proxy default port
cdc-server-port: 33071 # CDC Server 端口,必须配置
@@ -213,7 +176,7 @@ CDC Client 不需要额外部署,只需要通过 maven 引入 CDC Client 的
|-----------------------------------------------------------------------------------------------------------------------------|-------------|--------------------------------------------------------------------------------------------------------------|
| connect(Consumer<List<Record>> dataConsumer, ExceptionHandler exceptionHandler, ServerErrorResultHandler errorResultHandler) | void | 和服务端进行连接,连接的时候需要指定 <br/>1. 数据的消费处理逻辑 <br/>2. 消费时候的异常处理逻辑 <br/>3. 服务端错误的异常处理逻辑 |
| login(CDCLoginParameter parameter) | void | CDC登陆,参数 <br/>username:用户名 <br/>password:密码 |
-| startStreaming(StartStreamingParameter parameter) | streamingId | 开启 CDC 订阅 <br/> StartStreamingParameter 参数 <br/> database:逻辑库名称 <br/> schemaTables:订阅的表名 <br/> full:是否订阅全量数据 |
+| startStreaming(StartStreamingParameter parameter) | String | 开启 CDC 订阅并返回 streaming ID <br/> StartStreamingParameter 参数 <br/> database:逻辑库名称 <br/> schemaTables:订阅的表名 <br/> full:是否订阅全量数据 |
| restartStreaming(String streamingId) | void | 重启订阅 |
| stopStreaming(String streamingId) | void | 停止订阅 |
| dropStreaming(String streamingId) | void | 删除订阅 |
diff --git a/docs/document/content/user-manual/shardingsphere-proxy/cdc/build.en.md b/docs/document/content/user-manual/shardingsphere-proxy/cdc/build.en.md
index 0df9b342fe7..a3720ba17ab 100644
--- a/docs/document/content/user-manual/shardingsphere-proxy/cdc/build.en.md
+++ b/docs/document/content/user-manual/shardingsphere-proxy/cdc/build.en.md
@@ -14,7 +14,6 @@ Users can introduce the CDC Client into their own projects to implement data con
- Pure JAVA development, JDK recommended 1.8 or above.
- CDC Server requires ShardingSphere-Proxy to use cluster mode, currently supports ZooKeeper as the registry center.
- CDC only synchronizes data, does not synchronize table structure, and currently does not support DDL statement synchronization.
-- CDC incremental task will not split transaction data of the database shards. If you want to enable XA transaction compatibility, both openGauss and ShardingSphere-Proxy need the GLT module.
## CDC Server Deployment Steps
@@ -22,31 +21,9 @@ Here, the openGauss database is used as an example to introduce the deployment s
Since the CDC Server is built into ShardingSphere-Proxy, you need to get ShardingSphere-Proxy. For details, please refer to the [proxy startup manual](/en/user-manual/shardingsphere-proxy/startup/bin/).
-### Configure GLT Module (Optional)
-
-The official website's released binary package does not include the GLT module by default, if you are using the openGauss database with GLT functionality, you can additionally introduce the GLT module to ensure the integrity of XA transactions.
-
-There are currently two ways to introduce the GLT module, and corresponding configurations need to be made in global.yaml.
-
-#### 1. Source code compilation and installation
-
-1.1 Prepare the code environment, download in advance or use Git clone to download the [ShardingSphere](https://github.com/apache/shardingsphere.git) source code from Github.
-
-1.2 Delete the `<scope>provided</scope>` tag of the shardingsphere-global-clock-tso-provider-redis dependency in kernel/global-clock/type/tso/core/pom.xml and the `<scope>provided</scope>` tag of jedis in kernel/global-clock/type/tso/provider/redis/pom.xml
-
-1.3 Compile ShardingSphere-Proxy, for specific compilation steps, please refer to the [ShardingSphere Compilation Manual](https://github.com/apache/shardingsphere/wiki#build-apache-shardingsphere).
-
-#### 2. Directly introduce GLT dependencies
-
-Can be introduced from the maven repository
-
-2.1. [shardingsphere-global-clock-tso-provider-redis](https://repo1.maven.org/maven2/org/apache/shardingsphere/shardingsphere-global-clock-tso-provider-redis), download the same version as ShardingSphere-Proxy
-
-2.2. [jedis-4.3.1](https://repo1.maven.org/maven2/redis/clients/jedis/4.3.1/jedis-4.3.1.jar)
-
### CDC Server User Manual
-Modify the configuration file `conf/global.yaml` and turn on the CDC function. Currently, `mode` must be `Cluster`, and the corresponding registry center needs to be started in advance. If the GLT provider uses Redis, Redis needs to be started in advance.
+Modify the configuration file `conf/global.yaml` and turn on the CDC function. Currently, `mode` must be `Cluster`, and the corresponding registry center needs to be started in advance.
Configuration example:
@@ -72,19 +49,6 @@ authority:
privilege:
type: ALL_PERMITTED
-# When using GLT, you also need to enable distributed transactions, GLT is only supported by the openGauss database currently.
-#transaction:
-# defaultType: XA
-# providerType: Atomikos
-#
-#globalClock:
-# enabled: true
-# type: TSO
-# provider: redis
-# props:
-# host: 127.0.0.1
-# port: 6379
-
props:
proxy-default-port: 3307 # Proxy default port.
cdc-server-port: 33071 # CDC Server port, must be configured
@@ -212,7 +176,7 @@ If necessary, users can also implement a CDC Client themselves to consume data a
|-----------------------------------------------------------------------------------------------------------------------------|--------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| connect(Consumer<List<Record>> dataConsumer, ExceptionHandler exceptionHandler, ServerErrorResultHandler errorResultHandler) | void | Connect with the server, when connecting, you need to specify <br/>1. Data consumption processing function <br/>2. Exception handling logic during consumption <br/>3. Server error exception handling function |
| login(CDCLoginParameter parameter) | void | CDC login, parameters <br/>username: username <br/>password: password |
-| startStreaming(StartStreamingParameter parameter) | streamingId | Start CDC subscription<br/> StartStreamingParameter parameters <br/> database: logical database name <br/> schemaTables: subscribed table name <br/> full: whether to subscribe to full data |
+| startStreaming(StartStreamingParameter parameter) | String | Start CDC subscription and return the streaming ID<br/> StartStreamingParameter parameters <br/> database: logical database name <br/> schemaTables: subscribed table name <br/> full: whether to subscribe to full data |
| restartStreaming(String streamingId) | void | Restart subscription |
| stopStreaming(String streamingId) | void | Stop subscription |
| dropStreaming(String streamingId) | void | Delete subscription |
diff --git a/docs/document/content/user-manual/shardingsphere-proxy/cdc/usage.cn.md b/docs/document/content/user-manual/shardingsphere-proxy/cdc/usage.cn.md
index b7c1280ed76..699ec0e4f7f 100644
--- a/docs/document/content/user-manual/shardingsphere-proxy/cdc/usage.cn.md
+++ b/docs/document/content/user-manual/shardingsphere-proxy/cdc/usage.cn.md
@@ -275,8 +275,7 @@ SUCCESS
## 增量数据推送的说明
1. CDC 增量推送目前是按照事务维度的,物理库的事务不会被拆分,所以如果一个事务中有多个表的数据变更,那么这些数据变更会被一起推送。
-如果要支持 XA 事务(目前只支持 openGauss),则 openGauss 和 Proxy 都需要 GLT 模块。
-2. 满足推送的条件是满足了一定大小的数据量或者到了一定的时间间隔(目前是 300ms),在处理 XA 事务时,收到的多个分库增量事件超过了 300ms,可能会导致 XA 事务被拆开推送。
+2. 满足推送的条件是满足了一定大小的数据量或者到了一定的时间间隔(目前是 300ms)。
## 超大事务的处理
diff --git a/docs/document/content/user-manual/shardingsphere-proxy/cdc/usage.en.md b/docs/document/content/user-manual/shardingsphere-proxy/cdc/usage.en.md
index e0100136246..3bff21c57b8 100644
--- a/docs/document/content/user-manual/shardingsphere-proxy/cdc/usage.en.md
+++ b/docs/document/content/user-manual/shardingsphere-proxy/cdc/usage.en.md
@@ -275,8 +275,7 @@ SUCCESS
## Explanation of incremental data push
1. The CDC incremental push is currently transactional, and the transactions of the physical database will not be split. Therefore, if there are data changes in multiple tables in a transaction, these data changes will be pushed together.
-If you want to support XA transactions (currently only supports openGauss), both openGauss and Proxy need the GLT module.
-2. The conditions for push are met when a certain amount of data is met or a certain time interval is reached (currently 300ms). When processing XA transactions, if the received multiple physical database incremental events exceed 300ms, it may cause the XA transaction to be split and pushed.
+2. The conditions for push are met when a certain amount of data is met or a certain time interval is reached (currently 300ms).
## Handling of large transactions
diff --git a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/ral/circuit-breaker/show-status-from-readwrite-splitting-rule.cn.md b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/ral/circuit-breaker/show-status-from-readwrite-splitting-rule.cn.md
index 0fb594bce37..2b1ea4c0697 100644
--- a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/ral/circuit-breaker/show-status-from-readwrite-splitting-rule.cn.md
+++ b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/ral/circuit-breaker/show-status-from-readwrite-splitting-rule.cn.md
@@ -54,7 +54,7 @@ mysql> SHOW STATUS FROM READWRITE_SPLITTING RULE ms_group_0 FROM sharding_db;
+-------------+--------------+----------+
| ms_group_0 | ds_0 | disabled |
+-------------+--------------+----------+
-1 rows in set (0.01 sec)
+1 row in set (0.01 sec)
```
- 查询指定逻辑库中所有读写分离存储单元状态
@@ -70,7 +70,7 @@ mysql> SHOW STATUS FROM READWRITE_SPLITTING RULES FROM sharding_db;
+-------------+--------------+----------+
| ms_group_0 | ds_0 | disabled |
+-------------+--------------+----------+
-1 rows in set (0.00 sec)
+1 row in set (0.00 sec)
```
- 查询当前逻辑库中指定读写分离规则中读写分离存储单元状态
@@ -86,7 +86,7 @@ mysql> SHOW STATUS FROM READWRITE_SPLITTING RULE ms_group_0;
+-------------+--------------+----------+
| ms_group_0 | ds_0 | disabled |
+-------------+--------------+----------+
-1 rows in set (0.01 sec)
+1 row in set (0.01 sec)
```
- 查询当前逻辑库中所有读写分离存储单元状态
@@ -102,7 +102,7 @@ mysql> SHOW STATUS FROM READWRITE_SPLITTING RULES;
+-------------+--------------+----------+
| ms_group_0 | ds_0 | disabled |
+-------------+--------------+----------+
-1 rows in set (0.01 sec)
+1 row in set (0.01 sec)
```
### 保留字
diff --git a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/ral/circuit-breaker/show-status-from-readwrite-splitting-rule.en.md b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/ral/circuit-breaker/show-status-from-readwrite-splitting-rule.en.md
index a3c45cb9319..2bd173506f5 100644
--- a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/ral/circuit-breaker/show-status-from-readwrite-splitting-rule.en.md
+++ b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/ral/circuit-breaker/show-status-from-readwrite-splitting-rule.en.md
@@ -54,7 +54,7 @@ mysql> SHOW STATUS FROM READWRITE_SPLITTING RULE ms_group_0 FROM sharding_db;
+-------------+--------------+----------+
| ms_group_0 | ds_0 | disabled |
+-------------+--------------+----------+
-1 rows in set (0.01 sec)
+1 row in set (0.01 sec)
```
- Query all readwrite-splitting storage unit from specified database
@@ -70,7 +70,7 @@ mysql> SHOW STATUS FROM READWRITE_SPLITTING RULES FROM sharding_db;
+-------------+--------------+----------+
| ms_group_0 | ds_0 | disabled |
+-------------+--------------+----------+
-1 rows in set (0.01 sec)
+1 row in set (0.01 sec)
```
- Query readwrite-splitting storage unit status for specified readwrite-splitting rule in current database
@@ -86,7 +86,7 @@ mysql> SHOW STATUS FROM READWRITE_SPLITTING RULE ms_group_0;
+-------------+--------------+----------+
| ms_group_0 | ds_0 | disabled |
+-------------+--------------+----------+
-1 rows in set (0.01 sec)
+1 row in set (0.01 sec)
```
- Query all readwrite-splitting storage unit from current database
@@ -102,7 +102,7 @@ mysql> SHOW STATUS FROM READWRITE_SPLITTING RULES;
+-------------+--------------+----------+
| ms_group_0 | ds_0 | disabled |
+-------------+--------------+----------+
-1 rows in set (0.01 sec)
+1 row in set (0.01 sec)
```
### Reserved word
diff --git a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/ral/global-rule/alter-transaction-rule.cn.md b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/ral/global-rule/alter-transaction-rule.cn.md
index 49c332b3558..99a944ab10c 100644
--- a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/ral/global-rule/alter-transaction-rule.cn.md
+++ b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/ral/global-rule/alter-transaction-rule.cn.md
@@ -16,7 +16,7 @@ AlterTransactionRule ::=
'ALTER' 'TRANSACTION' 'RULE' '(' 'DEFAULT' '=' defaultTransactionType ',' 'TYPE' '(' 'NAME' '=' transactionManager ',' propertiesDefinition ')' ')'
propertiesDefinition ::=
- 'PROPERTIES' '(' key '=' value (',' key '=' value)* ')'
+ 'PROPERTIES' '(' (key '=' value (',' key '=' value)*)? ')'
defaultTransactionType ::=
string
diff --git a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/ral/global-rule/alter-transaction-rule.en.md b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/ral/global-rule/alter-transaction-rule.en.md
index a90181026c2..234b06e5b35 100644
--- a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/ral/global-rule/alter-transaction-rule.en.md
+++ b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/ral/global-rule/alter-transaction-rule.en.md
@@ -16,7 +16,7 @@ AlterTransactionRule ::=
'ALTER' 'TRANSACTION' 'RULE' '(' 'DEFAULT' '=' defaultTransactionType ',' 'TYPE' '(' 'NAME' '=' transactionManager ',' propertiesDefinition ')' ')'
propertiesDefinition ::=
- 'PROPERTIES' '(' key '=' value (',' key '=' value)* ')'
+ 'PROPERTIES' '(' (key '=' value (',' key '=' value)*)? ')'
defaultTransactionType ::=
string
diff --git a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/ral/migration/alter-migration-rule.cn.md b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/ral/migration/alter-migration-rule.cn.md
index 73945bc701b..c01b8165e5e 100644
--- a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/ral/migration/alter-migration-rule.cn.md
+++ b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/ral/migration/alter-migration-rule.cn.md
@@ -22,7 +22,7 @@ writeConfiguration ::=
'WRITE' '(' ('WORKER_THREAD' '=' workerThreadPoolSize ',')? ('BATCH_SIZE' '=' batchSize ',')? (rateLimiter)? ')'
dataChannel ::=
- 'STREAM_CHANNEL' '(' 'TYPE' '(' 'NAME' '=' algorithmName ',' propertiesDefinition ')' ')'
+ 'STREAM_CHANNEL' '(' algorithmDefinition ')'
workerThreadPoolSize ::=
int
@@ -34,13 +34,16 @@ shardingSize ::=
int
rateLimiter ::=
- 'RATE_LIMITER' '(' 'TYPE' '(' 'NAME' '=' algorithmName ',' propertiesDefinition ')' ')'
+ 'RATE_LIMITER' '(' algorithmDefinition ')'
algorithmName ::=
string
+algorithmDefinition ::=
+ 'TYPE' '(' 'NAME' '=' algorithmName (',' propertiesDefinition)? ')'
+
propertiesDefinition ::=
- 'PROPERTIES' '(' key '=' value (',' key '=' value)* ')'
+ 'PROPERTIES' '(' (key '=' value (',' key '=' value)*)? ')'
key ::=
string
diff --git a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/ral/migration/alter-migration-rule.en.md b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/ral/migration/alter-migration-rule.en.md
index d8b4b21223e..6143c33ba88 100644
--- a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/ral/migration/alter-migration-rule.en.md
+++ b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/ral/migration/alter-migration-rule.en.md
@@ -22,7 +22,7 @@ writeConfiguration ::=
'WRITE' '(' ('WORKER_THREAD' '=' workerThreadPoolSize ',')? ('BATCH_SIZE' '=' batchSize ',')? (rateLimiter)? ')'
dataChannel ::=
- 'STREAM_CHANNEL' '(' 'TYPE' '(' 'NAME' '=' algorithmName ',' propertiesDefinition ')' ')'
+ 'STREAM_CHANNEL' '(' algorithmDefinition ')'
workerThreadPoolSize ::=
int
@@ -34,13 +34,16 @@ shardingSize ::=
int
rateLimiter ::=
- 'RATE_LIMITER' '(' 'TYPE' '(' 'NAME' '=' algorithmName ',' propertiesDefinition ')' ')'
+ 'RATE_LIMITER' '(' algorithmDefinition ')'
algorithmName ::=
string
+algorithmDefinition ::=
+ 'TYPE' '(' 'NAME' '=' algorithmName (',' propertiesDefinition)? ')'
+
propertiesDefinition ::=
- 'PROPERTIES' '(' key '=' value (',' key '=' value)* ')'
+ 'PROPERTIES' '(' (key '=' value (',' key '=' value)*)? ')'
key ::=
string
diff --git a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/ral/migration/check-migration.cn.md b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/ral/migration/check-migration.cn.md
index 4b10567e76b..b7a974ef940 100644
--- a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/ral/migration/check-migration.cn.md
+++ b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/ral/migration/check-migration.cn.md
@@ -1,26 +1,38 @@
+++
-title = "CHECK MIGRATION BY"
+title = "CHECK MIGRATION"
weight = 10
+++
### 描述
-`CHECK MIGRATION BY` 语法用于校验数据迁移作业中的数据一致性。
+`CHECK MIGRATION` 语法用于校验数据迁移作业中的数据一致性。
### 语法
{{< tabs >}}
{{% tab name="语法" %}}
```sql
-ShowMigrationList ::=
- 'CHECK' 'MIGRATION' migrationJobId 'BY' 'TYPE' '(' 'NAME' '=' migrationCheckAlgorithmType ')'
+CheckMigration ::=
+ 'CHECK' 'MIGRATION' migrationJobId ('BY' algorithmDefinition)?
migrationJobId ::=
integer | identifier | string
+algorithmDefinition ::=
+ 'TYPE' '(' 'NAME' '=' migrationCheckAlgorithmType (',' propertiesDefinition)? ')'
+
migrationCheckAlgorithmType ::=
string
+
+propertiesDefinition ::=
+ 'PROPERTIES' '(' (key '=' value (',' key '=' value)*)? ')'
+
+key ::=
+ string
+
+value ::=
+ literal
```
{{% /tab %}}
{{% tab name="铁路图" %}}
@@ -32,7 +44,7 @@ migrationCheckAlgorithmType ::=
- `migrationJobId` 需要通过 [SHOW MIGRATION LIST](/cn/user-manual/shardingsphere-proxy/distsql/syntax/ral/migration/show-migration-list/) 语法查询获得
-- `migrationCheckAlgorithmType` 需要通过 [SHOW MIGRATION CHECK ALGORITHMS](/cn/user-manual/shardingsphere-proxy/distsql/syntax/ral/migration/show-migration-check-algorithm/) 语法查询获得
+- 指定 `BY` 子句时,`migrationCheckAlgorithmType` 需要通过 [SHOW MIGRATION CHECK ALGORITHMS](/cn/user-manual/shardingsphere-proxy/distsql/syntax/ral/migration/show-migration-check-algorithm/) 语法查询获得
### 示例
@@ -44,10 +56,10 @@ CHECK MIGRATION 'j01016e501b498ed1bdb2c373a2e85e2529a6' BY TYPE (NAME='CRC32_MAT
### 保留字
-`CHECK`、`MIGRATION`、`BY`、`TYPE`
+`CHECK`、`MIGRATION`、`BY`、`TYPE`、`NAME`、`PROPERTIES`
### 相关链接
- [保留字](/cn/user-manual/shardingsphere-proxy/distsql/syntax/reserved-word/)
- [SHOW MIGRATION LIST](/cn/user-manual/shardingsphere-proxy/distsql/syntax/ral/migration/show-migration-list/)
-- [SHOW MIGRATION CHECK ALGORITHMS](/cn/user-manual/shardingsphere-proxy/distsql/syntax/ral/migration/show-migration-check-algorithm/)
\ No newline at end of file
+- [SHOW MIGRATION CHECK ALGORITHMS](/cn/user-manual/shardingsphere-proxy/distsql/syntax/ral/migration/show-migration-check-algorithm/)
diff --git a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/ral/migration/check-migration.en.md b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/ral/migration/check-migration.en.md
index df3b26a5bf8..02cc73e9f92 100644
--- a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/ral/migration/check-migration.en.md
+++ b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/ral/migration/check-migration.en.md
@@ -1,25 +1,37 @@
+++
-title = "CHECK MIGRATION "
+title = "CHECK MIGRATION"
weight = 10
+++
### Description
-The `CHECK MIGRATION LIST` syntax is used to check data consistancy in migration job.
+The `CHECK MIGRATION` syntax is used to check data consistency in migration job.
### Syntax
{{< tabs >}}
{{% tab name="Grammar" %}}
```sql
-ShowMigrationList ::=
- 'CHECK' 'MIGRATION' migrationJobId 'BY' 'TYPE' '(' 'NAME' '=' migrationCheckAlgorithmType ')'
+CheckMigration ::=
+ 'CHECK' 'MIGRATION' migrationJobId ('BY' algorithmDefinition)?
migrationJobId ::=
integer | identifier | string
+algorithmDefinition ::=
+ 'TYPE' '(' 'NAME' '=' migrationCheckAlgorithmType (',' propertiesDefinition)? ')'
+
migrationCheckAlgorithmType ::=
string
+
+propertiesDefinition ::=
+ 'PROPERTIES' '(' (key '=' value (',' key '=' value)*)? ')'
+
+key ::=
+ string
+
+value ::=
+ literal
```
{{% /tab %}}
{{% tab name="Railroad diagram" %}}
@@ -31,11 +43,11 @@ migrationCheckAlgorithmType ::=
- `migrationJobId` needs to be obtained through [SHOW MIGRATION LIST](/en/user-manual/shardingsphere-proxy/distsql/syntax/ral/migration/show-migration-list/) syntax query
-- `migrationCheckAlgorithmType` needs to be obtained through [SHOW MIGRATION CHECK ALGORITHMS](/en/user-manual/shardingsphere-proxy/distsql/syntax/ral/migration/show-migration-check-algorithm/) syntax query
+- When the `BY` clause is specified, `migrationCheckAlgorithmType` needs to be obtained through [SHOW MIGRATION CHECK ALGORITHMS](/en/user-manual/shardingsphere-proxy/distsql/syntax/ral/migration/show-migration-check-algorithm/) syntax query
### Example
-- check data consistancy in migration job
+- Check data consistency in migration job
```sql
CHECK MIGRATION 'j01016e501b498ed1bdb2c373a2e85e2529a6' BY TYPE (NAME='CRC32_MATCH');
@@ -43,7 +55,7 @@ CHECK MIGRATION 'j01016e501b498ed1bdb2c373a2e85e2529a6' BY TYPE (NAME='CRC32_MAT
### Reserved word
-`CHECK`, `MIGRATION`, `BY`, `TYPE`
+`CHECK`, `MIGRATION`, `BY`, `TYPE`, `NAME`, `PROPERTIES`
### Related links
diff --git a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/ral/migration/register-migration-source-storage-unit.cn.md b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/ral/migration/register-migration-source-storage-unit.cn.md
index 6724065e7a1..0b2ae9ebde8 100644
--- a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/ral/migration/register-migration-source-storage-unit.cn.md
+++ b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/ral/migration/register-migration-source-storage-unit.cn.md
@@ -46,7 +46,7 @@ password ::=
string
propertiesDefinition ::=
- 'PROPERTIES' '(' ( key '=' value ) ( ',' key '=' value )* ')'
+ 'PROPERTIES' '(' (key '=' value (',' key '=' value)*)? ')'
key ::=
string
diff --git a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/ral/migration/register-migration-source-storage-unit.en.md b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/ral/migration/register-migration-source-storage-unit.en.md
index 7d98627474b..8ddf6d3aa76 100644
--- a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/ral/migration/register-migration-source-storage-unit.en.md
+++ b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/ral/migration/register-migration-source-storage-unit.en.md
@@ -5,7 +5,7 @@ weight = 3
### Description
-The `REGISTER MIGRATION SOURCE STORAGE UNIT` syntax is used to register migration source storage unit for the currently connection.
+The `REGISTER MIGRATION SOURCE STORAGE UNIT` syntax is used to register migration source storage unit for the current connection.
### Syntax
@@ -46,7 +46,7 @@ password ::=
string
propertiesDefinition ::=
- 'PROPERTIES' '(' ( key '=' value ) ( ',' key '=' value )* ')'
+ 'PROPERTIES' '(' (key '=' value (',' key '=' value)*)? ')'
key ::=
string
diff --git a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/ral/migration/show-migration-list.cn.md b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/ral/migration/show-migration-list.cn.md
index 3d37c3752fb..7abd88d091c 100644
--- a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/ral/migration/show-migration-list.cn.md
+++ b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/ral/migration/show-migration-list.cn.md
@@ -49,7 +49,7 @@ mysql> SHOW MIGRATION LIST;
+--------------------------------------------+---------------------+--------+---------------------+-----------+----------------+--------------------+
| j0102p00001d029afca1fd960d567fed6cddc9b4a2 | source_ds.t_order | true | 2022-10-31 18:18:24 | | 1 | 10.7.5.76@-@27808 |
+--------------------------------------------+---------------------+--------+---------------------+-----------+----------------+--------------------+
-4 rows in set (0.06 sec)
+1 row in set (0.06 sec)
```
### 保留字
diff --git a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/ral/migration/show-migration-list.en.md b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/ral/migration/show-migration-list.en.md
index ae26474db19..7720bb170ed 100644
--- a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/ral/migration/show-migration-list.en.md
+++ b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/ral/migration/show-migration-list.en.md
@@ -48,7 +48,7 @@ mysql> SHOW MIGRATION LIST;
+--------------------------------------------+---------------------+--------+---------------------+-----------+----------------+--------------------+
| j0102p00001d029afca1fd960d567fed6cddc9b4a2 | source_ds.t_order | true | 2022-10-31 18:18:24 | | 1 | 10.7.5.76@-@27808 |
+--------------------------------------------+---------------------+--------+---------------------+-----------+----------------+--------------------+
-4 rows in set (0.06 sec)
+1 row in set (0.06 sec)
```
### Reserved word
diff --git a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/ral/migration/start-migration-check.en.md b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/ral/migration/start-migration-check.en.md
index 05219ef1f3c..cb53d393384 100644
--- a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/ral/migration/start-migration-check.en.md
+++ b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/ral/migration/start-migration-check.en.md
@@ -5,7 +5,7 @@ weight = 12
### Description
-The `START MIGRATION CHECK` syntax is used to stop migration check process.
+The `START MIGRATION CHECK` syntax is used to start migration check process.
### Syntax
@@ -30,7 +30,7 @@ migrationJobId ::=
### Example
-- Stop migration check process
+- Start migration check process
```sql
START MIGRATION CHECK 'j010180026753ef0e25d3932d94d1673ba551';
diff --git a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/ral/migration/start-migration.cn.md b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/ral/migration/start-migration.cn.md
index 967a142eacf..1cbe18a4b09 100644
--- a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/ral/migration/start-migration.cn.md
+++ b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/ral/migration/start-migration.cn.md
@@ -30,7 +30,7 @@ migrationJobId ::=
### 示例
-- 停止指定的数据迁移作业
+- 开始指定的数据迁移作业
```sql
START MIGRATION 'j010180026753ef0e25d3932d94d1673ba551';
@@ -43,4 +43,4 @@ START MIGRATION 'j010180026753ef0e25d3932d94d1673ba551';
### 相关链接
- [保留字](/cn/user-manual/shardingsphere-proxy/distsql/syntax/reserved-word/)
-- [SHOW MIGRATION LIST](/cn/user-manual/shardingsphere-proxy/distsql/syntax/ral/migration/show-migration-list/)
\ No newline at end of file
+- [SHOW MIGRATION LIST](/cn/user-manual/shardingsphere-proxy/distsql/syntax/ral/migration/show-migration-list/)
diff --git a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/ral/show-table-metadata.cn.md b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/ral/show-table-metadata.cn.md
index e83c083507f..f4fdc8538e3 100644
--- a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/ral/show-table-metadata.cn.md
+++ b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/ral/show-table-metadata.cn.md
@@ -62,14 +62,14 @@ mysql> SHOW TABLE METADATA t_order, t_order_1 FROM sharding_db;
+---------------+------------+--------+----------+---------------------------+
| database_name | table_name | type | name | value |
+---------------+------------+--------+----------+---------------------------+
-| sharding_db | t_order_1 | COLUMN | order_id | ShardingSphereColumn(...) |
-| sharding_db | t_order_1 | COLUMN | user_id | ShardingSphereColumn(...) |
-| sharding_db | t_order_1 | COLUMN | status | ShardingSphereColumn(...) |
-| sharding_db | t_order_1 | INDEX | PRIMARY | ShardingSphereIndex(...) |
-| sharding_db | t_order | COLUMN | order_id | ShardingSphereColumn(...) |
-| sharding_db | t_order | COLUMN | user_id | ShardingSphereColumn(...) |
-| sharding_db | t_order | COLUMN | status | ShardingSphereColumn(...) |
-| sharding_db | t_order | INDEX | PRIMARY | ShardingSphereIndex(...) |
+| sharding_db | t_order_1 | COLUMN | order_id | {"name":"order_id",...} |
+| sharding_db | t_order_1 | COLUMN | user_id | {"name":"user_id",...} |
+| sharding_db | t_order_1 | COLUMN | status | {"name":"status",...} |
+| sharding_db | t_order_1 | INDEX | PRIMARY | {"name":"PRIMARY",...} |
+| sharding_db | t_order | COLUMN | order_id | {"name":"order_id",...} |
+| sharding_db | t_order | COLUMN | user_id | {"name":"user_id",...} |
+| sharding_db | t_order | COLUMN | status | {"name":"status",...} |
+| sharding_db | t_order | INDEX | PRIMARY | {"name":"PRIMARY",...} |
+---------------+------------+--------+----------+---------------------------+
8 rows in set (0.01 sec)
```
@@ -85,10 +85,10 @@ mysql> SHOW TABLE METADATA t_order FROM sharding_db;
+---------------+------------+--------+----------+---------------------------+
| database_name | table_name | type | name | value |
+---------------+------------+--------+----------+---------------------------+
-| sharding_db | t_order | COLUMN | order_id | ShardingSphereColumn(...) |
-| sharding_db | t_order | COLUMN | user_id | ShardingSphereColumn(...) |
-| sharding_db | t_order | COLUMN | status | ShardingSphereColumn(...) |
-| sharding_db | t_order | INDEX | PRIMARY | ShardingSphereIndex(...) |
+| sharding_db | t_order | COLUMN | order_id | {"name":"order_id",...} |
+| sharding_db | t_order | COLUMN | user_id | {"name":"user_id",...} |
+| sharding_db | t_order | COLUMN | status | {"name":"status",...} |
+| sharding_db | t_order | INDEX | PRIMARY | {"name":"PRIMARY",...} |
+---------------+------------+--------+----------+---------------------------+
4 rows in set (0.00 sec)
```
@@ -104,14 +104,14 @@ mysql> SHOW TABLE METADATA t_order, t_order_1;
+---------------+------------+--------+----------+---------------------------+
| database_name | table_name | type | name | value |
+---------------+------------+--------+----------+---------------------------+
-| sharding_db | t_order_1 | COLUMN | order_id | ShardingSphereColumn(...) |
-| sharding_db | t_order_1 | COLUMN | user_id | ShardingSphereColumn(...) |
-| sharding_db | t_order_1 | COLUMN | status | ShardingSphereColumn(...) |
-| sharding_db | t_order_1 | INDEX | PRIMARY | ShardingSphereIndex(...) |
-| sharding_db | t_order | COLUMN | order_id | ShardingSphereColumn(...) |
-| sharding_db | t_order | COLUMN | user_id | ShardingSphereColumn(...) |
-| sharding_db | t_order | COLUMN | status | ShardingSphereColumn(...) |
-| sharding_db | t_order | INDEX | PRIMARY | ShardingSphereIndex(...) |
+| sharding_db | t_order_1 | COLUMN | order_id | {"name":"order_id",...} |
+| sharding_db | t_order_1 | COLUMN | user_id | {"name":"user_id",...} |
+| sharding_db | t_order_1 | COLUMN | status | {"name":"status",...} |
+| sharding_db | t_order_1 | INDEX | PRIMARY | {"name":"PRIMARY",...} |
+| sharding_db | t_order | COLUMN | order_id | {"name":"order_id",...} |
+| sharding_db | t_order | COLUMN | user_id | {"name":"user_id",...} |
+| sharding_db | t_order | COLUMN | status | {"name":"status",...} |
+| sharding_db | t_order | INDEX | PRIMARY | {"name":"PRIMARY",...} |
+---------------+------------+--------+----------+---------------------------+
8 rows in set (0.00 sec)
```
@@ -127,10 +127,10 @@ mysql> SHOW TABLE METADATA t_order;
+---------------+------------+--------+----------+---------------------------+
| database_name | table_name | type | name | value |
+---------------+------------+--------+----------+---------------------------+
-| sharding_db | t_order | COLUMN | order_id | ShardingSphereColumn(...) |
-| sharding_db | t_order | COLUMN | user_id | ShardingSphereColumn(...) |
-| sharding_db | t_order | COLUMN | status | ShardingSphereColumn(...) |
-| sharding_db | t_order | INDEX | PRIMARY | ShardingSphereIndex(...) |
+| sharding_db | t_order | COLUMN | order_id | {"name":"order_id",...} |
+| sharding_db | t_order | COLUMN | user_id | {"name":"user_id",...} |
+| sharding_db | t_order | COLUMN | status | {"name":"status",...} |
+| sharding_db | t_order | INDEX | PRIMARY | {"name":"PRIMARY",...} |
+---------------+------------+--------+----------+---------------------------+
4 rows in set (0.01 sec)
```
diff --git a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/ral/show-table-metadata.en.md b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/ral/show-table-metadata.en.md
index dc9ea893815..89dba8da4a1 100644
--- a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/ral/show-table-metadata.en.md
+++ b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/ral/show-table-metadata.en.md
@@ -62,14 +62,14 @@ mysql> SHOW TABLE METADATA t_order, `t_order_1` FROM "sharding_db";
+---------------+------------+--------+----------+---------------------------+
| database_name | table_name | type | name | value |
+---------------+------------+--------+----------+---------------------------+
-| sharding_db | t_order_1 | COLUMN | order_id | ShardingSphereColumn(...) |
-| sharding_db | t_order_1 | COLUMN | user_id | ShardingSphereColumn(...) |
-| sharding_db | t_order_1 | COLUMN | status | ShardingSphereColumn(...) |
-| sharding_db | t_order_1 | INDEX | PRIMARY | ShardingSphereIndex(...) |
-| sharding_db | t_order | COLUMN | order_id | ShardingSphereColumn(...) |
-| sharding_db | t_order | COLUMN | user_id | ShardingSphereColumn(...) |
-| sharding_db | t_order | COLUMN | status | ShardingSphereColumn(...) |
-| sharding_db | t_order | INDEX | PRIMARY | ShardingSphereIndex(...) |
+| sharding_db | t_order_1 | COLUMN | order_id | {"name":"order_id",...} |
+| sharding_db | t_order_1 | COLUMN | user_id | {"name":"user_id",...} |
+| sharding_db | t_order_1 | COLUMN | status | {"name":"status",...} |
+| sharding_db | t_order_1 | INDEX | PRIMARY | {"name":"PRIMARY",...} |
+| sharding_db | t_order | COLUMN | order_id | {"name":"order_id",...} |
+| sharding_db | t_order | COLUMN | user_id | {"name":"user_id",...} |
+| sharding_db | t_order | COLUMN | status | {"name":"status",...} |
+| sharding_db | t_order | INDEX | PRIMARY | {"name":"PRIMARY",...} |
+---------------+------------+--------+----------+---------------------------+
8 rows in set (0.01 sec)
```
@@ -85,10 +85,10 @@ mysql> SHOW TABLE METADATA "t_order" FROM `sharding_db`;
+---------------+------------+--------+----------+---------------------------+
| database_name | table_name | type | name | value |
+---------------+------------+--------+----------+---------------------------+
-| sharding_db | t_order | COLUMN | order_id | ShardingSphereColumn(...) |
-| sharding_db | t_order | COLUMN | user_id | ShardingSphereColumn(...) |
-| sharding_db | t_order | COLUMN | status | ShardingSphereColumn(...) |
-| sharding_db | t_order | INDEX | PRIMARY | ShardingSphereIndex(...) |
+| sharding_db | t_order | COLUMN | order_id | {"name":"order_id",...} |
+| sharding_db | t_order | COLUMN | user_id | {"name":"user_id",...} |
+| sharding_db | t_order | COLUMN | status | {"name":"status",...} |
+| sharding_db | t_order | INDEX | PRIMARY | {"name":"PRIMARY",...} |
+---------------+------------+--------+----------+---------------------------+
4 rows in set (0.00 sec)
```
@@ -104,14 +104,14 @@ mysql> SHOW TABLE METADATA `t_order`, "t_order_1";
+---------------+------------+--------+----------+---------------------------+
| database_name | table_name | type | name | value |
+---------------+------------+--------+----------+---------------------------+
-| sharding_db | t_order_1 | COLUMN | order_id | ShardingSphereColumn(...) |
-| sharding_db | t_order_1 | COLUMN | user_id | ShardingSphereColumn(...) |
-| sharding_db | t_order_1 | COLUMN | status | ShardingSphereColumn(...) |
-| sharding_db | t_order_1 | INDEX | PRIMARY | ShardingSphereIndex(...) |
-| sharding_db | t_order | COLUMN | order_id | ShardingSphereColumn(...) |
-| sharding_db | t_order | COLUMN | user_id | ShardingSphereColumn(...) |
-| sharding_db | t_order | COLUMN | status | ShardingSphereColumn(...) |
-| sharding_db | t_order | INDEX | PRIMARY | ShardingSphereIndex(...) |
+| sharding_db | t_order_1 | COLUMN | order_id | {"name":"order_id",...} |
+| sharding_db | t_order_1 | COLUMN | user_id | {"name":"user_id",...} |
+| sharding_db | t_order_1 | COLUMN | status | {"name":"status",...} |
+| sharding_db | t_order_1 | INDEX | PRIMARY | {"name":"PRIMARY",...} |
+| sharding_db | t_order | COLUMN | order_id | {"name":"order_id",...} |
+| sharding_db | t_order | COLUMN | user_id | {"name":"user_id",...} |
+| sharding_db | t_order | COLUMN | status | {"name":"status",...} |
+| sharding_db | t_order | INDEX | PRIMARY | {"name":"PRIMARY",...} |
+---------------+------------+--------+----------+---------------------------+
8 rows in set (0.00 sec)
```
@@ -127,10 +127,10 @@ mysql> SHOW TABLE METADATA "t_order";
+---------------+------------+--------+----------+---------------------------+
| database_name | table_name | type | name | value |
+---------------+------------+--------+----------+---------------------------+
-| sharding_db | t_order | COLUMN | order_id | ShardingSphereColumn(...) |
-| sharding_db | t_order | COLUMN | user_id | ShardingSphereColumn(...) |
-| sharding_db | t_order | COLUMN | status | ShardingSphereColumn(...) |
-| sharding_db | t_order | INDEX | PRIMARY | ShardingSphereIndex(...) |
+| sharding_db | t_order | COLUMN | order_id | {"name":"order_id",...} |
+| sharding_db | t_order | COLUMN | user_id | {"name":"user_id",...} |
+| sharding_db | t_order | COLUMN | status | {"name":"status",...} |
+| sharding_db | t_order | INDEX | PRIMARY | {"name":"PRIMARY",...} |
+---------------+------------+--------+----------+---------------------------+
4 rows in set (0.01 sec)
```
diff --git a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/encrypt/alter-encrypt-rule.cn.md b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/encrypt/alter-encrypt-rule.cn.md
index b4518529b02..2724027066d 100644
--- a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/encrypt/alter-encrypt-rule.cn.md
+++ b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/encrypt/alter-encrypt-rule.cn.md
@@ -19,7 +19,7 @@ encryptDefinition ::=
ruleName '(' 'COLUMNS' '(' columnDefinition (',' columnDefinition)* ')' ')'
columnDefinition ::=
- '(' 'NAME' '=' columnName ',' 'CIPHER' '=' cipherColumnName (',' 'ASSISTED_QUERY' '=' assistedQueryColumnName)? (',' 'LIKE_QUERY' '=' likeQueryColumnName)? ',' encryptAlgorithmDefinition (',' assistedQueryAlgorithmDefinition)? (',' likeQueryAlgorithmDefinition)? ')'
+ '(' 'NAME' '=' columnName ',' 'CIPHER' '=' cipherColumnName (',' ('ASSISTED_QUERY' | 'ASSISTED_QUERY_COLUMN') '=' assistedQueryColumnName)? (',' ('LIKE_QUERY' | 'LIKE_QUERY_COLUMN') '=' likeQueryColumnName)? ',' encryptAlgorithmDefinition (',' assistedQueryAlgorithmDefinition)? (',' likeQueryAlgorithmDefinition)? ')'
encryptAlgorithmDefinition ::=
'ENCRYPT_ALGORITHM' '(' algorithmDefinition ')'
@@ -34,7 +34,7 @@ algorithmDefinition ::=
'TYPE' '(' 'NAME' '=' algorithmType (',' propertiesDefinition)? ')'
propertiesDefinition ::=
- 'PROPERTIES' '(' key '=' value (',' key '=' value)* ')'
+ 'PROPERTIES' '(' (key '=' value (',' key '=' value)*)? ')'
ruleName ::=
identifier
@@ -68,7 +68,7 @@ value ::=
### 补充说明
-- `CIPHER` 指定密文数据列,`ASSISTED_QUERY` 指定辅助查询列,`LIKE_QUERY` 指定模糊查询列;
+- `CIPHER` 指定密文数据列,`ASSISTED_QUERY` 或 `ASSISTED_QUERY_COLUMN` 指定辅助查询列,`LIKE_QUERY` 或 `LIKE_QUERY_COLUMN` 指定模糊查询列;
- `algorithmType` 指定加密算法类型,请参考 [加密算法](/cn/user-manual/common-config/builtin-algorithm/encrypt/);
- 重复的 `ruleName` 将无法被创建。
@@ -86,7 +86,7 @@ COLUMNS(
### 保留字
-`ALTER`、`ENCRYPT`、`RULE`、`COLUMNS`、`NAME`、`CIPHER`、`ASSISTED_QUERY`、`LIKE_QUERY`、`ENCRYPT_ALGORITHM`、`ASSISTED_QUERY_ALGORITHM`、`LIKE_QUERY_ALGORITHM`、`TYPE`、`TRUE`、`FALSE`
+`ALTER`、`ENCRYPT`、`RULE`、`COLUMNS`、`NAME`、`CIPHER`、`ASSISTED_QUERY`、`ASSISTED_QUERY_COLUMN`、`LIKE_QUERY`、`LIKE_QUERY_COLUMN`、`ENCRYPT_ALGORITHM`、`ASSISTED_QUERY_ALGORITHM`、`LIKE_QUERY_ALGORITHM`、`TYPE`、`TRUE`、`FALSE`
### 相关链接
diff --git a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/encrypt/alter-encrypt-rule.en.md b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/encrypt/alter-encrypt-rule.en.md
index baed336f82f..f5a8fdcea88 100644
--- a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/encrypt/alter-encrypt-rule.en.md
+++ b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/encrypt/alter-encrypt-rule.en.md
@@ -19,7 +19,7 @@ encryptDefinition ::=
ruleName '(' 'COLUMNS' '(' columnDefinition (',' columnDefinition)* ')' ')'
columnDefinition ::=
- '(' 'NAME' '=' columnName ',' 'CIPHER' '=' cipherColumnName (',' 'ASSISTED_QUERY' '=' assistedQueryColumnName)? (',' 'LIKE_QUERY' '=' likeQueryColumnName)? ',' encryptAlgorithmDefinition (',' assistedQueryAlgorithmDefinition)? (',' likeQueryAlgorithmDefinition)? ')'
+ '(' 'NAME' '=' columnName ',' 'CIPHER' '=' cipherColumnName (',' ('ASSISTED_QUERY' | 'ASSISTED_QUERY_COLUMN') '=' assistedQueryColumnName)? (',' ('LIKE_QUERY' | 'LIKE_QUERY_COLUMN') '=' likeQueryColumnName)? ',' encryptAlgorithmDefinition (',' assistedQueryAlgorithmDefinition)? (',' likeQueryAlgorithmDefinition)? ')'
encryptAlgorithmDefinition ::=
'ENCRYPT_ALGORITHM' '(' algorithmDefinition ')'
@@ -34,7 +34,7 @@ algorithmDefinition ::=
'TYPE' '(' 'NAME' '=' algorithmType (',' propertiesDefinition)? ')'
propertiesDefinition ::=
- 'PROPERTIES' '(' key '=' value (',' key '=' value)* ')'
+ 'PROPERTIES' '(' (key '=' value (',' key '=' value)*)? ')'
ruleName ::=
identifier
@@ -68,7 +68,7 @@ value ::=
### Supplement
-- `CIPHER` specifies the cipher column, `ASSISTED_QUERY` specifies the assisted query column,`LIKE_QUERY` specifies the like query column
+- `CIPHER` specifies the cipher column, `ASSISTED_QUERY` or `ASSISTED_QUERY_COLUMN` specifies the assisted query column, and `LIKE_QUERY` or `LIKE_QUERY_COLUMN` specifies the like query column
- `algorithmType` specifies the encryption algorithm type, please refer to [Encryption Algorithm](/en/user-manual/common-config/builtin-algorithm/encrypt/)
### Example
@@ -85,7 +85,7 @@ COLUMNS(
### Reserved words
-`ALTER`, `ENCRYPT`, `RULE`, `COLUMNS`, `NAME`, `CIPHER`, `ASSISTED_QUERY`, `LIKE_QUERY`, `ENCRYPT_ALGORITHM`, `ASSISTED_QUERY_ALGORITHM`, `LIKE_QUERY_ALGORITHM`, `TYPE`, `TRUE`, `FALSE`
+`ALTER`, `ENCRYPT`, `RULE`, `COLUMNS`, `NAME`, `CIPHER`, `ASSISTED_QUERY`, `ASSISTED_QUERY_COLUMN`, `LIKE_QUERY`, `LIKE_QUERY_COLUMN`, `ENCRYPT_ALGORITHM`, `ASSISTED_QUERY_ALGORITHM`, `LIKE_QUERY_ALGORITHM`, `TYPE`, `TRUE`, `FALSE`
### Related links
diff --git a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/encrypt/create-encrypt-rule.cn.md b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/encrypt/create-encrypt-rule.cn.md
index 246b74b271a..952262ad8a0 100644
--- a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/encrypt/create-encrypt-rule.cn.md
+++ b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/encrypt/create-encrypt-rule.cn.md
@@ -22,7 +22,7 @@ encryptDefinition ::=
ruleName '(' 'COLUMNS' '(' columnDefinition (',' columnDefinition)* ')' ')'
columnDefinition ::=
- '(' 'NAME' '=' columnName ',' 'CIPHER' '=' cipherColumnName (',' 'ASSISTED_QUERY' '=' assistedQueryColumnName)? (',' 'LIKE_QUERY' '=' likeQueryColumnName)? ',' encryptAlgorithmDefinition (',' assistedQueryAlgorithmDefinition)? (',' likeQueryAlgorithmDefinition)? ')'
+ '(' 'NAME' '=' columnName ',' 'CIPHER' '=' cipherColumnName (',' ('ASSISTED_QUERY' | 'ASSISTED_QUERY_COLUMN') '=' assistedQueryColumnName)? (',' ('LIKE_QUERY' | 'LIKE_QUERY_COLUMN') '=' likeQueryColumnName)? ',' encryptAlgorithmDefinition (',' assistedQueryAlgorithmDefinition)? (',' likeQueryAlgorithmDefinition)? ')'
encryptAlgorithmDefinition ::=
'ENCRYPT_ALGORITHM' '(' algorithmDefinition ')'
@@ -37,7 +37,7 @@ algorithmDefinition ::=
'TYPE' '(' 'NAME' '=' algorithmType (',' propertiesDefinition)? ')'
propertiesDefinition ::=
- 'PROPERTIES' '(' key '=' value (',' key '=' value)* ')'
+ 'PROPERTIES' '(' (key '=' value (',' key '=' value)*)? ')'
ruleName ::=
identifier
@@ -71,7 +71,7 @@ value ::=
### 补充说明
-- `CIPHER` 指定密文数据列,`ASSISTED_QUERY` 指定辅助查询列,`LIKE_QUERY` 指定模糊查询列;
+- `CIPHER` 指定密文数据列,`ASSISTED_QUERY` 或 `ASSISTED_QUERY_COLUMN` 指定辅助查询列,`LIKE_QUERY` 或 `LIKE_QUERY_COLUMN` 指定模糊查询列;
- `algorithmType` 指定加密算法类型,请参考 [加密算法](/cn/user-manual/common-config/builtin-algorithm/encrypt/);
- 重复的 `ruleName` 将无法被创建;
- `ifNotExists` 子句用于避免出现 `Duplicate encrypt rule` 错误。
@@ -110,7 +110,7 @@ COLUMNS(
### 保留字
-`CREATE`、`ENCRYPT`、`RULE`、`COLUMNS`、`NAME`、`CIPHER`、`ASSISTED_QUERY`、`LIKE_QUERY`、`ENCRYPT_ALGORITHM`、`ASSISTED_QUERY_ALGORITHM`、`LIKE_QUERY_ALGORITHM`、`TYPE`、`TRUE`、`FALSE`
+`CREATE`、`ENCRYPT`、`RULE`、`COLUMNS`、`NAME`、`CIPHER`、`ASSISTED_QUERY`、`ASSISTED_QUERY_COLUMN`、`LIKE_QUERY`、`LIKE_QUERY_COLUMN`、`ENCRYPT_ALGORITHM`、`ASSISTED_QUERY_ALGORITHM`、`LIKE_QUERY_ALGORITHM`、`TYPE`、`TRUE`、`FALSE`
### 相关链接
diff --git a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/encrypt/create-encrypt-rule.en.md b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/encrypt/create-encrypt-rule.en.md
index f21cf85c792..66463539379 100644
--- a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/encrypt/create-encrypt-rule.en.md
+++ b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/encrypt/create-encrypt-rule.en.md
@@ -22,7 +22,7 @@ encryptDefinition ::=
ruleName '(' 'COLUMNS' '(' columnDefinition (',' columnDefinition)* ')' ')'
columnDefinition ::=
- '(' 'NAME' '=' columnName ',' 'CIPHER' '=' cipherColumnName (',' 'ASSISTED_QUERY' '=' assistedQueryColumnName)? (',' 'LIKE_QUERY' '=' likeQueryColumnName)? ',' encryptAlgorithmDefinition (',' assistedQueryAlgorithmDefinition)? (',' likeQueryAlgorithmDefinition)? ')'
+ '(' 'NAME' '=' columnName ',' 'CIPHER' '=' cipherColumnName (',' ('ASSISTED_QUERY' | 'ASSISTED_QUERY_COLUMN') '=' assistedQueryColumnName)? (',' ('LIKE_QUERY' | 'LIKE_QUERY_COLUMN') '=' likeQueryColumnName)? ',' encryptAlgorithmDefinition (',' assistedQueryAlgorithmDefinition)? (',' likeQueryAlgorithmDefinition)? ')'
encryptAlgorithmDefinition ::=
'ENCRYPT_ALGORITHM' '(' algorithmDefinition ')'
@@ -37,7 +37,7 @@ algorithmDefinition ::=
'TYPE' '(' 'NAME' '=' algorithmType (',' propertiesDefinition)? ')'
propertiesDefinition ::=
- 'PROPERTIES' '(' key '=' value (',' key '=' value)* ')'
+ 'PROPERTIES' '(' (key '=' value (',' key '=' value)*)? ')'
ruleName ::=
identifier
@@ -71,7 +71,7 @@ value ::=
### Supplement
-- `CIPHER` specifies the cipher column, `ASSISTED_QUERY` specifies the assisted query column,`LIKE_QUERY` specifies the like query column;
+- `CIPHER` specifies the cipher column, `ASSISTED_QUERY` or `ASSISTED_QUERY_COLUMN` specifies the assisted query column, and `LIKE_QUERY` or `LIKE_QUERY_COLUMN` specifies the like query column;
- `algorithmType` specifies the encryption algorithm type, please refer to [Encryption Algorithm](/en/user-manual/common-config/builtin-algorithm/encrypt/);
- Duplicate `ruleName` will not be created;
- `ifNotExists` clause used for avoid `Duplicate encrypt rule` error.
@@ -110,7 +110,7 @@ COLUMNS(
### Reserved words
-`CREATE`, `ENCRYPT`, `RULE`, `COLUMNS`, `NAME`, `CIPHER`, `ASSISTED_QUERY`, `LIKE_QUERY`, `ENCRYPT_ALGORITHM`, `ASSISTED_QUERY_ALGORITHM`, `LIKE_QUERY_ALGORITHM`, `TYPE`, `TRUE`, `FALSE`
+`CREATE`, `ENCRYPT`, `RULE`, `COLUMNS`, `NAME`, `CIPHER`, `ASSISTED_QUERY`, `ASSISTED_QUERY_COLUMN`, `LIKE_QUERY`, `LIKE_QUERY_COLUMN`, `ENCRYPT_ALGORITHM`, `ASSISTED_QUERY_ALGORITHM`, `LIKE_QUERY_ALGORITHM`, `TYPE`, `TRUE`, `FALSE`
### Related links
diff --git a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/mask/alter-mask-rule.cn.md b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/mask/alter-mask-rule.cn.md
index 856d29fdf2d..1e5ac95c28c 100644
--- a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/mask/alter-mask-rule.cn.md
+++ b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/mask/alter-mask-rule.cn.md
@@ -25,7 +25,7 @@ maskAlgorithmDefinition ::=
'TYPE' '(' 'NAME' '=' algorithmType (',' propertiesDefinition)? ')'
propertiesDefinition ::=
- 'PROPERTIES' '(' key '=' value (',' key '=' value)* ')'
+ 'PROPERTIES' '(' (key '=' value (',' key '=' value)*)? ')'
ruleName ::=
identifier
diff --git a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/mask/alter-mask-rule.en.md b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/mask/alter-mask-rule.en.md
index a470be3d5dd..79c3641c313 100644
--- a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/mask/alter-mask-rule.en.md
+++ b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/mask/alter-mask-rule.en.md
@@ -5,7 +5,7 @@ weight = 2
## Description
-The `ALTER MASK RULE` syntax is used to create a mask rule.
+The `ALTER MASK RULE` syntax is used to alter a mask rule.
### Syntax
@@ -25,7 +25,7 @@ maskAlgorithmDefinition ::=
'TYPE' '(' 'NAME' '=' algorithmType (',' propertiesDefinition)? ')'
propertiesDefinition ::=
- 'PROPERTIES' '(' key '=' value (',' key '=' value)* ')'
+ 'PROPERTIES' '(' (key '=' value (',' key '=' value)*)? ')'
ruleName ::=
identifier
diff --git a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/mask/create-mask-rule.cn.md b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/mask/create-mask-rule.cn.md
index 31c15fd789b..bd95b559dca 100644
--- a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/mask/create-mask-rule.cn.md
+++ b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/mask/create-mask-rule.cn.md
@@ -28,7 +28,7 @@ maskAlgorithmDefinition ::=
'TYPE' '(' 'NAME' '=' algorithmType (',' propertiesDefinition)? ')'
propertiesDefinition ::=
- 'PROPERTIES' '(' key '=' value (',' key '=' value)* ')'
+ 'PROPERTIES' '(' (key '=' value (',' key '=' value)*)? ')'
ruleName ::=
identifier
diff --git a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/mask/create-mask-rule.en.md b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/mask/create-mask-rule.en.md
index c24c256ff90..0fca07c7147 100644
--- a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/mask/create-mask-rule.en.md
+++ b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/mask/create-mask-rule.en.md
@@ -28,7 +28,7 @@ maskAlgorithmDefinition ::=
'TYPE' '(' 'NAME' '=' algorithmType (',' propertiesDefinition)? ')'
propertiesDefinition ::=
- 'PROPERTIES' '(' key '=' value (',' key '=' value)* ')'
+ 'PROPERTIES' '(' (key '=' value (',' key '=' value)*)? ')'
ruleName ::=
identifier
diff --git a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/readwrite-splitting/alter-readwrite-splitting-rule.cn.md b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/readwrite-splitting/alter-readwrite-splitting-rule.cn.md
index 37f0930ebe2..f09052fc58d 100644
--- a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/readwrite-splitting/alter-readwrite-splitting-rule.cn.md
+++ b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/readwrite-splitting/alter-readwrite-splitting-rule.cn.md
@@ -43,7 +43,7 @@ algorithmType ::=
string
propertiesDefinition ::=
- 'PROPERTIES' '(' key '=' value (',' key '=' value)* ')'
+ 'PROPERTIES' '(' (key '=' value (',' key '=' value)*)? ')'
key ::=
string
diff --git a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/readwrite-splitting/alter-readwrite-splitting-rule.en.md b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/readwrite-splitting/alter-readwrite-splitting-rule.en.md
index 66b4303760b..872a8f98718 100644
--- a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/readwrite-splitting/alter-readwrite-splitting-rule.en.md
+++ b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/readwrite-splitting/alter-readwrite-splitting-rule.en.md
@@ -43,7 +43,7 @@ algorithmType ::=
string
propertiesDefinition ::=
- 'PROPERTIES' '(' key '=' value (',' key '=' value)* ')'
+ 'PROPERTIES' '(' (key '=' value (',' key '=' value)*)? ')'
key ::=
string
diff --git a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/readwrite-splitting/create-readwrite-splitting-rule.cn.md b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/readwrite-splitting/create-readwrite-splitting-rule.cn.md
index 11bd172d492..6c26a504a4b 100644
--- a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/readwrite-splitting/create-readwrite-splitting-rule.cn.md
+++ b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/readwrite-splitting/create-readwrite-splitting-rule.cn.md
@@ -46,7 +46,7 @@ algorithmType ::=
string
propertiesDefinition ::=
- 'PROPERTIES' '(' key '=' value (',' key '=' value)* ')'
+ 'PROPERTIES' '(' (key '=' value (',' key '=' value)*)? ')'
key ::=
string
diff --git a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/readwrite-splitting/create-readwrite-splitting-rule.en.md b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/readwrite-splitting/create-readwrite-splitting-rule.en.md
index 687155bf0b8..f17d53f6ffe 100644
--- a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/readwrite-splitting/create-readwrite-splitting-rule.en.md
+++ b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/readwrite-splitting/create-readwrite-splitting-rule.en.md
@@ -46,7 +46,7 @@ algorithmType ::=
string
propertiesDefinition ::=
- 'PROPERTIES' '(' key '=' value (',' key '=' value)* ')'
+ 'PROPERTIES' '(' (key '=' value (',' key '=' value)*)? ')'
key ::=
string
diff --git a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/shadow/alter-default-shadow-algorithm.cn.md b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/shadow/alter-default-shadow-algorithm.cn.md
index 4d53a8f2bcf..c0d50f709b2 100644
--- a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/shadow/alter-default-shadow-algorithm.cn.md
+++ b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/shadow/alter-default-shadow-algorithm.cn.md
@@ -22,7 +22,7 @@ algorithmType ::=
string
propertiesDefinition ::=
- 'PROPERTIES' '(' key '=' value (',' key '=' value)* ')'
+ 'PROPERTIES' '(' (key '=' value (',' key '=' value)*)? ')'
key ::=
string
diff --git a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/shadow/alter-default-shadow-algorithm.en.md b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/shadow/alter-default-shadow-algorithm.en.md
index b4a55087f27..208083d812e 100644
--- a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/shadow/alter-default-shadow-algorithm.en.md
+++ b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/shadow/alter-default-shadow-algorithm.en.md
@@ -22,7 +22,7 @@ algorithmType ::=
string
propertiesDefinition ::=
- 'PROPERTIES' '(' key '=' value (',' key '=' value)* ')'
+ 'PROPERTIES' '(' (key '=' value (',' key '=' value)*)? ')'
key ::=
string
diff --git a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/shadow/alter-shadow-rule.cn.md b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/shadow/alter-shadow-rule.cn.md
index f1635586e76..50ecdcaae3c 100644
--- a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/shadow/alter-shadow-rule.cn.md
+++ b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/shadow/alter-shadow-rule.cn.md
@@ -25,7 +25,7 @@ shadowTableRule ::=
tableName '(' shadowAlgorithm (',' shadowAlgorithm)* ')'
shadowAlgorithm ::=
- 'TYPE' '(' 'NAME' '=' shadowAlgorithmType ',' propertiesDefinition ')'
+ 'TYPE' '(' 'NAME' '=' shadowAlgorithmType (',' propertiesDefinition)? ')'
ruleName ::=
identifier
@@ -43,7 +43,7 @@ shadowAlgorithmType ::=
string
propertiesDefinition ::=
- 'PROPERTIES' '(' key '=' value (',' key '=' value)* ')'
+ 'PROPERTIES' '(' (key '=' value (',' key '=' value)*)? ')'
key ::=
string
diff --git a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/shadow/alter-shadow-rule.en.md b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/shadow/alter-shadow-rule.en.md
index bfd37e81faa..75a85084fcb 100644
--- a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/shadow/alter-shadow-rule.en.md
+++ b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/shadow/alter-shadow-rule.en.md
@@ -25,7 +25,7 @@ shadowTableRule ::=
tableName '(' shadowAlgorithm (',' shadowAlgorithm)* ')'
shadowAlgorithm ::=
- 'TYPE' '(' 'NAME' '=' shadowAlgorithmType ',' propertiesDefinition ')'
+ 'TYPE' '(' 'NAME' '=' shadowAlgorithmType (',' propertiesDefinition)? ')'
ruleName ::=
identifier
@@ -43,7 +43,7 @@ shadowAlgorithmType ::=
string
propertiesDefinition ::=
- 'PROPERTIES' '(' key '=' value (',' key '=' value)* ')'
+ 'PROPERTIES' '(' (key '=' value (',' key '=' value)*)? ')'
key ::=
string
diff --git a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/shadow/create-default-shadow-algorithm.cn.md b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/shadow/create-default-shadow-algorithm.cn.md
index 45122af1ee4..0bf0a2ad91c 100644
--- a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/shadow/create-default-shadow-algorithm.cn.md
+++ b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/shadow/create-default-shadow-algorithm.cn.md
@@ -25,7 +25,7 @@ algorithmType ::=
string
propertiesDefinition ::=
- 'PROPERTIES' '(' key '=' value (',' key '=' value)* ')'
+ 'PROPERTIES' '(' (key '=' value (',' key '=' value)*)? ')'
key ::=
string
diff --git a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/shadow/create-default-shadow-algorithm.en.md b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/shadow/create-default-shadow-algorithm.en.md
index 8f77a92cadb..48cbe168854 100644
--- a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/shadow/create-default-shadow-algorithm.en.md
+++ b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/shadow/create-default-shadow-algorithm.en.md
@@ -25,7 +25,7 @@ algorithmType ::=
string
propertiesDefinition ::=
- 'PROPERTIES' '(' key '=' value (',' key '=' value)* ')'
+ 'PROPERTIES' '(' (key '=' value (',' key '=' value)*)? ')'
key ::=
string
diff --git a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/shadow/create-shadow-rule.cn.md b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/shadow/create-shadow-rule.cn.md
index 73803e72af3..607a37a02a0 100644
--- a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/shadow/create-shadow-rule.cn.md
+++ b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/shadow/create-shadow-rule.cn.md
@@ -28,7 +28,7 @@ shadowTableRule ::=
tableName '(' shadowAlgorithm (',' shadowAlgorithm)* ')'
shadowAlgorithm ::=
- 'TYPE' '(' 'NAME' '=' algorithmType ',' propertiesDefinition ')'
+ 'TYPE' '(' 'NAME' '=' algorithmType (',' propertiesDefinition)? ')'
ruleName ::=
identifier
@@ -46,7 +46,7 @@ algorithmType ::=
string
propertiesDefinition ::=
- 'PROPERTIES' '(' key '=' value (',' key '=' value)* ')'
+ 'PROPERTIES' '(' (key '=' value (',' key '=' value)*)? ')'
key ::=
string
diff --git a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/shadow/create-shadow-rule.en.md b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/shadow/create-shadow-rule.en.md
index 1c8d5a83bff..ab135268670 100644
--- a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/shadow/create-shadow-rule.en.md
+++ b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/shadow/create-shadow-rule.en.md
@@ -28,7 +28,7 @@ shadowTableRule ::=
tableName '(' shadowAlgorithm (',' shadowAlgorithm)* ')'
shadowAlgorithm ::=
- 'TYPE' '(' 'NAME' '=' algorithmType ',' propertiesDefinition ')'
+ 'TYPE' '(' 'NAME' '=' algorithmType (',' propertiesDefinition)? ')'
ruleName ::=
identifier
@@ -46,7 +46,7 @@ algorithmType ::=
string
propertiesDefinition ::=
- 'PROPERTIES' '(' key '=' value (',' key '=' value)* ')'
+ 'PROPERTIES' '(' (key '=' value (',' key '=' value)*)? ')'
key ::=
string
diff --git a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/sharding/alter-default-sharding-strategy.cn.md b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/sharding/alter-default-sharding-strategy.cn.md
index 7fe68a443db..f4af1ca8242 100644
--- a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/sharding/alter-default-sharding-strategy.cn.md
+++ b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/sharding/alter-default-sharding-strategy.cn.md
@@ -16,10 +16,10 @@ AlterDefaultShardingStrategy ::=
'ALTER' 'DEFAULT' 'SHARDING' ('DATABASE' | 'TABLE') 'STRATEGY' '(' shardingStrategy ')'
shardingStrategy ::=
- 'TYPE' '=' strategyType ((',' ('SHARDING_COLUMN' '=' columnName | 'SHARDING_COLUMNS' '=' columnNames))? ',' shardingAlgorithm)?
-
-strategyType ::=
- string | 'STANDARD' | 'COMPLEX' | 'HINT' | 'NONE'
+ 'TYPE' '=' 'NONE'
+ | 'TYPE' '=' 'STANDARD' ',' 'SHARDING_COLUMN' '=' columnName ',' shardingAlgorithm
+ | 'TYPE' '=' 'COMPLEX' ',' 'SHARDING_COLUMNS' '=' columnName ',' columnName (',' columnName)* ',' shardingAlgorithm
+ | 'TYPE' '=' 'HINT' ',' shardingAlgorithm
shardingAlgorithm ::=
'SHARDING_ALGORITHM' '(' algorithmDefinition ')'
@@ -27,9 +27,6 @@ shardingAlgorithm ::=
algorithmDefinition ::=
'TYPE' '(' 'NAME' '=' algorithmType (',' propertiesDefinition)? ')'
-columnNames ::=
- columnName (',' columnName)+
-
columnName ::=
identifier
@@ -37,7 +34,7 @@ algorithmType ::=
string
propertiesDefinition ::=
- 'PROPERTIES' '(' key '=' value (',' key '=' value)* ')'
+ 'PROPERTIES' '(' (key '=' value (',' key '=' value)*)? ')'
key ::=
string
diff --git a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/sharding/alter-default-sharding-strategy.en.md b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/sharding/alter-default-sharding-strategy.en.md
index b6e3cd794c8..9dc2aefe0a1 100644
--- a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/sharding/alter-default-sharding-strategy.en.md
+++ b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/sharding/alter-default-sharding-strategy.en.md
@@ -16,10 +16,10 @@ AlterDefaultShardingStrategy ::=
'ALTER' 'DEFAULT' 'SHARDING' ('DATABASE' | 'TABLE') 'STRATEGY' '(' shardingStrategy ')'
shardingStrategy ::=
- 'TYPE' '=' strategyType ((',' ('SHARDING_COLUMN' '=' columnName | 'SHARDING_COLUMNS' '=' columnNames))? ',' shardingAlgorithm)?
-
-strategyType ::=
- string | 'STANDARD' | 'COMPLEX' | 'HINT' | 'NONE'
+ 'TYPE' '=' 'NONE'
+ | 'TYPE' '=' 'STANDARD' ',' 'SHARDING_COLUMN' '=' columnName ',' shardingAlgorithm
+ | 'TYPE' '=' 'COMPLEX' ',' 'SHARDING_COLUMNS' '=' columnName ',' columnName (',' columnName)* ',' shardingAlgorithm
+ | 'TYPE' '=' 'HINT' ',' shardingAlgorithm
shardingAlgorithm ::=
'SHARDING_ALGORITHM' '(' algorithmDefinition ')'
@@ -27,9 +27,6 @@ shardingAlgorithm ::=
algorithmDefinition ::=
'TYPE' '(' 'NAME' '=' algorithmType (',' propertiesDefinition)? ')'
-columnNames ::=
- columnName (',' columnName)+
-
columnName ::=
identifier
@@ -37,7 +34,7 @@ algorithmType ::=
string
propertiesDefinition ::=
- 'PROPERTIES' '(' key '=' value (',' key '=' value)* ')'
+ 'PROPERTIES' '(' (key '=' value (',' key '=' value)*)? ')'
key ::=
string
diff --git a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/sharding/alter-sharding-key-generate-strategy.cn.md b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/sharding/alter-sharding-key-generate-strategy.cn.md
index 06d3997507d..8dae40fce38 100644
--- a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/sharding/alter-sharding-key-generate-strategy.cn.md
+++ b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/sharding/alter-sharding-key-generate-strategy.cn.md
@@ -33,7 +33,7 @@ algorithmDefinition ::=
'TYPE' '(' 'NAME' '=' algorithmType (',' propertiesDefinition)? ')'
propertiesDefinition ::=
- 'PROPERTIES' '(' key '=' value (',' key '=' value)* ')'
+ 'PROPERTIES' '(' (key '=' value (',' key '=' value)*)? ')'
key ::=
string
diff --git a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/sharding/alter-sharding-key-generate-strategy.en.md b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/sharding/alter-sharding-key-generate-strategy.en.md
index 5a813f9e269..156ce4af4ba 100644
--- a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/sharding/alter-sharding-key-generate-strategy.en.md
+++ b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/sharding/alter-sharding-key-generate-strategy.en.md
@@ -33,7 +33,7 @@ algorithmDefinition ::=
'TYPE' '(' 'NAME' '=' algorithmType (',' propertiesDefinition)? ')'
propertiesDefinition ::=
- 'PROPERTIES' '(' key '=' value (',' key '=' value)* ')'
+ 'PROPERTIES' '(' (key '=' value (',' key '=' value)*)? ')'
key ::=
string
diff --git a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/sharding/alter-sharding-key-generator.cn.md b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/sharding/alter-sharding-key-generator.cn.md
index 37ec921a34c..8eb2b69c1cd 100644
--- a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/sharding/alter-sharding-key-generator.cn.md
+++ b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/sharding/alter-sharding-key-generator.cn.md
@@ -19,7 +19,7 @@ algorithmDefinition ::=
'TYPE' '(' 'NAME' '=' algorithmType (',' propertiesDefinition)? ')'
propertiesDefinition ::=
- 'PROPERTIES' '(' key '=' value (',' key '=' value)* ')'
+ 'PROPERTIES' '(' (key '=' value (',' key '=' value)*)? ')'
key ::=
string
diff --git a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/sharding/alter-sharding-key-generator.en.md b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/sharding/alter-sharding-key-generator.en.md
index 36e26600c6b..9d778bb1fcd 100644
--- a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/sharding/alter-sharding-key-generator.en.md
+++ b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/sharding/alter-sharding-key-generator.en.md
@@ -19,7 +19,7 @@ algorithmDefinition ::=
'TYPE' '(' 'NAME' '=' algorithmType (',' propertiesDefinition)? ')'
propertiesDefinition ::=
- 'PROPERTIES' '(' key '=' value (',' key '=' value)* ')'
+ 'PROPERTIES' '(' (key '=' value (',' key '=' value)*)? ')'
key ::=
string
diff --git a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/sharding/alter-sharding-table-rule.cn.md b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/sharding/alter-sharding-table-rule.cn.md
index 375640fb8e8..e1c2530bc3b 100644
--- a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/sharding/alter-sharding-table-rule.cn.md
+++ b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/sharding/alter-sharding-table-rule.cn.md
@@ -22,7 +22,13 @@ autoTableRuleDefinition ::=
ruleName '(' 'STORAGE_UNITS' '(' storageUnitName (',' storageUnitName)* ')' ',' 'SHARDING_COLUMN' '=' columnName ',' algorithmDefinition (',' 'KEY_GENERATE_STRATEGY' '(' keyGenerateStrategyDefinition ')')? (',' auditStrategyDefinition)? ')'
strategyDefinition ::=
- 'TYPE' '=' strategyType ',' ('SHARDING_COLUMN' | 'SHARDING_COLUMNS') '=' columnName ',' algorithmDefinition
+ 'TYPE' '=' 'NONE'
+ | 'TYPE' '=' 'STANDARD' ',' 'SHARDING_COLUMN' '=' columnName ',' shardingAlgorithm
+ | 'TYPE' '=' 'COMPLEX' ',' 'SHARDING_COLUMNS' '=' columnName ',' columnName (',' columnName)* ',' shardingAlgorithm
+ | 'TYPE' '=' 'HINT' ',' shardingAlgorithm
+
+shardingAlgorithm ::=
+ 'SHARDING_ALGORITHM' '(' algorithmDefinition ')'
keyGenerateStrategyDefinition ::=
'COLUMN' '=' columnName ',' keyGenerateAlgorithmDefinition
@@ -38,10 +44,10 @@ boolean ::=
'TRUE' | 'FALSE'
algorithmDefinition ::=
- 'TYPE' '(' 'NAME' '=' algorithmType (',' propertiesDefinition)?')'
+ 'TYPE' '(' 'NAME' '=' algorithmType (',' propertiesDefinition)? ')'
propertiesDefinition ::=
- 'PROPERTIES' '(' key '=' value (',' key '=' value)* ')'
+ 'PROPERTIES' '(' (key '=' value (',' key '=' value)*)? ')'
key ::=
string
@@ -64,9 +70,6 @@ columnName ::=
keyGeneratorName ::=
identifier
-strategyType ::=
- string
-
algorithmType ::=
string
```
@@ -83,8 +86,7 @@ algorithmType ::=
- 当使用标准分片时:
- `DATANODES` 只能使用已经添加到当前逻辑库的资源,且只能使用 INLINE 表达式指定需要的资源;
- `DATABASE_STRATEGY`、`TABLE_STRATEGY` 表示分库和分表策略,均为可选项,未配置时使用默认策略;
- - `strategyDefinition` 中属性 `TYPE` 用于指定[分片算法](/cn/user-manual/common-config/builtin-algorithm/sharding/#自定义类分片算法)的类型,目前仅支持 `STANDARD`
- 、`COMPLEX`。使用 `COMPLEX` 时需要用 `SHARDING_COLUMNS` 指定多个分片键。
+ - `strategyDefinition` 中的 `TYPE` 用于指定策略类型,支持 `STANDARD`、`COMPLEX`、`HINT` 和 `NONE`。使用 `COMPLEX` 时需要用 `SHARDING_COLUMNS` 指定多个分片键。
- 当使用自动分片时:
- `STORAGE_UNITS` 只能使用已经添加到当前逻辑库的资源,可通过枚举或 INLINE 表达式指定需要的资源;
- 只能使用自动分片算法,可参考[自动分片算法](/cn/user-manual/common-config/builtin-algorithm/sharding/#自动分片算法)。
@@ -137,7 +139,7 @@ AUDIT_STRATEGY(TYPE(NAME="dml_sharding_conditions"),ALLOW_HINT_DISABLE=true)
### 保留字
-`ALTER`、`SHARDING`、`TABLE`、`RULE`、`DATANODES`、`DATABASE_STRATEGY`、`TABLE_STRATEGY`、`KEY_GENERATE_STRATEGY`、`STORAGE_UNITS`、`SHARDING_COLUMN`、`TYPE`、`SHARDING_COLUMN`、`GENERATOR`、`SHARDING_ALGORITHM`、`COLUMN`、`NAME`、`PROPERTIES`、`AUDIT_STRATEGY`、`AUDITORS`、`ALLOW_HINT_DISABLE`
+`ALTER`、`SHARDING`、`TABLE`、`RULE`、`DATANODES`、`DATABASE_STRATEGY`、`TABLE_STRATEGY`、`KEY_GENERATE_STRATEGY`、`STORAGE_UNITS`、`SHARDING_COLUMN`、`SHARDING_COLUMNS`、`TYPE`、`GENERATOR`、`SHARDING_ALGORITHM`、`COLUMN`、`NAME`、`PROPERTIES`、`AUDIT_STRATEGY`、`ALLOW_HINT_DISABLE`、`TRUE`、`FALSE`
### 相关链接
diff --git a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/sharding/alter-sharding-table-rule.en.md b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/sharding/alter-sharding-table-rule.en.md
index 128f73fbdbc..8bd7ace1b5d 100644
--- a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/sharding/alter-sharding-table-rule.en.md
+++ b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/sharding/alter-sharding-table-rule.en.md
@@ -22,7 +22,13 @@ autoTableRuleDefinition ::=
ruleName '(' 'STORAGE_UNITS' '(' storageUnitName (',' storageUnitName)* ')' ',' 'SHARDING_COLUMN' '=' columnName ',' algorithmDefinition (',' 'KEY_GENERATE_STRATEGY' '(' keyGenerateStrategyDefinition ')')? (',' auditStrategyDefinition)? ')'
strategyDefinition ::=
- 'TYPE' '=' strategyType ',' ('SHARDING_COLUMN' | 'SHARDING_COLUMNS') '=' columnName ',' algorithmDefinition
+ 'TYPE' '=' 'NONE'
+ | 'TYPE' '=' 'STANDARD' ',' 'SHARDING_COLUMN' '=' columnName ',' shardingAlgorithm
+ | 'TYPE' '=' 'COMPLEX' ',' 'SHARDING_COLUMNS' '=' columnName ',' columnName (',' columnName)* ',' shardingAlgorithm
+ | 'TYPE' '=' 'HINT' ',' shardingAlgorithm
+
+shardingAlgorithm ::=
+ 'SHARDING_ALGORITHM' '(' algorithmDefinition ')'
keyGenerateStrategyDefinition ::=
'COLUMN' '=' columnName ',' keyGenerateAlgorithmDefinition
@@ -38,10 +44,10 @@ boolean ::=
'TRUE' | 'FALSE'
algorithmDefinition ::=
- 'TYPE' '(' 'NAME' '=' algorithmType (',' propertiesDefinition)?')'
+ 'TYPE' '(' 'NAME' '=' algorithmType (',' propertiesDefinition)? ')'
propertiesDefinition ::=
- 'PROPERTIES' '(' key '=' value (',' key '=' value)* ')'
+ 'PROPERTIES' '(' (key '=' value (',' key '=' value)*)? ')'
key ::=
string
@@ -64,9 +70,6 @@ columnName ::=
keyGeneratorName ::=
identifier
-strategyType ::=
- string
-
algorithmType ::=
string
```
@@ -86,10 +89,7 @@ algorithmType ::=
expressions to specify required resources;
- `DATABASE_STRATEGY`, `TABLE_STRATEGY` are the database sharding strategy and the table sharding strategy, which
are optional, and the default strategy is used when not configured;
- - The attribute `TYPE` in `strategyDefinition` is used to specify the type
- of [Sharding Algorithm](/en/user-manual/common-config/builtin-algorithm/sharding/#class-based-sharding-algorithm), currently only
- supports `STANDARD`, `COMPLEX`. Using `COMPLEX` requires specifying multiple sharding columns
- with `SHARDING_COLUMNS`.
+ - The attribute `TYPE` in `strategyDefinition` specifies the strategy type. `STANDARD`, `COMPLEX`, `HINT`, and `NONE` are supported. Using `COMPLEX` requires specifying multiple sharding columns with `SHARDING_COLUMNS`.
- use auto sharding table rule:
- `STORAGE_UNITS` can only use storage units that have been registered to the current database, and the required storage units can be
specified by enumeration or INLINE expression;
@@ -147,7 +147,7 @@ AUDIT_STRATEGY(TYPE(NAME="dml_sharding_conditions"),ALLOW_HINT_DISABLE=true)
### Reserved word
-`ALTER`, `SHARDING`, `TABLE`, `RULE`, `DATANODES`, `DATABASE_STRATEGY`, `TABLE_STRATEGY`, `KEY_GENERATE_STRATEGY`, `STORAGE_UNITS`, `SHARDING_COLUMN`, `TYPE`, `SHARDING_COLUMN`, `GENERATOR`, `SHARDING_ALGORITHM`, `COLUMN`, `NAME`, `PROPERTIES`, `AUDIT_STRATEGY`, `AUDITORS`, `ALLOW_HINT_DISABLE`
+`ALTER`, `SHARDING`, `TABLE`, `RULE`, `DATANODES`, `DATABASE_STRATEGY`, `TABLE_STRATEGY`, `KEY_GENERATE_STRATEGY`, `STORAGE_UNITS`, `SHARDING_COLUMN`, `SHARDING_COLUMNS`, `TYPE`, `GENERATOR`, `SHARDING_ALGORITHM`, `COLUMN`, `NAME`, `PROPERTIES`, `AUDIT_STRATEGY`, `ALLOW_HINT_DISABLE`, `TRUE`, `FALSE`
### Related links
diff --git a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/sharding/create-default-sharding-strategy.cn.md b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/sharding/create-default-sharding-strategy.cn.md
index 1784e59212d..b6a9b8daadf 100644
--- a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/sharding/create-default-sharding-strategy.cn.md
+++ b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/sharding/create-default-sharding-strategy.cn.md
@@ -19,10 +19,10 @@ ifNotExists ::=
'IF' 'NOT' 'EXISTS'
shardingStrategy ::=
- 'TYPE' '=' strategyType ((',' ('SHARDING_COLUMN' '=' columnName | 'SHARDING_COLUMNS' '=' columnNames))? ',' shardingAlgorithm)?
-
-strategyType ::=
- string | 'STANDARD' | 'COMPLEX' | 'HINT' | 'NONE'
+ 'TYPE' '=' 'NONE'
+ | 'TYPE' '=' 'STANDARD' ',' 'SHARDING_COLUMN' '=' columnName ',' shardingAlgorithm
+ | 'TYPE' '=' 'COMPLEX' ',' 'SHARDING_COLUMNS' '=' columnName ',' columnName (',' columnName)* ',' shardingAlgorithm
+ | 'TYPE' '=' 'HINT' ',' shardingAlgorithm
shardingAlgorithm ::=
'SHARDING_ALGORITHM' '(' algorithmDefinition ')'
@@ -30,9 +30,6 @@ shardingAlgorithm ::=
algorithmDefinition ::=
'TYPE' '(' 'NAME' '=' algorithmType (',' propertiesDefinition)? ')'
-columnNames ::=
- columnName (',' columnName)+
-
columnName ::=
identifier
@@ -40,7 +37,7 @@ algorithmType ::=
string
propertiesDefinition ::=
- 'PROPERTIES' '(' key '=' value (',' key '=' value)* ')'
+ 'PROPERTIES' '(' (key '=' value (',' key '=' value)*)? ')'
key ::=
string
diff --git a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/sharding/create-default-sharding-strategy.en.md b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/sharding/create-default-sharding-strategy.en.md
index df171601f77..3d85092a7e5 100644
--- a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/sharding/create-default-sharding-strategy.en.md
+++ b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/sharding/create-default-sharding-strategy.en.md
@@ -19,10 +19,10 @@ ifNotExists ::=
'IF' 'NOT' 'EXISTS'
shardingStrategy ::=
- 'TYPE' '=' strategyType ((',' ('SHARDING_COLUMN' '=' columnName | 'SHARDING_COLUMNS' '=' columnNames))? ',' shardingAlgorithm)?
-
-strategyType ::=
- string | 'STANDARD' | 'COMPLEX' | 'HINT' | 'NONE'
+ 'TYPE' '=' 'NONE'
+ | 'TYPE' '=' 'STANDARD' ',' 'SHARDING_COLUMN' '=' columnName ',' shardingAlgorithm
+ | 'TYPE' '=' 'COMPLEX' ',' 'SHARDING_COLUMNS' '=' columnName ',' columnName (',' columnName)* ',' shardingAlgorithm
+ | 'TYPE' '=' 'HINT' ',' shardingAlgorithm
shardingAlgorithm ::=
'SHARDING_ALGORITHM' '(' algorithmDefinition ')'
@@ -30,9 +30,6 @@ shardingAlgorithm ::=
algorithmDefinition ::=
'TYPE' '(' 'NAME' '=' algorithmType (',' propertiesDefinition)? ')'
-columnNames ::=
- columnName (',' columnName)+
-
columnName ::=
identifier
@@ -40,7 +37,7 @@ algorithmType ::=
string
propertiesDefinition ::=
- 'PROPERTIES' '(' key '=' value (',' key '=' value)* ')'
+ 'PROPERTIES' '(' (key '=' value (',' key '=' value)*)? ')'
key ::=
string
diff --git a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/sharding/create-sharding-key-generate-strategy.cn.md b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/sharding/create-sharding-key-generate-strategy.cn.md
index e4b687c83e2..f3078350ec8 100644
--- a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/sharding/create-sharding-key-generate-strategy.cn.md
+++ b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/sharding/create-sharding-key-generate-strategy.cn.md
@@ -36,7 +36,7 @@ algorithmDefinition ::=
'TYPE' '(' 'NAME' '=' algorithmType (',' propertiesDefinition)? ')'
propertiesDefinition ::=
- 'PROPERTIES' '(' key '=' value (',' key '=' value)* ')'
+ 'PROPERTIES' '(' (key '=' value (',' key '=' value)*)? ')'
key ::=
string
diff --git a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/sharding/create-sharding-key-generate-strategy.en.md b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/sharding/create-sharding-key-generate-strategy.en.md
index daf7d8c4e31..e6e84223e9c 100644
--- a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/sharding/create-sharding-key-generate-strategy.en.md
+++ b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/sharding/create-sharding-key-generate-strategy.en.md
@@ -36,7 +36,7 @@ algorithmDefinition ::=
'TYPE' '(' 'NAME' '=' algorithmType (',' propertiesDefinition)? ')'
propertiesDefinition ::=
- 'PROPERTIES' '(' key '=' value (',' key '=' value)* ')'
+ 'PROPERTIES' '(' (key '=' value (',' key '=' value)*)? ')'
key ::=
string
diff --git a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/sharding/create-sharding-key-generator.cn.md b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/sharding/create-sharding-key-generator.cn.md
index f3ef08da0ba..e867933c657 100644
--- a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/sharding/create-sharding-key-generator.cn.md
+++ b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/sharding/create-sharding-key-generator.cn.md
@@ -22,7 +22,7 @@ algorithmDefinition ::=
'TYPE' '(' 'NAME' '=' algorithmType (',' propertiesDefinition)? ')'
propertiesDefinition ::=
- 'PROPERTIES' '(' key '=' value (',' key '=' value)* ')'
+ 'PROPERTIES' '(' (key '=' value (',' key '=' value)*)? ')'
key ::=
string
diff --git a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/sharding/create-sharding-key-generator.en.md b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/sharding/create-sharding-key-generator.en.md
index 32ed2abb8e9..44dd3369f8f 100644
--- a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/sharding/create-sharding-key-generator.en.md
+++ b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/sharding/create-sharding-key-generator.en.md
@@ -22,7 +22,7 @@ algorithmDefinition ::=
'TYPE' '(' 'NAME' '=' algorithmType (',' propertiesDefinition)? ')'
propertiesDefinition ::=
- 'PROPERTIES' '(' key '=' value (',' key '=' value)* ')'
+ 'PROPERTIES' '(' (key '=' value (',' key '=' value)*)? ')'
key ::=
string
diff --git a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/sharding/create-sharding-table-rule.cn.md b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/sharding/create-sharding-table-rule.cn.md
index c308a27729f..8689fde7b6c 100644
--- a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/sharding/create-sharding-table-rule.cn.md
+++ b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/sharding/create-sharding-table-rule.cn.md
@@ -25,7 +25,13 @@ autoTableRuleDefinition ::=
ruleName '(' 'STORAGE_UNITS' '(' storageUnitName (',' storageUnitName)* ')' ',' 'SHARDING_COLUMN' '=' columnName ',' algorithmDefinition (',' 'KEY_GENERATE_STRATEGY' '(' keyGenerateStrategyDefinition ')')? (',' auditStrategyDefinition)? ')'
strategyDefinition ::=
- 'TYPE' '=' strategyType ',' ('SHARDING_COLUMN' | 'SHARDING_COLUMNS') '=' columnName ',' algorithmDefinition
+ 'TYPE' '=' 'NONE'
+ | 'TYPE' '=' 'STANDARD' ',' 'SHARDING_COLUMN' '=' columnName ',' shardingAlgorithm
+ | 'TYPE' '=' 'COMPLEX' ',' 'SHARDING_COLUMNS' '=' columnName ',' columnName (',' columnName)* ',' shardingAlgorithm
+ | 'TYPE' '=' 'HINT' ',' shardingAlgorithm
+
+shardingAlgorithm ::=
+ 'SHARDING_ALGORITHM' '(' algorithmDefinition ')'
keyGenerateStrategyDefinition ::=
'COLUMN' '=' columnName ',' keyGenerateAlgorithmDefinition
@@ -41,10 +47,10 @@ boolean ::=
'TRUE' | 'FALSE'
algorithmDefinition ::=
- 'TYPE' '(' 'NAME' '=' algorithmType (',' propertiesDefinition)?')'
+ 'TYPE' '(' 'NAME' '=' algorithmType (',' propertiesDefinition)? ')'
propertiesDefinition ::=
- 'PROPERTIES' '(' key '=' value (',' key '=' value)* ')'
+ 'PROPERTIES' '(' (key '=' value (',' key '=' value)*)? ')'
key ::=
string
@@ -67,9 +73,6 @@ columnName ::=
keyGeneratorName ::=
identifier
-strategyType ::=
- string
-
algorithmType ::=
string
```
@@ -86,8 +89,7 @@ algorithmType ::=
- 当使用标准分片时:
- `DATANODES` 只能使用已经添加到当前逻辑库的资源,且只能使用 INLINE 表达式指定需要的资源;
- `DATABASE_STRATEGY`、`TABLE_STRATEGY` 表示分库和分表策略,均为可选项,未配置时使用默认策略;
- - `strategyDefinition` 中属性 `TYPE` 用于指定[分片算法](/cn/user-manual/common-config/builtin-algorithm/sharding/#自定义类分片算法)的类型,目前仅支持 `STANDARD`
- 、`COMPLEX`。使用 `COMPLEX` 时需要用 `SHARDING_COLUMNS` 指定多个分片键。
+ - `strategyDefinition` 中的 `TYPE` 用于指定策略类型,支持 `STANDARD`、`COMPLEX`、`HINT` 和 `NONE`。使用 `COMPLEX` 时需要用 `SHARDING_COLUMNS` 指定多个分片键。
- 当使用自动分片时:
- `STORAGE_UNITS` 只能使用已经添加到当前逻辑库的资源,可通过枚举或 INLINE 表达式指定需要的资源;
- 只能使用自动分片算法,可参考[自动分片算法](/cn/user-manual/common-config/builtin-algorithm/sharding/#自动分片算法)。
@@ -166,7 +168,7 @@ AUDIT_STRATEGY (TYPE(NAME="DML_SHARDING_CONDITIONS"),ALLOW_HINT_DISABLE=true)
### 保留字
-`CREATE`、`SHARDING`、`TABLE`、`RULE`、`DATANODES`、`DATABASE_STRATEGY`、`TABLE_STRATEGY`、`KEY_GENERATE_STRATEGY`、`STORAGE_UNITS`、`SHARDING_COLUMN`、`TYPE`、`SHARDING_COLUMN`、`GENERATOR`、`SHARDING_ALGORITHM`、`COLUMN`、`NAME`、`PROPERTIES`、`AUDIT_STRATEGY`、`AUDITORS`、`ALLOW_HINT_DISABLE`
+`CREATE`、`SHARDING`、`TABLE`、`RULE`、`IF`、`NOT`、`EXISTS`、`DATANODES`、`DATABASE_STRATEGY`、`TABLE_STRATEGY`、`KEY_GENERATE_STRATEGY`、`STORAGE_UNITS`、`SHARDING_COLUMN`、`SHARDING_COLUMNS`、`TYPE`、`GENERATOR`、`SHARDING_ALGORITHM`、`COLUMN`、`NAME`、`PROPERTIES`、`AUDIT_STRATEGY`、`ALLOW_HINT_DISABLE`、`TRUE`、`FALSE`
### 相关链接
diff --git a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/sharding/create-sharding-table-rule.en.md b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/sharding/create-sharding-table-rule.en.md
index a7f4a9337fb..edf38a862e2 100644
--- a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/sharding/create-sharding-table-rule.en.md
+++ b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/sharding/create-sharding-table-rule.en.md
@@ -25,7 +25,13 @@ autoTableRuleDefinition ::=
ruleName '(' 'STORAGE_UNITS' '(' storageUnitName (',' storageUnitName)* ')' ',' 'SHARDING_COLUMN' '=' columnName ',' algorithmDefinition (',' 'KEY_GENERATE_STRATEGY' '(' keyGenerateStrategyDefinition ')')? (',' auditStrategyDefinition)? ')'
strategyDefinition ::=
- 'TYPE' '=' strategyType ',' ('SHARDING_COLUMN' | 'SHARDING_COLUMNS') '=' columnName ',' algorithmDefinition
+ 'TYPE' '=' 'NONE'
+ | 'TYPE' '=' 'STANDARD' ',' 'SHARDING_COLUMN' '=' columnName ',' shardingAlgorithm
+ | 'TYPE' '=' 'COMPLEX' ',' 'SHARDING_COLUMNS' '=' columnName ',' columnName (',' columnName)* ',' shardingAlgorithm
+ | 'TYPE' '=' 'HINT' ',' shardingAlgorithm
+
+shardingAlgorithm ::=
+ 'SHARDING_ALGORITHM' '(' algorithmDefinition ')'
keyGenerateStrategyDefinition ::=
'COLUMN' '=' columnName ',' keyGenerateAlgorithmDefinition
@@ -41,10 +47,10 @@ boolean ::=
'TRUE' | 'FALSE'
algorithmDefinition ::=
- 'TYPE' '(' 'NAME' '=' algorithmType (',' propertiesDefinition)?')'
+ 'TYPE' '(' 'NAME' '=' algorithmType (',' propertiesDefinition)? ')'
propertiesDefinition ::=
- 'PROPERTIES' '(' key '=' value (',' key '=' value)* ')'
+ 'PROPERTIES' '(' (key '=' value (',' key '=' value)*)? ')'
key ::=
string
@@ -67,9 +73,6 @@ columnName ::=
keyGeneratorName ::=
identifier
-strategyType ::=
- string
-
algorithmType ::=
string
```
@@ -89,10 +92,7 @@ algorithmType ::=
expressions to specify required resources;
- `DATABASE_STRATEGY`, `TABLE_STRATEGY` are the database sharding strategy and the table sharding strategy, which
are optional, and the default strategy is used when not configured;
- - The attribute `TYPE` in `strategyDefinition` is used to specify the type
- of [Sharding Algorithm](/en/user-manual/common-config/builtin-algorithm/sharding/#class-based-sharding-algorithm), currently only
- supports `STANDARD`, `COMPLEX`. Using `COMPLEX` requires specifying multiple sharding columns
- with `SHARDING_COLUMNS`.
+ - The attribute `TYPE` in `strategyDefinition` specifies the strategy type. `STANDARD`, `COMPLEX`, `HINT`, and `NONE` are supported. Using `COMPLEX` requires specifying multiple sharding columns with `SHARDING_COLUMNS`.
- use auto sharding table rule:
- `STORAGE_UNITS` can only use storage units that have been registered to the current database, and the required storage units can be
specified by enumeration or INLINE expression;
@@ -175,7 +175,7 @@ AUDIT_STRATEGY (TYPE(NAME="DML_SHARDING_CONDITIONS"),ALLOW_HINT_DISABLE=true)
### Reserved word
-`CREATE`, `SHARDING`, `TABLE`, `RULE`, `DATANODES`, `DATABASE_STRATEGY`, `TABLE_STRATEGY`, `KEY_GENERATE_STRATEGY`, `STORAGE_UNITS`, `SHARDING_COLUMN`, `TYPE`, `SHARDING_COLUMN`, `GENERATOR`, `SHARDING_ALGORITHM`, `COLUMN`, `NAME`, `PROPERTIES`, `AUDIT_STRATEGY`, `AUDITORS`, `ALLOW_HINT_DISABLE`
+`CREATE`, `SHARDING`, `TABLE`, `RULE`, `IF`, `NOT`, `EXISTS`, `DATANODES`, `DATABASE_STRATEGY`, `TABLE_STRATEGY`, `KEY_GENERATE_STRATEGY`, `STORAGE_UNITS`, `SHARDING_COLUMN`, `SHARDING_COLUMNS`, `TYPE`, `GENERATOR`, `SHARDING_ALGORITHM`, `COLUMN`, `NAME`, `PROPERTIES`, `AUDIT_STRATEGY`, `ALLOW_HINT_DISABLE`, `TRUE`, `FALSE`
### Related links
diff --git a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rql/rule-query/broadcast-table/count-broadcast-rule.cn.md b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rql/rule-query/broadcast-table/count-broadcast-rule.cn.md
index c4bebb077fa..d20eaa90ee6 100644
--- a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rql/rule-query/broadcast-table/count-broadcast-rule.cn.md
+++ b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rql/rule-query/broadcast-table/count-broadcast-rule.cn.md
@@ -52,7 +52,7 @@ mysql> COUNT BROADCAST RULE FROM sharding_db;
+--------------------------+----------------+-------+
| broadcast_table | sharding_db | 0 |
+--------------------------+----------------+-------+
-1 rows in set (0.00 sec)
+1 row in set (0.00 sec)
```
- 查询当前逻辑库中的广播表规则数量
@@ -68,7 +68,7 @@ mysql> COUNT BROADCAST RULE;
+--------------------------+----------------+-------+
| broadcast_table | sharding_db | 0 |
+--------------------------+----------------+-------+
-1 rows in set (0.00 sec)
+1 row in set (0.00 sec)
```
### 保留字
diff --git a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rql/rule-query/broadcast-table/count-broadcast-rule.en.md b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rql/rule-query/broadcast-table/count-broadcast-rule.en.md
index d1c3ed262f5..f7150a56cd8 100644
--- a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rql/rule-query/broadcast-table/count-broadcast-rule.en.md
+++ b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rql/rule-query/broadcast-table/count-broadcast-rule.en.md
@@ -52,7 +52,7 @@ mysql> COUNT BROADCAST RULE FROM sharding_db;
+--------------------------+----------------+-------+
| broadcast_table | sharding_db | 0 |
+--------------------------+----------------+-------+
-1 rows in set (0.00 sec)
+1 row in set (0.00 sec)
```
- Query the number of broadcast table rules for current database.
@@ -68,7 +68,7 @@ mysql> COUNT BROADCAST RULE;
+--------------------------+----------------+-------+
| broadcast_table | sharding_db | 0 |
+--------------------------+----------------+-------+
-1 rows in set (0.00 sec)
+1 row in set (0.00 sec)
```
### Reserved word
diff --git a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rql/rule-query/mask/show-mask-rule.cn.md b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rql/rule-query/mask/show-mask-rule.cn.md
index 0f98e5fbbb6..403bed390e9 100644
--- a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rql/rule-query/mask/show-mask-rule.cn.md
+++ b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rql/rule-query/mask/show-mask-rule.cn.md
@@ -13,7 +13,7 @@ weight = 1
{{% tab name="语法" %}}
```sql
ShowMaskRule::=
- 'SHOW' 'MASK' ('RULES' | 'TABLE'? 'RULE' ruleName) ('FROM' databaseName)?
+ 'SHOW' 'MASK' 'TABLE'? ('RULE' ruleName | 'RULES') ('FROM' databaseName)?
ruleName ::=
identifier
diff --git a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rql/rule-query/mask/show-mask-rule.en.md b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rql/rule-query/mask/show-mask-rule.en.md
index 15bd1af904c..49ffee268b3 100644
--- a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rql/rule-query/mask/show-mask-rule.en.md
+++ b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rql/rule-query/mask/show-mask-rule.en.md
@@ -13,7 +13,7 @@ The `SHOW MASK RULES` syntax is used to query mask rules for specified database.
{{% tab name="Grammar" %}}
```sql
ShowMaskRule::=
- 'SHOW' 'MASK' ('RULES' | 'TABLE'? 'RULE' ruleName) ('FROM' databaseName)?
+ 'SHOW' 'MASK' 'TABLE'? ('RULE' ruleName | 'RULES') ('FROM' databaseName)?
ruleName ::=
identifier
diff --git a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rql/rule-query/sharding/show-sharding-table-rule.cn.md b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rql/rule-query/sharding/show-sharding-table-rule.cn.md
index ed4c6b350c3..da4a9889a2d 100644
--- a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rql/rule-query/sharding/show-sharding-table-rule.cn.md
+++ b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rql/rule-query/sharding/show-sharding-table-rule.cn.md
@@ -58,12 +58,12 @@ databaseName ::=
SHOW SHARDING TABLE RULES FROM sharding_db;
```
```sql
-+--------------+-------------------+---------------------+------------------------+--------------------------+----------------------------------+-----------------------------------+---------------------+-----------------------+-------------------------------+--------------------------------+---------------------+--------------------+---------------------+
-| table | actual_data_nodes | actual_data_sources | database_strategy_type | database_sharding_column | database_sharding_algorithm_type | database_sharding_algorithm_props | table_strategy_type | table_sharding_column | table_sharding_algorithm_type | table_sharding_algorithm_props | key_generate_column | key_generator_type | key_generator_props |
-+--------------+-------------------+---------------------+------------------------+--------------------------+----------------------------------+-----------------------------------+---------------------+-----------------------+-------------------------------+--------------------------------+---------------------+--------------------+---------------------+
-| t_order | | ds_0,ds_1 | | | | | mod | order_id | mod | sharding-count=4 | | | |
-| t_order_item | | ds_0,ds_1 | | | | | mod | order_id | mod | sharding-count=4 | | | |
-+--------------+-------------------+---------------------+------------------------+--------------------------+----------------------------------+-----------------------------------+---------------------+-----------------------+-------------------------------+--------------------------------+---------------------+--------------------+---------------------+
++--------------+-------------------+---------------------+------------------------+--------------------------+----------------------------------+-----------------------------------+---------------------+-----------------------+-------------------------------+--------------------------------+---------------------+--------------------+---------------------+---------------+--------------------+
+| table | actual_data_nodes | actual_data_sources | database_strategy_type | database_sharding_column | database_sharding_algorithm_type | database_sharding_algorithm_props | table_strategy_type | table_sharding_column | table_sharding_algorithm_type | table_sharding_algorithm_props | key_generate_column | key_generator_type | key_generator_props | auditor_types | allow_hint_disable |
++--------------+-------------------+---------------------+------------------------+--------------------------+----------------------------------+-----------------------------------+---------------------+-----------------------+-------------------------------+--------------------------------+---------------------+--------------------+---------------------+---------------+--------------------+
+| t_order | | ds_0,ds_1 | | | | | mod | order_id | mod | sharding-count=4 | | | | | false |
+| t_order_item | | ds_0,ds_1 | | | | | mod | order_id | mod | sharding-count=4 | | | | | false |
++--------------+-------------------+---------------------+------------------------+--------------------------+----------------------------------+-----------------------------------+---------------------+-----------------------+-------------------------------+--------------------------------+---------------------+--------------------+---------------------+---------------+--------------------+
2 rows in set (0.12 sec)
```
@@ -72,12 +72,12 @@ SHOW SHARDING TABLE RULES FROM sharding_db;
SHOW SHARDING TABLE RULES;
```
```sql
-+--------------+-------------------+---------------------+------------------------+--------------------------+----------------------------------+-----------------------------------+---------------------+-----------------------+-------------------------------+--------------------------------+---------------------+--------------------+---------------------+
-| table | actual_data_nodes | actual_data_sources | database_strategy_type | database_sharding_column | database_sharding_algorithm_type | database_sharding_algorithm_props | table_strategy_type | table_sharding_column | table_sharding_algorithm_type | table_sharding_algorithm_props | key_generate_column | key_generator_type | key_generator_props |
-+--------------+-------------------+---------------------+------------------------+--------------------------+----------------------------------+-----------------------------------+---------------------+-----------------------+-------------------------------+--------------------------------+---------------------+--------------------+---------------------+
-| t_order | | ds_0,ds_1 | | | | | mod | order_id | mod | sharding-count=4 | | | |
-| t_order_item | | ds_0,ds_1 | | | | | mod | order_id | mod | sharding-count=4 | | | |
-+--------------+-------------------+---------------------+------------------------+--------------------------+----------------------------------+-----------------------------------+---------------------+-----------------------+-------------------------------+--------------------------------+---------------------+--------------------+---------------------+
++--------------+-------------------+---------------------+------------------------+--------------------------+----------------------------------+-----------------------------------+---------------------+-----------------------+-------------------------------+--------------------------------+---------------------+--------------------+---------------------+---------------+--------------------+
+| table | actual_data_nodes | actual_data_sources | database_strategy_type | database_sharding_column | database_sharding_algorithm_type | database_sharding_algorithm_props | table_strategy_type | table_sharding_column | table_sharding_algorithm_type | table_sharding_algorithm_props | key_generate_column | key_generator_type | key_generator_props | auditor_types | allow_hint_disable |
++--------------+-------------------+---------------------+------------------------+--------------------------+----------------------------------+-----------------------------------+---------------------+-----------------------+-------------------------------+--------------------------------+---------------------+--------------------+---------------------+---------------+--------------------+
+| t_order | | ds_0,ds_1 | | | | | mod | order_id | mod | sharding-count=4 | | | | | false |
+| t_order_item | | ds_0,ds_1 | | | | | mod | order_id | mod | sharding-count=4 | | | | | false |
++--------------+-------------------+---------------------+------------------------+--------------------------+----------------------------------+-----------------------------------+---------------------+-----------------------+-------------------------------+--------------------------------+---------------------+--------------------+---------------------+---------------+--------------------+
2 rows in set (0.12 sec)
```
- 查询指定逻辑表的分片规则
@@ -87,17 +87,17 @@ SHOW SHARDING TABLE RULE t_order;
```
```sql
-+--------------+-------------------+---------------------+------------------------+--------------------------+----------------------------------+-----------------------------------+---------------------+-----------------------+-------------------------------+--------------------------------+---------------------+--------------------+---------------------+
-| table | actual_data_nodes | actual_data_sources | database_strategy_type | database_sharding_column | database_sharding_algorithm_type | database_sharding_algorithm_props | table_strategy_type | table_sharding_column | table_sharding_algorithm_type | table_sharding_algorithm_props | key_generate_column | key_generator_type | key_generator_props |
-+--------------+-------------------+---------------------+------------------------+--------------------------+----------------------------------+-----------------------------------+---------------------+-----------------------+-------------------------------+--------------------------------+---------------------+--------------------+---------------------+
-| t_order | | ds_0,ds_1 | | | | | mod | order_id | mod | sharding-count=4 | | | |
-+--------------+-------------------+---------------------+------------------------+--------------------------+----------------------------------+-----------------------------------+---------------------+-----------------------+-------------------------------+--------------------------------+---------------------+--------------------+---------------------+
++--------------+-------------------+---------------------+------------------------+--------------------------+----------------------------------+-----------------------------------+---------------------+-----------------------+-------------------------------+--------------------------------+---------------------+--------------------+---------------------+---------------+--------------------+
+| table | actual_data_nodes | actual_data_sources | database_strategy_type | database_sharding_column | database_sharding_algorithm_type | database_sharding_algorithm_props | table_strategy_type | table_sharding_column | table_sharding_algorithm_type | table_sharding_algorithm_props | key_generate_column | key_generator_type | key_generator_props | auditor_types | allow_hint_disable |
++--------------+-------------------+---------------------+------------------------+--------------------------+----------------------------------+-----------------------------------+---------------------+-----------------------+-------------------------------+--------------------------------+---------------------+--------------------+---------------------+---------------+--------------------+
+| t_order | | ds_0,ds_1 | | | | | mod | order_id | mod | sharding-count=4 | | | | | false |
++--------------+-------------------+---------------------+------------------------+--------------------------+----------------------------------+-----------------------------------+---------------------+-----------------------+-------------------------------+--------------------------------+---------------------+--------------------+---------------------+---------------+--------------------+
1 row in set (0.12 sec)
```
### 保留字
-`CREATE`、`SHARDING`、`TABLE`、`RULE`、`FROM`
+`SHOW`、`SHARDING`、`TABLE`、`RULE`、`FROM`
### 相关链接
diff --git a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rql/rule-query/sharding/show-sharding-table-rule.en.md b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rql/rule-query/sharding/show-sharding-table-rule.en.md
index fd397fadd41..05e36411ab6 100644
--- a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rql/rule-query/sharding/show-sharding-table-rule.en.md
+++ b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rql/rule-query/sharding/show-sharding-table-rule.en.md
@@ -61,12 +61,12 @@ SHOW SHARDING TABLE RULES FROM sharding_db;
```
```sql
-+--------------+-------------------+---------------------+------------------------+--------------------------+----------------------------------+-----------------------------------+---------------------+-----------------------+-------------------------------+--------------------------------+---------------------+--------------------+---------------------+
-| table | actual_data_nodes | actual_data_sources | database_strategy_type | database_sharding_column | database_sharding_algorithm_type | database_sharding_algorithm_props | table_strategy_type | table_sharding_column | table_sharding_algorithm_type | table_sharding_algorithm_props | key_generate_column | key_generator_type | key_generator_props |
-+--------------+-------------------+---------------------+------------------------+--------------------------+----------------------------------+-----------------------------------+---------------------+-----------------------+-------------------------------+--------------------------------+---------------------+--------------------+---------------------+
-| t_order | | ds_0,ds_1 | | | | | mod | order_id | mod | sharding-count=4 | | | |
-| t_order_item | | ds_0,ds_1 | | | | | mod | order_id | mod | sharding-count=4 | | | |
-+--------------+-------------------+---------------------+------------------------+--------------------------+----------------------------------+-----------------------------------+---------------------+-----------------------+-------------------------------+--------------------------------+---------------------+--------------------+---------------------+
++--------------+-------------------+---------------------+------------------------+--------------------------+----------------------------------+-----------------------------------+---------------------+-----------------------+-------------------------------+--------------------------------+---------------------+--------------------+---------------------+---------------+--------------------+
+| table | actual_data_nodes | actual_data_sources | database_strategy_type | database_sharding_column | database_sharding_algorithm_type | database_sharding_algorithm_props | table_strategy_type | table_sharding_column | table_sharding_algorithm_type | table_sharding_algorithm_props | key_generate_column | key_generator_type | key_generator_props | auditor_types | allow_hint_disable |
++--------------+-------------------+---------------------+------------------------+--------------------------+----------------------------------+-----------------------------------+---------------------+-----------------------+-------------------------------+--------------------------------+---------------------+--------------------+---------------------+---------------+--------------------+
+| t_order | | ds_0,ds_1 | | | | | mod | order_id | mod | sharding-count=4 | | | | | false |
+| t_order_item | | ds_0,ds_1 | | | | | mod | order_id | mod | sharding-count=4 | | | | | false |
++--------------+-------------------+---------------------+------------------------+--------------------------+----------------------------------+-----------------------------------+---------------------+-----------------------+-------------------------------+--------------------------------+---------------------+--------------------+---------------------+---------------+--------------------+
2 rows in set (0.12 sec)
```
@@ -77,12 +77,12 @@ SHOW SHARDING TABLE RULES;
```
```sql
-+--------------+-------------------+---------------------+------------------------+--------------------------+----------------------------------+-----------------------------------+---------------------+-----------------------+-------------------------------+--------------------------------+---------------------+--------------------+---------------------+
-| table | actual_data_nodes | actual_data_sources | database_strategy_type | database_sharding_column | database_sharding_algorithm_type | database_sharding_algorithm_props | table_strategy_type | table_sharding_column | table_sharding_algorithm_type | table_sharding_algorithm_props | key_generate_column | key_generator_type | key_generator_props |
-+--------------+-------------------+---------------------+------------------------+--------------------------+----------------------------------+-----------------------------------+---------------------+-----------------------+-------------------------------+--------------------------------+---------------------+--------------------+---------------------+
-| t_order | | ds_0,ds_1 | | | | | mod | order_id | mod | sharding-count=4 | | | |
-| t_order_item | | ds_0,ds_1 | | | | | mod | order_id | mod | sharding-count=4 | | | |
-+--------------+-------------------+---------------------+------------------------+--------------------------+----------------------------------+-----------------------------------+---------------------+-----------------------+-------------------------------+--------------------------------+---------------------+--------------------+---------------------+
++--------------+-------------------+---------------------+------------------------+--------------------------+----------------------------------+-----------------------------------+---------------------+-----------------------+-------------------------------+--------------------------------+---------------------+--------------------+---------------------+---------------+--------------------+
+| table | actual_data_nodes | actual_data_sources | database_strategy_type | database_sharding_column | database_sharding_algorithm_type | database_sharding_algorithm_props | table_strategy_type | table_sharding_column | table_sharding_algorithm_type | table_sharding_algorithm_props | key_generate_column | key_generator_type | key_generator_props | auditor_types | allow_hint_disable |
++--------------+-------------------+---------------------+------------------------+--------------------------+----------------------------------+-----------------------------------+---------------------+-----------------------+-------------------------------+--------------------------------+---------------------+--------------------+---------------------+---------------+--------------------+
+| t_order | | ds_0,ds_1 | | | | | mod | order_id | mod | sharding-count=4 | | | | | false |
+| t_order_item | | ds_0,ds_1 | | | | | mod | order_id | mod | sharding-count=4 | | | | | false |
++--------------+-------------------+---------------------+------------------------+--------------------------+----------------------------------+-----------------------------------+---------------------+-----------------------+-------------------------------+--------------------------------+---------------------+--------------------+---------------------+---------------+--------------------+
2 rows in set (0.12 sec)
```
- Query the specified sharding table rule
@@ -92,11 +92,11 @@ SHOW SHARDING TABLE RULE t_order;
```
```sql
-+--------------+-------------------+---------------------+------------------------+--------------------------+----------------------------------+-----------------------------------+---------------------+-----------------------+-------------------------------+--------------------------------+---------------------+--------------------+---------------------+
-| table | actual_data_nodes | actual_data_sources | database_strategy_type | database_sharding_column | database_sharding_algorithm_type | database_sharding_algorithm_props | table_strategy_type | table_sharding_column | table_sharding_algorithm_type | table_sharding_algorithm_props | key_generate_column | key_generator_type | key_generator_props |
-+--------------+-------------------+---------------------+------------------------+--------------------------+----------------------------------+-----------------------------------+---------------------+-----------------------+-------------------------------+--------------------------------+---------------------+--------------------+---------------------+
-| t_order | | ds_0,ds_1 | | | | | mod | order_id | mod | sharding-count=4 | | | |
-+--------------+-------------------+---------------------+------------------------+--------------------------+----------------------------------+-----------------------------------+---------------------+-----------------------+-------------------------------+--------------------------------+---------------------+--------------------+---------------------+
++--------------+-------------------+---------------------+------------------------+--------------------------+----------------------------------+-----------------------------------+---------------------+-----------------------+-------------------------------+--------------------------------+---------------------+--------------------+---------------------+---------------+--------------------+
+| table | actual_data_nodes | actual_data_sources | database_strategy_type | database_sharding_column | database_sharding_algorithm_type | database_sharding_algorithm_props | table_strategy_type | table_sharding_column | table_sharding_algorithm_type | table_sharding_algorithm_props | key_generate_column | key_generator_type | key_generator_props | auditor_types | allow_hint_disable |
++--------------+-------------------+---------------------+------------------------+--------------------------+----------------------------------+-----------------------------------+---------------------+-----------------------+-------------------------------+--------------------------------+---------------------+--------------------+---------------------+---------------+--------------------+
+| t_order | | ds_0,ds_1 | | | | | mod | order_id | mod | sharding-count=4 | | | | | false |
++--------------+-------------------+---------------------+------------------------+--------------------------+----------------------------------+-----------------------------------+---------------------+-----------------------+-------------------------------+--------------------------------+---------------------+--------------------+---------------------+---------------+--------------------+
1 row in set (0.12 sec)
```
diff --git a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rql/rule-query/single-table/count-single-table.cn.md b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rql/rule-query/single-table/count-single-table.cn.md
index 90cc7f914c7..135cbd66058 100644
--- a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rql/rule-query/single-table/count-single-table.cn.md
+++ b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rql/rule-query/single-table/count-single-table.cn.md
@@ -31,10 +31,11 @@ databaseName ::=
### 返回值说明
-| 列 | 说明 |
-|----------|------------|
-| database | 单表所在的数据库名称 |
-| count | 单表个数 |
+| 列 | 说明 |
+|-----------|---------------|
+| rule_name | 单表规则名称 |
+| database | 单表所在的数据库名称 |
+| count | 单表个数 |
### 示例
@@ -46,11 +47,11 @@ COUNT SINGLE TABLE
```sql
mysql> COUNT SINGLE TABLE;
-+----------+--------+
-| database | count |
-+----------+--------+
-| ds | 2 |
-+----------+--------+
++-----------+-------------+-------+
+| rule_name | database | count |
++-----------+-------------+-------+
+| single | sharding_db | 2 |
++-----------+-------------+-------+
1 row in set (0.02 sec)
```
diff --git a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rql/rule-query/single-table/count-single-table.en.md b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rql/rule-query/single-table/count-single-table.en.md
index d3b14707b0f..b8d57212f95 100644
--- a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rql/rule-query/single-table/count-single-table.en.md
+++ b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rql/rule-query/single-table/count-single-table.en.md
@@ -30,10 +30,11 @@ databaseName ::=
### Return Value Description
-| Column | Description |
-|------------|-----------------------------------------------------|
-| database | The database name where the single table is located |
-| count | The count of single table |
+| Column | Description |
+|-----------|-----------------------------------------------------|
+| rule_name | Single rule name |
+| database | The database name where the single table is located |
+| count | The count of single table |
### Example
@@ -45,11 +46,11 @@ COUNT SINGLE TABLE
```sql
mysql> COUNT SINGLE TABLE;
-+----------+--------+
-| database | count |
-+----------+--------+
-| ds | 2 |
-+----------+--------+
++-----------+-------------+-------+
+| rule_name | database | count |
++-----------+-------------+-------+
+| single | sharding_db | 2 |
++-----------+-------------+-------+
1 row in set (0.02 sec)
```
diff --git a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rql/rule-query/single-table/show-default-single-table-storage-unit.cn.md b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rql/rule-query/single-table/show-default-single-table-storage-unit.cn.md
index c1a3002a2c1..fb85708a0c0 100644
--- a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rql/rule-query/single-table/show-default-single-table-storage-unit.cn.md
+++ b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rql/rule-query/single-table/show-default-single-table-storage-unit.cn.md
@@ -5,7 +5,7 @@ weight = 2
### 描述
-`SHOW DEFAULT SINGLE TABLE STORAGE UNIT` 语法用于查询指定逻辑库中的存储单元信息。
+`SHOW DEFAULT SINGLE TABLE STORAGE UNIT` 语法用于查询指定或当前逻辑库中的默认单表存储单元。
### 语法
@@ -36,7 +36,7 @@ databaseName ::=
### 示例
-- 查询当前逻辑库中的存储单元信息
+- 查询当前逻辑库中的默认单表存储单元
```sql
SHOW DEFAULT SINGLE TABLE STORAGE UNIT
@@ -59,4 +59,3 @@ sql> SHOW DEFAULT SINGLE TABLE STORAGE UNIT;
### 相关链接
- [保留字](/cn/user-manual/shardingsphere-proxy/distsql/syntax/reserved-word/)
-
diff --git a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rql/rule-query/single-table/show-default-single-table-storage-unit.en.md b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rql/rule-query/single-table/show-default-single-table-storage-unit.en.md
index 1a578f71178..4ed0c4b8740 100644
--- a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rql/rule-query/single-table/show-default-single-table-storage-unit.en.md
+++ b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rql/rule-query/single-table/show-default-single-table-storage-unit.en.md
@@ -5,7 +5,7 @@ weight = 2
### Description
-The `SHOW DEFAULT SINGLE TABLE STORAGE UNIT` syntax is used to query storage units for specified database.
+The `SHOW DEFAULT SINGLE TABLE STORAGE UNIT` syntax is used to query the default single table storage unit for the specified or current database.
### Syntax
@@ -36,7 +36,7 @@ databaseName ::=
### Example
-- Query storage units for specified database.
+- Query the default single table storage unit for current database.
```sql
SHOW DEFAULT SINGLE TABLE STORAGE UNIT
diff --git a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rql/rule-query/single-table/show-single-table.cn.md b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rql/rule-query/single-table/show-single-table.cn.md
index c8a99d95eec..362b5fa6fac 100644
--- a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rql/rule-query/single-table/show-single-table.cn.md
+++ b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rql/rule-query/single-table/show-single-table.cn.md
@@ -36,10 +36,11 @@ databaseName ::=
### 返回值说明
-| 列 | 说明 |
-|-------------------|-------------------|
-| table_name | 单表名称 |
-| storage_unit_name | 单表所在的数据源名称 |
+| 列 | 说明 |
+|-------------------|------------------------------|
+| table_name | 单表名称 |
+| storage_unit_name | 单表所在的数据源名称 |
+| schema_name | Schema 名称,仅在存在 Schema 元数据时返回 |
### 示例
diff --git a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rql/rule-query/single-table/show-single-table.en.md b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rql/rule-query/single-table/show-single-table.en.md
index 684bfa8c680..67c7d3975f9 100644
--- a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rql/rule-query/single-table/show-single-table.en.md
+++ b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rql/rule-query/single-table/show-single-table.en.md
@@ -40,6 +40,7 @@ databaseName ::=
|-------------------|---------------------------------------------------------|
| table_name | Single table name |
| storage_unit_name | The storage unit name where the single table is located |
+| schema_name | Schema name, returned only when schema metadata exists |
### Example
diff --git a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rql/storage-unit-query/show-rules-used-storage-unit.cn.md b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rql/storage-unit-query/show-rules-used-storage-unit.cn.md
index 5adb47425c1..cc2e6dbb654 100644
--- a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rql/storage-unit-query/show-rules-used-storage-unit.cn.md
+++ b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rql/storage-unit-query/show-rules-used-storage-unit.cn.md
@@ -52,9 +52,8 @@ mysql> SHOW RULES USED STORAGE UNIT ds_1 FROM sharding_db;
| type | name |
+---------------------+------------+
| readwrite_splitting | ms_group_0 |
-| readwrite_splitting | ms_group_0 |
+---------------------+------------+
-2 rows in set (0.01 sec)
+1 row in set (0.01 sec)
```
- 查询当前逻辑库中使用指定存储单元的规则
@@ -69,9 +68,8 @@ mysql> SHOW RULES USED STORAGE UNIT ds_1;
| type | name |
+---------------------+------------+
| readwrite_splitting | ms_group_0 |
-| readwrite_splitting | ms_group_0 |
+---------------------+------------+
-2 rows in set (0.01 sec)
+1 row in set (0.01 sec)
```
### 保留字
diff --git a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rql/storage-unit-query/show-rules-used-storage-unit.en.md b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rql/storage-unit-query/show-rules-used-storage-unit.en.md
index 5c4a730ad4f..2fda0ec1b7b 100644
--- a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rql/storage-unit-query/show-rules-used-storage-unit.en.md
+++ b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rql/storage-unit-query/show-rules-used-storage-unit.en.md
@@ -52,9 +52,8 @@ mysql> SHOW RULES USED STORAGE UNIT ds_1 FROM sharding_db;
| type | name |
+---------------------+------------+
| readwrite_splitting | ms_group_0 |
-| readwrite_splitting | ms_group_0 |
+---------------------+------------+
-2 rows in set (0.01 sec)
+1 row in set (0.01 sec)
```
- Query the rules for using the specified storage unit in current database
@@ -69,9 +68,8 @@ mysql> SHOW RULES USED STORAGE UNIT ds_1;
| type | name |
+---------------------+------------+
| readwrite_splitting | ms_group_0 |
-| readwrite_splitting | ms_group_0 |
+---------------------+------------+
-2 rows in set (0.01 sec)
+1 row in set (0.01 sec)
```
### Reserved word
diff --git a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rql/storage-unit-query/show-storage-units.cn.md b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rql/storage-unit-query/show-storage-units.cn.md
index e297d7fabff..f5f1c942aa7 100644
--- a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rql/storage-unit-query/show-storage-units.cn.md
+++ b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rql/storage-unit-query/show-storage-units.cn.md
@@ -88,7 +88,7 @@ mysql> SHOW STORAGE UNITS LIKE '%_0';
+------+-------+-----------+------+------+---------------------------------+---------------------------+---------------------------+---------------+---------------+-----------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| ds_0 | MySQL | 127.0.0.1 | 3306 | db0 | 30000 | 60000 | 2100000 | 50 | 1 | false | {"healthCheckProperties":{},"initializationFailTimeout":1,"validationTimeout":5000,"keepaliveTime":0,"leakDetectionThreshold":0,"registerMbeans":false,"allowPoolSuspension":false,"autoCommit":true,"isolateInternalQueries":false} |
+------+-------+-----------+------+------+---------------------------------+---------------------------+---------------------------+---------------+---------------+-----------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
-1 rows in set (0.01 sec)
+1 row in set (0.01 sec)
```
### 保留字
diff --git a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rql/storage-unit-query/show-storage-units.en.md b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rql/storage-unit-query/show-storage-units.en.md
index b8037653170..510fab8346a 100644
--- a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rql/storage-unit-query/show-storage-units.en.md
+++ b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rql/storage-unit-query/show-storage-units.en.md
@@ -88,7 +88,7 @@ mysql> SHOW STORAGE UNITS LIKE '%_0';
+------+-------+-----------+------+------+---------------------------------+---------------------------+---------------------------+---------------+---------------+-----------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| ds_0 | MySQL | 127.0.0.1 | 3306 | db0 | 30000 | 60000 | 2100000 | 50 | 1 | false | {"healthCheckProperties":{},"initializationFailTimeout":1,"validationTimeout":5000,"keepaliveTime":0,"leakDetectionThreshold":0,"registerMbeans":false,"allowPoolSuspension":false,"autoCommit":true,"isolateInternalQueries":false} |
+------+-------+-----------+------+------+---------------------------------+---------------------------+---------------------------+---------------+---------------+-----------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
-1 rows in set (0.01 sec)
+1 row in set (0.01 sec)
```
### Reserved word