JSqlParser
JSqlParser copied to clipboard
select database()
Describe the bug When I want to get the currently used database, I find that it cannot be parsed
To Reproduce Steps to reproduce the behavior:
- Example SQL
String sql = "select database()"; - Parsing this SQL using JSqlParser with this statements
CCJSqlParserUtil.parse(sql); - Exception
Encountered unexpected token: "database" "DATABASE"
at line 1, column 8.
Was expecting one of:
"*"
"STRAIGHT_JOIN"
Expected behavior
System
- mysql 8.0.27
- jdk-liberica-11.0.13
- 4.2 or 4.3
Keyword issues, which is solved in PR #1382 (pending).