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 2020/08/07 08:54:39 UTC

[shardingsphere] branch master updated: fix-6664 (#6683)

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

zhangyonglun 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 a8c86cd  fix-6664 (#6683)
a8c86cd is described below

commit a8c86cd67b6189b92e6e6fcf06f4db5db10f3ae7
Author: JingShang Lu <ji...@gmail.com>
AuthorDate: Fri Aug 7 16:54:21 2020 +0800

    fix-6664 (#6683)
---
 .../src/main/antlr4/imports/mysql/DCLStatement.g4  | 23 ++++++++++++++++++++--
 1 file changed, 21 insertions(+), 2 deletions(-)

diff --git a/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-mysql/src/main/antlr4/imports/mysql/DCLStatement.g4 b/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-mysql/src/main/antlr4/imports/mysql/DCLStatement.g4
index 41cc618..5bb8483 100644
--- a/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-mysql/src/main/antlr4/imports/mysql/DCLStatement.g4
+++ b/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-mysql/src/main/antlr4/imports/mysql/DCLStatement.g4
@@ -97,8 +97,27 @@ privilegeLevel
 
 createUser
     : CREATE USER (IF NOT EXISTS)? userName userAuthOption_? (COMMA_ userName userAuthOption_?)*
-    DEFAULT ROLE roleName (COMMA_ roleName)* (REQUIRE (NONE | tlsOption_ (AND? tlsOption_)*))?
-    (WITH resourceOption_ resourceOption_*)? (passwordOption_ | lockOption_)* (COMMENT STRING_ | ATTRIBUTE STRING_)?
+    defaultRoleClause? requireClause? connectOption? accountLockPasswordExpireOptions?
+    ;
+
+defaultRoleClause
+    : DEFAULT ROLE roleName (COMMA_ roleName)*
+    ;
+
+requireClause
+    : REQUIRE (NONE | tlsOption_ (AND? tlsOption_)*)
+    ;
+
+connectOption
+    : WITH resourceOption_ resourceOption_*
+    ;
+
+accountLockPasswordExpireOptions
+    : accountLockPasswordExpireOption+
+    ;
+
+accountLockPasswordExpireOption
+    : passwordOption_ | lockOption_
     ;
 
 alterUser