mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
bug fixed for oracle sql parser.
This commit is contained in:
+17
-8
@@ -987,19 +987,28 @@ public class OracleStatementParser extends SQLStatementParser {
|
||||
|
||||
public SQLStatement parseSet() {
|
||||
accept(Token.SET);
|
||||
acceptIdentifier("TRANSACTION");
|
||||
|
||||
OracleSetTransactionStatement stmt = new OracleSetTransactionStatement();
|
||||
|
||||
if (identifierEquals("READ")) {
|
||||
if (identifierEquals("TRANSACTION")) {
|
||||
lexer.nextToken();
|
||||
acceptIdentifier("ONLY");
|
||||
stmt.setReadOnly(true);
|
||||
|
||||
OracleSetTransactionStatement stmt = new OracleSetTransactionStatement();
|
||||
|
||||
if (identifierEquals("READ")) {
|
||||
lexer.nextToken();
|
||||
acceptIdentifier("ONLY");
|
||||
stmt.setReadOnly(true);
|
||||
}
|
||||
|
||||
acceptIdentifier("NAME");
|
||||
|
||||
stmt.setName(this.exprParser.expr());
|
||||
return stmt;
|
||||
}
|
||||
|
||||
acceptIdentifier("NAME");
|
||||
SQLSetStatement stmt = new SQLSetStatement(getDbType());
|
||||
parseAssignItems(stmt.getItems(), stmt);
|
||||
|
||||
stmt.setName(this.exprParser.expr());
|
||||
stmt.putAttribute("parser.set", Boolean.TRUE);
|
||||
return stmt;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user