You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by pa...@apache.org on 2020/11/19 08:39:13 UTC
[shardingsphere] branch master updated: Fix alteruser and
createUser syntax (#8201)
This is an automated email from the ASF dual-hosted git repository.
panjuan 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 c9e4273 Fix alteruser and createUser syntax (#8201)
c9e4273 is described below
commit c9e4273ad23ab0373955be3ad006396818f243a3
Author: JingShang Lu <lu...@apache.org>
AuthorDate: Thu Nov 19 16:38:55 2020 +0800
Fix alteruser and createUser syntax (#8201)
* Fix alteruser and createUser syntax
* fix
* fix error SQL test case select_into_out_file_with_fields_and_escaped
* fix
---
.../TextProtocolBackendHandlerFactoryTest.java | 2 +-
.../src/main/antlr4/imports/mysql/BaseRule.g4 | 16 ++++++--
.../src/main/antlr4/imports/mysql/DALStatement.g4 | 43 ++++++++++++++++++++
.../src/main/antlr4/imports/mysql/DCLStatement.g4 | 47 +++++++++++-----------
.../src/main/antlr4/imports/mysql/DDLStatement.g4 | 2 +-
.../sql/parser/autogen/MySQLStatement.g4 | 16 ++------
.../impl/MySQLDALStatementSQLVisitor.java | 20 ++++++++-
.../resources/sql/supported/dcl/alter-user.xml | 6 +--
.../resources/sql/supported/dcl/create-user.xml | 6 +--
.../resources/sql/supported/dml/select-into.xml | 2 +-
10 files changed, 111 insertions(+), 49 deletions(-)
diff --git a/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/TextProtocolBackendHandlerFactoryTest.java b/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/TextProtocolBackendHandlerFactoryTest.java
index 4ab2b07..f3fda34 100644
--- a/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/TextProtocolBackendHandlerFactoryTest.java
+++ b/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/TextProtocolBackendHandlerFactoryTest.java
@@ -168,7 +168,7 @@ public final class TextProtocolBackendHandlerFactoryTest {
@Test
public void assertNewInstanceWithShow() {
- String sql = "SHOW VARIABLES LIKE %x%";
+ String sql = "SHOW VARIABLES LIKE '%x%'";
TextProtocolBackendHandler actual = TextProtocolBackendHandlerFactory.newInstance(databaseType, sql, backendConnection);
assertThat(actual, instanceOf(UnicastBackendHandler.class));
sql = "SHOW VARIABLES WHERE Variable_name ='language'";
diff --git a/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-mysql/src/main/antlr4/imports/mysql/BaseRule.g4 b/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-mysql/src/main/antlr4/imports/mysql/BaseRule.g4
index 762fd81..ab83b6b 100644
--- a/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-mysql/src/main/antlr4/imports/mysql/BaseRule.g4
+++ b/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-mysql/src/main/antlr4/imports/mysql/BaseRule.g4
@@ -144,6 +144,10 @@ unreservedWord
| WAIT | WARNINGS | WEEK | WEIGHT_STRING | WITHOUT | WORK | WRAPPER | X509 | XA | XID | XML | YEAR | COLUMN_NAME
;
+textOrIdentifier
+ : identifier | STRING_
+ ;
+
variable
: (AT_? AT_)? scope? DOT_? internalVariableName
;
@@ -195,10 +199,12 @@ indexName
: identifier
;
+userIdentifierOrText
+ : textOrIdentifier (AT_ textOrIdentifier)?
+ ;
+
userName
- : STRING_ AT_ STRING_
- | identifier
- | STRING_
+ : userIdentifierOrText | CURRENT_USER (LP_ RP_)?
;
eventName
@@ -670,6 +676,10 @@ textString
| BIT_NUM_
;
+textStringHash
+ : STRING_ | HEX_DIGIT_
+ ;
+
fieldOptions
: (UNSIGNED | SIGNED | ZEROFILL)+
;
diff --git a/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-mysql/src/main/antlr4/imports/mysql/DALStatement.g4 b/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-mysql/src/main/antlr4/imports/mysql/DALStatement.g4
index 4a180a5..a7f2cd6 100644
--- a/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-mysql/src/main/antlr4/imports/mysql/DALStatement.g4
+++ b/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-mysql/src/main/antlr4/imports/mysql/DALStatement.g4
@@ -387,3 +387,46 @@ explainableStatement
formatName
: TRADITIONAL | JSON | TREE
;
+
+show
+ : showDatabases
+ | showTables
+ | showTableStatus
+ | showBinaryLogs
+ | showColumns
+ | showIndex
+ | showCreateDatabase
+ | showCreateTable
+ | showBinlogEvents
+ | showCharacterSet
+ | showCollation
+ | showCreateEvent
+ | showCreateFunction
+ | showCreateProcedure
+ | showCreateTrigger
+ | showCreateUser
+ | showCreateView
+ | showEngine
+ | showEngines
+ | showErrors
+ | showEvents
+ | showFunctionCode
+ | showFunctionStatus
+ | showGrant
+ | showMasterStatus
+ | showPlugins
+ | showOpenTables
+ | showPrivileges
+ | showProcedureCode
+ | showProcesslist
+ | showProfile
+ | showProcedureStatus
+ | showProfiles
+ | showSlavehost
+ | showSlaveStatus
+ | showRelaylogEvent
+ | showStatus
+ | showTrriggers
+ | showWarnings
+ | showVariables
+ ;
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 d62442b..0538aea 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
@@ -96,8 +96,7 @@ privilegeLevel
;
createUser
- : CREATE USER (IF NOT EXISTS)? userName userAuthOption? (COMMA_ userName userAuthOption?)*
- defaultRoleClause? requireClause? connectOption? accountLockPasswordExpireOptions?
+ : CREATE USER (IF NOT EXISTS)? alterUserList defaultRoleClause? requireClause? connectOptions? accountLockPasswordExpireOptions?
;
defaultRoleClause
@@ -108,8 +107,8 @@ requireClause
: REQUIRE (NONE | tlsOption (AND? tlsOption)*)
;
-connectOption
- : WITH resourceOption resourceOption*
+connectOptions
+ : WITH connectOption connectOption*
;
accountLockPasswordExpireOptions
@@ -117,16 +116,29 @@ accountLockPasswordExpireOptions
;
accountLockPasswordExpireOption
- : passwordOption | lockOption
+ : ACCOUNT (LOCK | UNLOCK)
+ | PASSWORD EXPIRE (DEFAULT | NEVER | INTERVAL NUMBER_ DAY)?
+ | PASSWORD HISTORY (DEFAULT | NUMBER_)
+ | PASSWORD REUSE INTERVAL (DEFAULT | NUMBER_ DAY)
+ | PASSWORD REQUIRE CURRENT (DEFAULT | OPTIONAL)?
+ | FAILED_LOGIN_ATTEMPTS NUMBER_
+ | PASSWORD_LOCK_TIME (NUMBER_ | UNBOUNDED)
;
alterUser
- : ALTER USER (IF EXISTS)? userName userAuthOption? (COMMA_ userName userAuthOption?)*
- (REQUIRE (NONE | tlsOption (AND? tlsOption)*))? (WITH resourceOption resourceOption*)? (passwordOption | lockOption)*
+ : ALTER USER (IF EXISTS)? alterUserList requireClause? connectOptions? accountLockPasswordExpireOptions?
| ALTER USER (IF EXISTS)? USER LP_ RP_ userFuncAuthOption
| ALTER USER (IF EXISTS)? userName DEFAULT ROLE (NONE | ALL | roleName (COMMA_ roleName)*)
;
+alterUserEntry
+ : userName userAuthOption?
+ ;
+
+alterUserList
+ : alterUserEntry (COMMA_ alterUserEntry)*
+ ;
+
dropUser
: DROP USER (IF EXISTS)? userName (COMMA_ userName)*
;
@@ -186,25 +198,12 @@ identifiedBy
;
identifiedWith
- : IDENTIFIED WITH pluginName (BY |AS) (STRING_ | RANDOM PASSWORD)
- (REPLACE stringLiterals)? (RETAIN CURRENT PASSWORD)?
+ : IDENTIFIED WITH pluginName
+ | IDENTIFIED WITH pluginName BY (STRING_ | RANDOM PASSWORD) (REPLACE stringLiterals)? (RETAIN CURRENT PASSWORD)?
+ | IDENTIFIED WITH pluginName AS textStringHash (RETAIN CURRENT PASSWORD)?
;
-lockOption
- : ACCOUNT LOCK | ACCOUNT UNLOCK
- ;
-
-
-passwordOption
- : PASSWORD EXPIRE (DEFAULT | NEVER | INTERVAL NUMBER_ DAY)?
- | PASSWORD HISTORY (DEFAULT | NUMBER_)
- | PASSWORD REUSE INTERVAL (DEFAULT | NUMBER_ DAY)
- | PASSWORD REQUIRE CURRENT (DEFAULT | OPTIONAL)?
- | FAILED_LOGIN_ATTEMPTS NUMBER_
- | PASSWORD_LOCK_TIME (NUMBER_ | UNBOUNDED)
- ;
-
-resourceOption
+connectOption
: MAX_QUERIES_PER_HOUR NUMBER_
| MAX_UPDATES_PER_HOUR NUMBER_
| MAX_CONNECTIONS_PER_HOUR NUMBER_
diff --git a/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-mysql/src/main/antlr4/imports/mysql/DDLStatement.g4 b/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-mysql/src/main/antlr4/imports/mysql/DDLStatement.g4
index 7f306fc..fdacc9d 100644
--- a/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-mysql/src/main/antlr4/imports/mysql/DDLStatement.g4
+++ b/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-mysql/src/main/antlr4/imports/mysql/DDLStatement.g4
@@ -533,7 +533,7 @@ createTableOption
| option = MIN_ROWS EQ_? NUMBER_
| option = AVG_ROW_LENGTH EQ_? NUMBER_
| option = PASSWORD EQ_? STRING_
- | option = COMMENT EQ_? STRING
+ | option = COMMENT EQ_? STRING_
| option = COMPRESSION EQ_? textString
| option = ENCRYPTION EQ_? textString
| option = AUTO_INCREMENT EQ_? NUMBER_
diff --git a/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-mysql/src/main/antlr4/org/apache/shardingsphere/sql/parser/autogen/MySQLStatement.g4 b/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-mysql/src/main/antlr4/org/apache/shardingsphere/sql/parser/autogen/MySQLStatement.g4
index b9f307f..1331d9b 100644
--- a/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-mysql/src/main/antlr4/org/apache/shardingsphere/sql/parser/autogen/MySQLStatement.g4
+++ b/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-mysql/src/main/antlr4/org/apache/shardingsphere/sql/parser/autogen/MySQLStatement.g4
@@ -67,13 +67,7 @@ execute
| setPassword
| use
| explain
- | showDatabases
- | showTables
- | showTableStatus
- | showColumns
- | showIndex
- | showCreateTable
- | showOther
+ | show
| setVariable
| setName
| setCharacter
@@ -81,9 +75,7 @@ execute
| changeMasterTo
| startSlave
| stopSlave
- | showCreateFunction
- | showCreateProcedure
- | showCreateView
- | showCreateUser
- ) SEMI_?
+ | analyzeTable
+ | renameTable
+ ) (SEMI_ EOF? | EOF)
;
diff --git a/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-mysql/src/main/java/org/apache/shardingsphere/sql/parser/mysql/visitor/statement/impl/MySQLDALStatementSQLVisitor.java b/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-mysql/src/main/java/org/apache/shardingsphere/sql/parser/mysql/visitor/statement/impl/MySQLDALStatementSQLVisitor.java
index e0ec4b8..e0f2004 100644
--- a/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-mysql/src/main/java/org/apache/shardingsphere/sql/parser/mysql/visitor/statement/impl/MySQLDALStatementSQLVisitor.java
+++ b/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-mysql/src/main/java/org/apache/shardingsphere/sql/parser/mysql/visitor/statement/impl/MySQLDALStatementSQLVisitor.java
@@ -39,6 +39,8 @@ import org.apache.shardingsphere.sql.parser.autogen.MySQLStatementParser.SetName
import org.apache.shardingsphere.sql.parser.autogen.MySQLStatementParser.SetVariableContext;
import org.apache.shardingsphere.sql.parser.autogen.MySQLStatementParser.ShowBinaryLogsContext;
import org.apache.shardingsphere.sql.parser.autogen.MySQLStatementParser.ShowBinlogEventsContext;
+import org.apache.shardingsphere.sql.parser.autogen.MySQLStatementParser.ShowCharacterSetContext;
+import org.apache.shardingsphere.sql.parser.autogen.MySQLStatementParser.ShowCollationContext;
import org.apache.shardingsphere.sql.parser.autogen.MySQLStatementParser.ShowColumnsContext;
import org.apache.shardingsphere.sql.parser.autogen.MySQLStatementParser.ShowCreateEventContext;
import org.apache.shardingsphere.sql.parser.autogen.MySQLStatementParser.ShowCreateFunctionContext;
@@ -53,6 +55,7 @@ import org.apache.shardingsphere.sql.parser.autogen.MySQLStatementParser.ShowOth
import org.apache.shardingsphere.sql.parser.autogen.MySQLStatementParser.ShowStatusContext;
import org.apache.shardingsphere.sql.parser.autogen.MySQLStatementParser.ShowTableStatusContext;
import org.apache.shardingsphere.sql.parser.autogen.MySQLStatementParser.ShowTablesContext;
+import org.apache.shardingsphere.sql.parser.autogen.MySQLStatementParser.ShowVariablesContext;
import org.apache.shardingsphere.sql.parser.autogen.MySQLStatementParser.ShowWarningsContext;
import org.apache.shardingsphere.sql.parser.autogen.MySQLStatementParser.UninstallPluginContext;
import org.apache.shardingsphere.sql.parser.autogen.MySQLStatementParser.UseContext;
@@ -287,7 +290,22 @@ public final class MySQLDALStatementSQLVisitor extends MySQLStatementSQLVisitor
public ASTNode visitShowOther(final ShowOtherContext ctx) {
return new MySQLShowOtherStatement();
}
-
+
+ @Override
+ public ASTNode visitShowVariables(final ShowVariablesContext ctx) {
+ return new MySQLShowOtherStatement();
+ }
+
+ @Override
+ public ASTNode visitShowCharacterSet(final ShowCharacterSetContext ctx) {
+ return new MySQLShowOtherStatement();
+ }
+
+ @Override
+ public ASTNode visitShowCollation(final ShowCollationContext ctx) {
+ return new MySQLShowOtherStatement();
+ }
+
@Override
public ASTNode visitSetVariable(final SetVariableContext ctx) {
MySQLSetStatement result = new MySQLSetStatement();
diff --git a/shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/main/resources/sql/supported/dcl/alter-user.xml b/shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/main/resources/sql/supported/dcl/alter-user.xml
index 1ca1b59..343faf3 100644
--- a/shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/main/resources/sql/supported/dcl/alter-user.xml
+++ b/shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/main/resources/sql/supported/dcl/alter-user.xml
@@ -31,12 +31,12 @@
<sql-case id="alter_user_if_exists" value="ALTER USER IF EXISTS user1" db-types="MySQL" />
<sql-case id="alter_local_user" value="ALTER USER 'user1'@'localhost'" db-types="MySQL" />
<sql-case id="alter_user_with_password" value="ALTER USER user1 IDENTIFIED BY 'password'" db-types="MySQL,Oracle" />
- <sql-case id="alter_user_with_resource_option" value="ALTER USER user1 MAX_QUERIES_PER_HOUR 1" db-types="MySQL" />
- <sql-case id="alter_user_with_resource_options" value="ALTER USER user1 MAX_QUERIES_PER_HOUR 1 MAX_UPDATES_PER_HOUR 1" db-types="MySQL" />
+ <sql-case id="alter_user_with_resource_option" value="ALTER USER user1 WITH MAX_QUERIES_PER_HOUR 1" db-types="MySQL" />
+ <sql-case id="alter_user_with_resource_options" value="ALTER USER user1 WITH MAX_QUERIES_PER_HOUR 1 MAX_UPDATES_PER_HOUR 1" db-types="MySQL" />
<sql-case id="alter_user_with_password_option" value="ALTER USER user1 PASSWORD EXPIRE DEFAULT" db-types="MySQL" />
<sql-case id="alter_user_with_password_options" value="ALTER USER user1 PASSWORD EXPIRE DEFAULT PASSWORD HISTORY DEFAULT" db-types="MySQL" />
<sql-case id="alter_user_with_lock_option" value="ALTER USER user1 ACCOUNT LOCK" db-types="MySQL" />
- <sql-case id="alter_user_with_options" value="ALTER USER user1 MAX_QUERIES_PER_HOUR 1 MAX_UPDATES_PER_HOUR 1 PASSWORD EXPIRE DEFAULT PASSWORD HISTORY DEFAULT ACCOUNT LOCK" db-types="MySQL" />
+ <sql-case id="alter_user_with_options" value="ALTER USER user1 WITH MAX_QUERIES_PER_HOUR 1 MAX_UPDATES_PER_HOUR 1 PASSWORD EXPIRE DEFAULT PASSWORD HISTORY DEFAULT ACCOUNT LOCK" db-types="MySQL" />
<sql-case id="alter_external_user" value="ALTER USER user1 IDENTIFIED EXTERNALLY" db-types="Oracle" />
<sql-case id="alter_global_user" value="ALTER USER user1 IDENTIFIED GLOBALLY AS 'CN=user1'" db-types="Oracle" />
<sql-case id="alter_user_with_tablespace_option" value="ALTER USER user1 DEFAULT TABLESPACE tablespace1" db-types="Oracle" />
diff --git a/shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/main/resources/sql/supported/dcl/create-user.xml b/shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/main/resources/sql/supported/dcl/create-user.xml
index 48b3ca6..262e897 100644
--- a/shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/main/resources/sql/supported/dcl/create-user.xml
+++ b/shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/main/resources/sql/supported/dcl/create-user.xml
@@ -29,12 +29,12 @@
<sql-case id="create_local_user" value="CREATE USER 'user1'@'localhost' DEFAULT ROLE role1" db-types="MySQL" />
<sql-case id="create_user_with_roles" value="CREATE USER user1 DEFAULT ROLE role1, role2" db-types="MySQL" />
<sql-case id="create_user_with_password_default_role" value="CREATE USER user1 IDENTIFIED BY RANDOM password DEFAULT ROLE role1" db-types="MySQL" />
- <sql-case id="create_user_with_resource_option" value="CREATE USER user1 DEFAULT ROLE role1 MAX_QUERIES_PER_HOUR 1" db-types="MySQL" />
- <sql-case id="create_user_with_resource_options" value="CREATE USER user1 DEFAULT ROLE role1 MAX_QUERIES_PER_HOUR 1 MAX_UPDATES_PER_HOUR 1" db-types="MySQL" />
+ <sql-case id="create_user_with_resource_option" value="CREATE USER user1 DEFAULT ROLE role1 WITH MAX_QUERIES_PER_HOUR 1" db-types="MySQL" />
+ <sql-case id="create_user_with_resource_options" value="CREATE USER user1 DEFAULT ROLE role1 WITH MAX_QUERIES_PER_HOUR 1 MAX_UPDATES_PER_HOUR 1" db-types="MySQL" />
<sql-case id="create_user_with_password_option" value="CREATE USER user1 DEFAULT ROLE role1 PASSWORD EXPIRE DEFAULT" db-types="MySQL,Oracle" />
<sql-case id="create_user_with_password_options" value="CREATE USER user1 DEFAULT ROLE role1 PASSWORD EXPIRE DEFAULT PASSWORD HISTORY DEFAULT" db-types="MySQL" />
<sql-case id="create_user_with_lock_option" value="CREATE USER user1 DEFAULT ROLE role1 ACCOUNT LOCK" db-types="MySQL,Oracle" />
- <sql-case id="create_user_with_options" value="CREATE USER user1 DEFAULT ROLE role1 MAX_QUERIES_PER_HOUR 1 MAX_UPDATES_PER_HOUR 1 PASSWORD EXPIRE DEFAULT PASSWORD HISTORY DEFAULT ACCOUNT LOCK" db-types="MySQL" />
+ <sql-case id="create_user_with_options" value="CREATE USER user1 DEFAULT ROLE role1 WITH MAX_QUERIES_PER_HOUR 1 MAX_UPDATES_PER_HOUR 1 PASSWORD EXPIRE DEFAULT PASSWORD HISTORY DEFAULT ACCOUNT LOCK" db-types="MySQL" />
<sql-case id="create_external_user" value="CREATE USER user1 IDENTIFIED EXTERNALLY" db-types="Oracle" />
<sql-case id="create_global_user" value="CREATE USER user1 IDENTIFIED GLOBALLY" db-types="Oracle" />
<sql-case id="create_user_with_password" value="CREATE USER user1 IDENTIFIED BY RANDOM password default role role1" db-types="H2,MySQL,PostgreSQL,Oracle,SQLServer" />
diff --git a/shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/main/resources/sql/supported/dml/select-into.xml b/shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/main/resources/sql/supported/dml/select-into.xml
index d64f957..9d45380 100644
--- a/shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/main/resources/sql/supported/dml/select-into.xml
+++ b/shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/main/resources/sql/supported/dml/select-into.xml
@@ -23,7 +23,7 @@
<sql-case id="select_into_out_file" value="SELECT * FROM t_order LIMIT ? INTO OUTFILE '/tmp/tmp.txt'" db-types="MySQL"/>
<sql-case id="select_into_out_file_with_charset" value="SELECT * FROM t_order LIMIT ? INTO OUTFILE '/tmp/tmp.txt' CHARACTER SET utf8" db-types="MySQL"/>
<sql-case id="select_into_out_file_with_fields" value="SELECT * FROM t_order LIMIT ? INTO OUTFILE '/tmp/tmp.txt' FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"'" db-types="MySQL"/>
- <sql-case id="select_into_out_file_with_fields_and_escaped" value="SELECT user_id, status FROM t_order LIMIT ? INTO OUTFILE '/tmp/tmp.txt' FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"', ESCAPED BY '\'" db-types="MySQL"/>
+ <sql-case id="select_into_out_file_with_fields_and_escaped" value="SELECT user_id, status FROM t_order LIMIT ? INTO OUTFILE '/tmp/tmp.txt' FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' ESCAPED BY '\\'" db-types="MySQL"/>
<sql-case id="select_into_out_file_with_lines" value="SELECT * FROM t_order LIMIT ? INTO OUTFILE '/tmp/tmp.txt' LINES TERMINATED BY '\n'" db-types="MySQL"/>
<sql-case id="select_into_with_lock_after_into" value="SELECT status FROM t_order WHERE order_id = ? INTO @var1 FOR UPDATE " db-types="MySQL"/>
<sql-case id="select_into_with_lock_before_into" value="SELECT status FROM t_order WHERE order_id = ? FOR UPDATE INTO @var1" db-types="MySQL"/>