Skip to content

select database() #1450

Closed
Closed
@nasodaengineer

Description

@nasodaengineer

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions