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

duanzhengqiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shardingsphere.git


The following commit(s) were added to refs/heads/master by this push:
     new 71ee00f54cb Change GRANT_PROXY enum value Spelling (#25535) (#25814)
71ee00f54cb is described below

commit 71ee00f54cbfcec18ed1035154e700be8495e509
Author: niu niu <[email protected]>
AuthorDate: Wed May 24 09:58:40 2023 +0800

    Change GRANT_PROXY enum value Spelling (#25535) (#25814)
---
 .../shardingsphere/sql/parser/core/database/visitor/SQLVisitorRule.java | 2 +-
 test/it/parser/src/main/resources/case/dcl/grant.xml                    | 2 ++
 test/it/parser/src/main/resources/sql/supported/dcl/grant-user.xml      | 2 ++
 3 files changed, 5 insertions(+), 1 deletion(-)

diff --git 
a/parser/sql/engine/src/main/java/org/apache/shardingsphere/sql/parser/core/database/visitor/SQLVisitorRule.java
 
b/parser/sql/engine/src/main/java/org/apache/shardingsphere/sql/parser/core/database/visitor/SQLVisitorRule.java
index 4228e74bcd9..97185d63a1f 100644
--- 
a/parser/sql/engine/src/main/java/org/apache/shardingsphere/sql/parser/core/database/visitor/SQLVisitorRule.java
+++ 
b/parser/sql/engine/src/main/java/org/apache/shardingsphere/sql/parser/core/database/visitor/SQLVisitorRule.java
@@ -311,7 +311,7 @@ public enum SQLVisitorRule {
     
     GRANT_ROLE_OR_PRIVILEGE_ON_TO("GrantRoleOrPrivilegeOnTo", 
SQLStatementType.DCL),
     
-    GRANT_PROXY("GrantPROXY", SQLStatementType.DCL),
+    GRANT_PROXY("GrantProxy", SQLStatementType.DCL),
     
     REVOKE("Revoke", SQLStatementType.DCL),
     
diff --git a/test/it/parser/src/main/resources/case/dcl/grant.xml 
b/test/it/parser/src/main/resources/case/dcl/grant.xml
index de6767d0d29..1c1f6fa959d 100644
--- a/test/it/parser/src/main/resources/case/dcl/grant.xml
+++ b/test/it/parser/src/main/resources/case/dcl/grant.xml
@@ -54,6 +54,8 @@
     </grant>
     
     <grant sql-case-id="grant_select_to_local_user" />
+    <grant sql-case-id="grant_create_to_local_user" />
+    <grant sql-case-id="grant_proxy_to_local_user" />
     <grant sql-case-id="grant_crud" />
     <grant sql-case-id="grant_all" />
     
diff --git a/test/it/parser/src/main/resources/sql/supported/dcl/grant-user.xml 
b/test/it/parser/src/main/resources/sql/supported/dcl/grant-user.xml
index f415111e0ed..cf7df56d6af 100644
--- a/test/it/parser/src/main/resources/sql/supported/dcl/grant-user.xml
+++ b/test/it/parser/src/main/resources/sql/supported/dcl/grant-user.xml
@@ -28,6 +28,8 @@
     <sql-case id="grant_select" value="GRANT SELECT ON *.* TO user1" 
db-types="MySQL" />
     <sql-case id="grant_select_column" value="GRANT SELECT (order_id) ON 
ds_0.t_order TO user1" db-types="MySQL,SQLServer" />
     <sql-case id="grant_select_to_local_user" value="GRANT SELECT ON *.* TO 
'user1'@'localhost'" db-types="MySQL" />
+    <sql-case id="grant_create_to_local_user" value="GRANT CREATE ON *.* TO 
user_name_len_25_01234567@localhost" db-types="MySQL" />
+    <sql-case id="grant_proxy_to_local_user" value="GRANT PROXY ON 
bug20364862_dest@localhost TO bug20364862_user@localhost" db-types="MySQL" />
     <sql-case id="grant_crud" value="GRANT INSERT, SELECT, UPDATE, DELETE ON 
*.* TO user1" db-types="MySQL" />
     <sql-case id="grant_all" value="GRANT ALL PRIVILEGES ON *.* TO user1" 
db-types="MySQL" />
     <sql-case id="grant_all_on_table" value="GRANT ALL PRIVILEGES ON 
ds_0.t_order TO user1" db-types="MySQL,PostgreSQL,openGauss,SQLServer" />

Reply via email to