Skip to content

Commit

Permalink
Update Lexer.java
Browse files Browse the repository at this point in the history
处理druid解析例如下面sql报错的问题:select id||/\*用户id\*/name from user;  ||和/之间没有空格的话会解析报错,这种sql在oracle中是正常执行的
  • Loading branch information
rfvgtgfdv authored and lizongbo committed May 4, 2024
1 parent 50de16a commit 636d2cc
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions core/src/main/java/com/alibaba/druid/sql/parser/Lexer.java
Original file line number Diff line number Diff line change
Expand Up @@ -1545,6 +1545,10 @@ private final void scanOperator() {
if (ch == '|') {
scanChar();
if (ch == '/') {
if (charAt(pos + 1) == '*') {
token = Token.BARBAR;
break;
}
scanChar();
token = Token.BARBARSLASH;
} else {
Expand Down

0 comments on commit 636d2cc

Please sign in to comment.