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

zhaojinchao 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 4e0c51b1027 For #25493, optimize EOF for DistSQL. (#25853)
4e0c51b1027 is described below

commit 4e0c51b1027bcbeb4445f10ebc080939b3afc99a
Author: Raigor <[email protected]>
AuthorDate: Tue May 23 10:14:43 2023 +0800

    For #25493, optimize EOF for DistSQL. (#25853)
    
    * For #25493, optimize EOF for DistSQL.
    
    * Fix transactionRuleDefinition and parse test case.
    
    * Fix parse test case for ALTER MASK RULE.
---
 .../distsql/parser/autogen/EncryptDistSQLStatement.g4               | 2 +-
 .../shardingsphere/distsql/parser/autogen/MaskDistSQLStatement.g4   | 2 +-
 .../distsql/parser/autogen/ReadwriteSplittingDistSQLStatement.g4    | 2 +-
 .../shardingsphere/distsql/parser/autogen/ShadowDistSQLStatement.g4 | 2 +-
 .../distsql/parser/autogen/ShardingDistSQLStatement.g4              | 2 +-
 .../distsql/parser/autogen/AuthorityDistSQLStatement.g4             | 2 +-
 .../shardingsphere/distsql/parser/autogen/CDCDistSQLStatement.g4    | 2 +-
 .../distsql/parser/autogen/MigrationDistSQLStatement.g4             | 2 +-
 .../distsql/parser/autogen/GlobalClockDistSQLStatement.g4           | 2 +-
 .../distsql/parser/autogen/SQLParserDistSQLStatement.g4             | 2 +-
 .../distsql/parser/autogen/SQLTranslatorDistSQLStatement.g4         | 2 +-
 .../distsql/parser/autogen/TrafficDistSQLStatement.g4               | 2 +-
 .../parser/src/main/antlr4/imports/transaction/RALStatement.g4      | 2 +-
 .../distsql/parser/autogen/TransactionDistSQLStatement.g4           | 2 +-
 .../shardingsphere/distsql/parser/autogen/KernelDistSQLStatement.g4 | 2 +-
 .../distsql/parser/autogen/UtilityDistSQLStatement.g4               | 2 +-
 test/e2e/sql/src/test/resources/cases/rdl/rdl-integration-alter.xml | 2 +-
 test/it/parser/src/main/resources/sql/supported/rdl/create.xml      | 6 +++---
 18 files changed, 20 insertions(+), 20 deletions(-)

diff --git 
a/features/encrypt/distsql/parser/src/main/antlr4/org/apache/shardingsphere/distsql/parser/autogen/EncryptDistSQLStatement.g4
 
b/features/encrypt/distsql/parser/src/main/antlr4/org/apache/shardingsphere/distsql/parser/autogen/EncryptDistSQLStatement.g4
index d74df5417c2..61d884bb570 100644
--- 
a/features/encrypt/distsql/parser/src/main/antlr4/org/apache/shardingsphere/distsql/parser/autogen/EncryptDistSQLStatement.g4
+++ 
b/features/encrypt/distsql/parser/src/main/antlr4/org/apache/shardingsphere/distsql/parser/autogen/EncryptDistSQLStatement.g4
@@ -25,5 +25,5 @@ execute
     | dropEncryptRule
     | showEncryptRules
     | countEncryptRule
-    ) SEMI?
+    ) SEMI_? EOF
     ;
diff --git 
a/features/mask/distsql/parser/src/main/antlr4/org/apache/shardingsphere/distsql/parser/autogen/MaskDistSQLStatement.g4
 
b/features/mask/distsql/parser/src/main/antlr4/org/apache/shardingsphere/distsql/parser/autogen/MaskDistSQLStatement.g4
index 3a135a884b4..313a79d8dfc 100644
--- 
a/features/mask/distsql/parser/src/main/antlr4/org/apache/shardingsphere/distsql/parser/autogen/MaskDistSQLStatement.g4
+++ 
b/features/mask/distsql/parser/src/main/antlr4/org/apache/shardingsphere/distsql/parser/autogen/MaskDistSQLStatement.g4
@@ -25,5 +25,5 @@ execute
     | dropMaskRule
     | showMaskRules
     | countMaskRule
-    ) SEMI?
+    ) SEMI_? EOF
     ;
diff --git 
a/features/readwrite-splitting/distsql/parser/src/main/antlr4/org/apache/shardingsphere/distsql/parser/autogen/ReadwriteSplittingDistSQLStatement.g4
 
b/features/readwrite-splitting/distsql/parser/src/main/antlr4/org/apache/shardingsphere/distsql/parser/autogen/ReadwriteSplittingDistSQLStatement.g4
index fe1d5ddb161..3275e107295 100644
--- 
a/features/readwrite-splitting/distsql/parser/src/main/antlr4/org/apache/shardingsphere/distsql/parser/autogen/ReadwriteSplittingDistSQLStatement.g4
+++ 
b/features/readwrite-splitting/distsql/parser/src/main/antlr4/org/apache/shardingsphere/distsql/parser/autogen/ReadwriteSplittingDistSQLStatement.g4
@@ -27,5 +27,5 @@ execute
     | alterReadwriteSplittingStorageUnitStatus
     | showStatusFromReadwriteSplittingRules
     | countReadwriteSplittingRule
-    ) SEMI?
+    ) SEMI_? EOF
     ;
diff --git 
a/features/shadow/distsql/parser/src/main/antlr4/org/apache/shardingsphere/distsql/parser/autogen/ShadowDistSQLStatement.g4
 
b/features/shadow/distsql/parser/src/main/antlr4/org/apache/shardingsphere/distsql/parser/autogen/ShadowDistSQLStatement.g4
index 4f9210c23d6..f8527a65069 100644
--- 
a/features/shadow/distsql/parser/src/main/antlr4/org/apache/shardingsphere/distsql/parser/autogen/ShadowDistSQLStatement.g4
+++ 
b/features/shadow/distsql/parser/src/main/antlr4/org/apache/shardingsphere/distsql/parser/autogen/ShadowDistSQLStatement.g4
@@ -32,5 +32,5 @@ execute
     | createDefaultShadowAlgorithm
     | alterDefaultShadowAlgorithm
     | countShadowRule
-    ) SEMI?
+    ) SEMI_? EOF
     ;
diff --git 
a/features/sharding/distsql/parser/src/main/antlr4/sharding/org/apache/shardingsphere/distsql/parser/autogen/ShardingDistSQLStatement.g4
 
b/features/sharding/distsql/parser/src/main/antlr4/sharding/org/apache/shardingsphere/distsql/parser/autogen/ShardingDistSQLStatement.g4
index caf337776e5..2ddea73b1c8 100644
--- 
a/features/sharding/distsql/parser/src/main/antlr4/sharding/org/apache/shardingsphere/distsql/parser/autogen/ShardingDistSQLStatement.g4
+++ 
b/features/sharding/distsql/parser/src/main/antlr4/sharding/org/apache/shardingsphere/distsql/parser/autogen/ShardingDistSQLStatement.g4
@@ -49,5 +49,5 @@ execute
     | showUnusedShardingKeyGenerators
     | showUnusedShardingAuditors
     | countShardingRule
-    ) SEMI?
+    ) SEMI_? EOF
     ;
diff --git 
a/kernel/authority/distsql/parser/src/main/antlr4/org/apache/shardingsphere/distsql/parser/autogen/AuthorityDistSQLStatement.g4
 
b/kernel/authority/distsql/parser/src/main/antlr4/org/apache/shardingsphere/distsql/parser/autogen/AuthorityDistSQLStatement.g4
index fcfd6053e6c..32b15344498 100644
--- 
a/kernel/authority/distsql/parser/src/main/antlr4/org/apache/shardingsphere/distsql/parser/autogen/AuthorityDistSQLStatement.g4
+++ 
b/kernel/authority/distsql/parser/src/main/antlr4/org/apache/shardingsphere/distsql/parser/autogen/AuthorityDistSQLStatement.g4
@@ -20,5 +20,5 @@ grammar AuthorityDistSQLStatement;
 import Symbol, RALStatement;
 
 execute
-    : (showAuthorityRule) SEMI?
+    : (showAuthorityRule) SEMI_? EOF
     ;
diff --git 
a/kernel/data-pipeline/distsql/parser/src/main/antlr4/cdc/org/apache/shardingsphere/distsql/parser/autogen/CDCDistSQLStatement.g4
 
b/kernel/data-pipeline/distsql/parser/src/main/antlr4/cdc/org/apache/shardingsphere/distsql/parser/autogen/CDCDistSQLStatement.g4
index 4a459b2f38c..ed0637e4c0b 100644
--- 
a/kernel/data-pipeline/distsql/parser/src/main/antlr4/cdc/org/apache/shardingsphere/distsql/parser/autogen/CDCDistSQLStatement.g4
+++ 
b/kernel/data-pipeline/distsql/parser/src/main/antlr4/cdc/org/apache/shardingsphere/distsql/parser/autogen/CDCDistSQLStatement.g4
@@ -24,5 +24,5 @@ execute
     | showStreamingStatus
     | rollbackStreaming
     | commitStreaming
-    ) SEMI?
+    ) SEMI_? EOF
     ;
diff --git 
a/kernel/data-pipeline/distsql/parser/src/main/antlr4/migration/org/apache/shardingsphere/distsql/parser/autogen/MigrationDistSQLStatement.g4
 
b/kernel/data-pipeline/distsql/parser/src/main/antlr4/migration/org/apache/shardingsphere/distsql/parser/autogen/MigrationDistSQLStatement.g4
index cb252f2728c..5590ee03965 100644
--- 
a/kernel/data-pipeline/distsql/parser/src/main/antlr4/migration/org/apache/shardingsphere/distsql/parser/autogen/MigrationDistSQLStatement.g4
+++ 
b/kernel/data-pipeline/distsql/parser/src/main/antlr4/migration/org/apache/shardingsphere/distsql/parser/autogen/MigrationDistSQLStatement.g4
@@ -36,5 +36,5 @@ execute
     | startMigrationCheck
     | stopMigrationCheck
     | dropMigrationCheck
-    ) SEMI?
+    ) SEMI_? EOF
     ;
diff --git 
a/kernel/global-clock/distsql/parser/src/main/antlr4/org/apache/shardingsphere/distsql/parser/autogen/GlobalClockDistSQLStatement.g4
 
b/kernel/global-clock/distsql/parser/src/main/antlr4/org/apache/shardingsphere/distsql/parser/autogen/GlobalClockDistSQLStatement.g4
index ae8cc3843d4..d59d915e828 100644
--- 
a/kernel/global-clock/distsql/parser/src/main/antlr4/org/apache/shardingsphere/distsql/parser/autogen/GlobalClockDistSQLStatement.g4
+++ 
b/kernel/global-clock/distsql/parser/src/main/antlr4/org/apache/shardingsphere/distsql/parser/autogen/GlobalClockDistSQLStatement.g4
@@ -22,5 +22,5 @@ import Symbol, RALStatement;
 execute
     : (showGlobalClockRule
     | alterGlobalClockRule
-    ) SEMI?
+    ) SEMI_? EOF
     ;
diff --git 
a/kernel/sql-parser/distsql/parser/src/main/antlr4/org/apache/shardingsphere/distsql/parser/autogen/SQLParserDistSQLStatement.g4
 
b/kernel/sql-parser/distsql/parser/src/main/antlr4/org/apache/shardingsphere/distsql/parser/autogen/SQLParserDistSQLStatement.g4
index 64b97ae6841..f651ac9d59c 100644
--- 
a/kernel/sql-parser/distsql/parser/src/main/antlr4/org/apache/shardingsphere/distsql/parser/autogen/SQLParserDistSQLStatement.g4
+++ 
b/kernel/sql-parser/distsql/parser/src/main/antlr4/org/apache/shardingsphere/distsql/parser/autogen/SQLParserDistSQLStatement.g4
@@ -22,5 +22,5 @@ import Symbol, RALStatement;
 execute
     : (showSQLParserRule
     | alterSQLParserRule
-    ) SEMI?
+    ) SEMI_? EOF
     ;
diff --git 
a/kernel/sql-translator/distsql/parser/src/main/antlr4/org/apache/shardingsphere/distsql/parser/autogen/SQLTranslatorDistSQLStatement.g4
 
b/kernel/sql-translator/distsql/parser/src/main/antlr4/org/apache/shardingsphere/distsql/parser/autogen/SQLTranslatorDistSQLStatement.g4
index e2fa280d0d7..dff20ae98bd 100644
--- 
a/kernel/sql-translator/distsql/parser/src/main/antlr4/org/apache/shardingsphere/distsql/parser/autogen/SQLTranslatorDistSQLStatement.g4
+++ 
b/kernel/sql-translator/distsql/parser/src/main/antlr4/org/apache/shardingsphere/distsql/parser/autogen/SQLTranslatorDistSQLStatement.g4
@@ -20,5 +20,5 @@ grammar SQLTranslatorDistSQLStatement;
 import Symbol, RALStatement;
 
 execute
-    : (showSQLTranslatorRule) SEMI?
+    : (showSQLTranslatorRule) SEMI_? EOF
     ;
diff --git 
a/kernel/traffic/distsql/parser/src/main/antlr4/org/apache/shardingsphere/distsql/parser/autogen/TrafficDistSQLStatement.g4
 
b/kernel/traffic/distsql/parser/src/main/antlr4/org/apache/shardingsphere/distsql/parser/autogen/TrafficDistSQLStatement.g4
index 4e7f935bc6a..d92ec726322 100644
--- 
a/kernel/traffic/distsql/parser/src/main/antlr4/org/apache/shardingsphere/distsql/parser/autogen/TrafficDistSQLStatement.g4
+++ 
b/kernel/traffic/distsql/parser/src/main/antlr4/org/apache/shardingsphere/distsql/parser/autogen/TrafficDistSQLStatement.g4
@@ -22,5 +22,5 @@ import Symbol, RALStatement;
 execute
     : (showTrafficRules
     | alterTrafficRule
-    ) SEMI?
+    ) SEMI_? EOF
     ;
diff --git 
a/kernel/transaction/distsql/parser/src/main/antlr4/imports/transaction/RALStatement.g4
 
b/kernel/transaction/distsql/parser/src/main/antlr4/imports/transaction/RALStatement.g4
index 92e530590ab..7476dbbbc3f 100644
--- 
a/kernel/transaction/distsql/parser/src/main/antlr4/imports/transaction/RALStatement.g4
+++ 
b/kernel/transaction/distsql/parser/src/main/antlr4/imports/transaction/RALStatement.g4
@@ -28,7 +28,7 @@ alterTransactionRule
     ;
 
 transactionRuleDefinition
-    : LP_ DEFAULT EQ_ defaultType (COMMA_ providerDefinition)?
+    : LP_ DEFAULT EQ_ defaultType (COMMA_ providerDefinition)? RP_
     ;
 
 providerDefinition
diff --git 
a/kernel/transaction/distsql/parser/src/main/antlr4/org/apache/shardingsphere/distsql/parser/autogen/TransactionDistSQLStatement.g4
 
b/kernel/transaction/distsql/parser/src/main/antlr4/org/apache/shardingsphere/distsql/parser/autogen/TransactionDistSQLStatement.g4
index 8b7bf802b94..3d868d53a53 100644
--- 
a/kernel/transaction/distsql/parser/src/main/antlr4/org/apache/shardingsphere/distsql/parser/autogen/TransactionDistSQLStatement.g4
+++ 
b/kernel/transaction/distsql/parser/src/main/antlr4/org/apache/shardingsphere/distsql/parser/autogen/TransactionDistSQLStatement.g4
@@ -22,5 +22,5 @@ import Symbol, RALStatement;
 execute
     : (showTransactionRule
     | alterTransactionRule
-    ) SEMI?
+    ) SEMI_? EOF
     ;
diff --git 
a/parser/distsql/engine/src/main/antlr4/org/apache/shardingsphere/distsql/parser/autogen/KernelDistSQLStatement.g4
 
b/parser/distsql/engine/src/main/antlr4/org/apache/shardingsphere/distsql/parser/autogen/KernelDistSQLStatement.g4
index daf6ce5af40..bdd731890a5 100644
--- 
a/parser/distsql/engine/src/main/antlr4/org/apache/shardingsphere/distsql/parser/autogen/KernelDistSQLStatement.g4
+++ 
b/parser/distsql/engine/src/main/antlr4/org/apache/shardingsphere/distsql/parser/autogen/KernelDistSQLStatement.g4
@@ -54,5 +54,5 @@ execute
     | alterMigrationRule
     | lockCluster
     | unlockCluster
-    ) SEMI?
+    ) SEMI_? EOF
     ;
diff --git 
a/parser/distsql/engine/src/main/antlr4/org/apache/shardingsphere/distsql/parser/autogen/UtilityDistSQLStatement.g4
 
b/parser/distsql/engine/src/main/antlr4/org/apache/shardingsphere/distsql/parser/autogen/UtilityDistSQLStatement.g4
index 9bc6d3cb316..8c4d5bd25b8 100644
--- 
a/parser/distsql/engine/src/main/antlr4/org/apache/shardingsphere/distsql/parser/autogen/UtilityDistSQLStatement.g4
+++ 
b/parser/distsql/engine/src/main/antlr4/org/apache/shardingsphere/distsql/parser/autogen/UtilityDistSQLStatement.g4
@@ -23,5 +23,5 @@ execute
     : (previewSQL 
     | parseSQL
     | formatSQL
-    ) SEMI?
+    ) SEMI_? EOF
     ;
diff --git 
a/test/e2e/sql/src/test/resources/cases/rdl/rdl-integration-alter.xml 
b/test/e2e/sql/src/test/resources/cases/rdl/rdl-integration-alter.xml
index bba82701b9a..7ac63b94c5f 100644
--- a/test/e2e/sql/src/test/resources/cases/rdl/rdl-integration-alter.xml
+++ b/test/e2e/sql/src/test/resources/cases/rdl/rdl-integration-alter.xml
@@ -60,7 +60,7 @@
 <!--        </assertion>-->
 <!--    </test-case>-->
     
-    <test-case sql="ALTER MASK RULE t_mask (COLUMNS((NAME=order_id, 
TYPE(NAME='MASK_FROM_X_TO_Y', PROPERTIES('from-x'=1, 'to-y'=2, 
'replace-char'='*'))))));">
+    <test-case sql="ALTER MASK RULE t_mask (COLUMNS((NAME=order_id, 
TYPE(NAME='MASK_FROM_X_TO_Y', PROPERTIES('from-x'=1, 'to-y'=2, 
'replace-char'='*')))));">
         <assertion expected-data-file="alter_mask_rule.xml">
             <initial-sql sql="CREATE MASK RULE t_mask 
(COLUMNS((NAME=order_id,TYPE(NAME='MD5'))));" />
             <assertion-sql sql="SHOW MASK RULES;" />
diff --git a/test/it/parser/src/main/resources/sql/supported/rdl/create.xml 
b/test/it/parser/src/main/resources/sql/supported/rdl/create.xml
index c165bcd2f6a..53076539569 100644
--- a/test/it/parser/src/main/resources/sql/supported/rdl/create.xml
+++ b/test/it/parser/src/main/resources/sql/supported/rdl/create.xml
@@ -36,8 +36,8 @@
     <sql-case id="create-sharding-table-reference-rule-with-quota" 
value="CREATE SHARDING TABLE REFERENCE RULE reference_0 
(`t_order`,`t_order_item`), reference_1 (t_1,t_2)" db-types="ShardingSphere" />
     <sql-case id="create-broadcast-table-rule" value="CREATE BROADCAST TABLE 
RULE t_1,t_2" db-types="ShardingSphere" />
     <sql-case id="create-broadcast-table-rule-if-not-exists" value="CREATE 
BROADCAST TABLE RULE IF NOT EXISTS t_1,t_2" db-types="ShardingSphere" />
-    <sql-case id="create-static-readwrite-splitting-rule" value="CREATE 
READWRITE_SPLITTING RULE ms_group_0 (WRITE_STORAGE_UNIT=primary_ds, 
READ_STORAGE_UNITS(replica_ds_0,replica_ds_1), TYPE(NAME='random')))" 
db-types="ShardingSphere" />
-    <sql-case id="create-static-readwrite-splitting-rule-if-not-exists" 
value="CREATE READWRITE_SPLITTING RULE IF NOT EXISTS ms_group_0 
(WRITE_STORAGE_UNIT=primary_ds, READ_STORAGE_UNITS(replica_ds_0,replica_ds_1), 
TYPE(NAME='random')))" db-types="ShardingSphere" />
+    <sql-case id="create-static-readwrite-splitting-rule" value="CREATE 
READWRITE_SPLITTING RULE ms_group_0 (WRITE_STORAGE_UNIT=primary_ds, 
READ_STORAGE_UNITS(replica_ds_0,replica_ds_1), TYPE(NAME='random'))" 
db-types="ShardingSphere" />
+    <sql-case id="create-static-readwrite-splitting-rule-if-not-exists" 
value="CREATE READWRITE_SPLITTING RULE IF NOT EXISTS ms_group_0 
(WRITE_STORAGE_UNIT=primary_ds, READ_STORAGE_UNITS(replica_ds_0,replica_ds_1), 
TYPE(NAME='random'))" db-types="ShardingSphere" />
     <sql-case id="create-encrypt-rule" value="CREATE ENCRYPT RULE t_encrypt 
(COLUMNS((NAME=user_id,CIPHER=user_cipher,ENCRYPT_ALGORITHM(TYPE(NAME='AES',PROPERTIES('aes-key-value'='123456abc')))),
 (NAME=order_id, CIPHER =order_cipher,ENCRYPT_ALGORITHM(TYPE(NAME='MD5')))))" 
db-types="ShardingSphere" />
     <sql-case id="create-encrypt-rule-if-not-exists" value="CREATE ENCRYPT 
RULE IF NOT EXISTS t_encrypt 
(COLUMNS((NAME=user_id,CIPHER=user_cipher,ENCRYPT_ALGORITHM(TYPE(NAME='AES',PROPERTIES('aes-key-value'='123456abc')))),
 (NAME=order_id, CIPHER =order_cipher,ENCRYPT_ALGORITHM(TYPE(NAME='MD5')))))" 
db-types="ShardingSphere" />
     <sql-case id="create-encrypt-rule-with-assisted-query-column" 
value="CREATE ENCRYPT RULE t_encrypt 
(COLUMNS((NAME=user_id,CIPHER=user_cipher,ASSISTED_QUERY_COLUMN=assisted_column,
 ENCRYPT_ALGORITHM(TYPE(NAME='AES',PROPERTIES('aes-key-value'='123456abc'))), 
ASSISTED_QUERY_ALGORITHM(TYPE(NAME='MD5'))), (NAME=order_id, CIPHER 
=order_cipher,ENCRYPT_ALGORITHM(TYPE(NAME='MD5')))))" db-types="ShardingSphere" 
/>
@@ -69,7 +69,7 @@
     <sql-case id="register-storage-unit-with-quota" value="REGISTER STORAGE 
UNIT `ds_0`(HOST='127.0.0.1',PORT=3306,DB='test0',USER='ROOT');" 
db-types="ShardingSphere" />
     <sql-case id="create-sharding-auto-table-rule-with-quota" value="CREATE 
SHARDING TABLE RULE `t_order` (STORAGE_UNITS(ms_group_0,ms_group_1), 
SHARDING_COLUMN=order_id,TYPE(NAME='hash_mod',PROPERTIES('sharding-count'='4')),
 KEY_GENERATE_STRATEGY(COLUMN=another_id,TYPE(NAME='snowflake')))" 
db-types="ShardingSphere" />
     <sql-case id="create-broadcast-table-rule-with-quota" value="CREATE 
BROADCAST TABLE RULE `t_1`,`t_2` " db-types="ShardingSphere" />
-    <sql-case id="create-readwrite-splitting-rule-with-quota" value="CREATE 
READWRITE_SPLITTING RULE `ms_group_0` (WRITE_STORAGE_UNIT=primary_ds, 
READ_STORAGE_UNITS(replica_ds_0,replica_ds_1), TYPE(NAME='random')))" 
db-types="ShardingSphere" />
+    <sql-case id="create-readwrite-splitting-rule-with-quota" value="CREATE 
READWRITE_SPLITTING RULE `ms_group_0` (WRITE_STORAGE_UNIT=primary_ds, 
READ_STORAGE_UNITS(replica_ds_0,replica_ds_1), TYPE(NAME='random'))" 
db-types="ShardingSphere" />
     <sql-case id="create-encrypt-rule-with-quota" value="CREATE ENCRYPT RULE 
`encrypt` 
(COLUMNS((NAME=user_id,CIPHER=user_cipher,ENCRYPT_ALGORITHM(TYPE(NAME='AES',PROPERTIES('aes-key-value'='123456abc')))),
 (NAME=order_id, CIPHER =order_cipher,ENCRYPT_ALGORITHM(TYPE(NAME='MD5')))))" 
db-types="ShardingSphere" />
     <sql-case id="create-encrypt-rule-with-query-with-cipher-column" 
value="CREATE ENCRYPT RULE `encrypt` 
(COLUMNS((NAME=user_id,CIPHER=user_cipher,ENCRYPT_ALGORITHM(TYPE(NAME='AES',PROPERTIES('aes-key-value'='123456abc'))))))"
 db-types="ShardingSphere" />
     <sql-case id="create-shadow-rule-with-quota" value="CREATE SHADOW RULE 
`shadow_rule`(SOURCE=demo_ds,SHADOW=demo_ds_shadow,t_order(TYPE(NAME='REGEX_MATCH',PROPERTIES('operation'='insert','column'='user_id','regex'='[1]')),TYPE(NAME='SQL_HINT')))"
 db-types="ShardingSphere" />

Reply via email to