JSqlParser icon indicating copy to clipboard operation
JSqlParser copied to clipboard

select database()

Open nasodaengineer opened this issue 3 years ago • 1 comments

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:

  1. Example SQL String sql = "select database()";
  2. Parsing this SQL using JSqlParser with this statements CCJSqlParserUtil.parse(sql);
  3. 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

nasodaengineer avatar Dec 27 '21 14:12 nasodaengineer

Keyword issues, which is solved in PR #1382 (pending).

manticore-projects avatar Dec 30 '21 08:12 manticore-projects