You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
4.3Release:Error SQL:select database() from dual #1443
public static void main(String[] args) {
String sql = "select database() from dual";
try {
Statement statement = CCJSqlParserUtil.parse(sql);
System.out.println(statement.toString());
} catch (JSQLParserException e) {
throw new RuntimeException(e.getCause() + "Failed to process, Error SQL:" + sql);
}
}
run result:
Exception in thread "main" java.lang.RuntimeException: net.sf.jsqlparser.parser.ParseException: Encountered unexpected token: "database" "DATABASE"
at line 1, column 8.
Was expecting one of:
"*"
"STRAIGHT_JOIN"
Failed to process, Error SQL:select database() from dual
at com.ruoyi.common.Test.main(Test.java:15)
Greetings.
this bug not fixed on release-4.3, but Why does it work normally with 4.3-Snapshot ?
In one of PRs that were never deployed to 4.3-SNAPSHOT there was a construct included using a new keyword "database". That's why in the release this does not work anymore.
Activity
[-]Error SQL:select database() from dual[/-][+]4.3:Error SQL:select database() from dual[/+][-]4.3:Error SQL:select database() from dual[/-][+]4.3Release:Error SQL:select database() from dual[/+]wumpz commentedon Dec 20, 2021
In one of PRs that were never deployed to 4.3-SNAPSHOT there was a construct included using a new keyword "database". That's why in the release this does not work anymore.
works.
manticore-projects commentedon Dec 30, 2021
Solved by PR #1382 (which properly allows token for certain use.)