wgy8283335 commented on a change in pull request #10514:
URL: https://github.com/apache/shardingsphere/pull/10514#discussion_r641909650



##########
File path: 
shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-oracle/src/main/antlr4/imports/oracle/TCLStatement.g4
##########
@@ -20,7 +20,10 @@ grammar TCLStatement;
 import Symbol, Keyword, OracleKeyword, Literals, BaseRule;
 
 setTransaction
-    : SET TRANSACTION
+    : SET TRANSACTION ((READ (ONLY | WRITE)

Review comment:
       The rule is not correct.
   
![image](https://user-images.githubusercontent.com/22066046/120063688-05850680-c09b-11eb-9ff7-0664bbe34f69.png)
   

##########
File path: 
shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/main/resources/sql/supported/tcl/set-transaction.xml
##########
@@ -21,6 +21,10 @@
     <sql-case id="setGlobalTransaction" value="SET GLOBAL TRANSACTION 
ISOLATION LEVEL REPEATABLE READ" db-types="MySQL" />
     <sql-case id="setSessionTransaction" value="SET SESSION CHARACTERISTICS AS 
TRANSACTION ISOLATION LEVEL READ COMMITTED" db-types="PostgreSQL" />
     <sql-case id="setTransactionReadOnly" value="SET TRANSACTION READ ONLY" 
db-types="MySQL,Oracle" />
+    <sql-case id="setTransactionReadWriteWithName" value="SET TRANSACTION READ 
WRITE NAME 'Toronto'" db-types="Oracle" />
+    <sql-case id="setTransactionIsolationLevelSerializable" value="SET 
TRANSACTION ISOLATION LEVEL SERIALIZABLE" db-types="Oracle" />

Review comment:
       Lack the keywords ‘NAME string’.

##########
File path: 
shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/main/resources/sql/supported/tcl/set-transaction.xml
##########
@@ -21,6 +21,10 @@
     <sql-case id="setGlobalTransaction" value="SET GLOBAL TRANSACTION 
ISOLATION LEVEL REPEATABLE READ" db-types="MySQL" />
     <sql-case id="setSessionTransaction" value="SET SESSION CHARACTERISTICS AS 
TRANSACTION ISOLATION LEVEL READ COMMITTED" db-types="PostgreSQL" />
     <sql-case id="setTransactionReadOnly" value="SET TRANSACTION READ ONLY" 
db-types="MySQL,Oracle" />
+    <sql-case id="setTransactionReadWriteWithName" value="SET TRANSACTION READ 
WRITE NAME 'Toronto'" db-types="Oracle" />
+    <sql-case id="setTransactionIsolationLevelSerializable" value="SET 
TRANSACTION ISOLATION LEVEL SERIALIZABLE" db-types="Oracle" />
+    <sql-case id="setTransactionIsolationLevelReadCommitted" value="SET 
TRANSACTION ISOLATION LEVEL READ COMMITTED" db-types="Oracle" />
+    <sql-case id="setTransactionUseRollbackSegment" value="SET TRANSACTION USE 
ROLLBACK SEGMENT rbs_ts" db-types="Oracle" />

Review comment:
       Lack the keywords ‘NAME string’.

##########
File path: 
shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/main/resources/sql/supported/tcl/set-transaction.xml
##########
@@ -21,6 +21,10 @@
     <sql-case id="setGlobalTransaction" value="SET GLOBAL TRANSACTION 
ISOLATION LEVEL REPEATABLE READ" db-types="MySQL" />
     <sql-case id="setSessionTransaction" value="SET SESSION CHARACTERISTICS AS 
TRANSACTION ISOLATION LEVEL READ COMMITTED" db-types="PostgreSQL" />
     <sql-case id="setTransactionReadOnly" value="SET TRANSACTION READ ONLY" 
db-types="MySQL,Oracle" />
+    <sql-case id="setTransactionReadWriteWithName" value="SET TRANSACTION READ 
WRITE NAME 'Toronto'" db-types="Oracle" />
+    <sql-case id="setTransactionIsolationLevelSerializable" value="SET 
TRANSACTION ISOLATION LEVEL SERIALIZABLE" db-types="Oracle" />
+    <sql-case id="setTransactionIsolationLevelReadCommitted" value="SET 
TRANSACTION ISOLATION LEVEL READ COMMITTED" db-types="Oracle" />

Review comment:
       Lack the keywords ‘NAME string’.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to