Skip to content

select database() #1450

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
nasodaengineer opened this issue Dec 27, 2021 · 1 comment · Fixed by #1382
Closed

select database() #1450

nasodaengineer opened this issue Dec 27, 2021 · 1 comment · Fixed by #1382

Comments

@nasodaengineer
Copy link

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
@manticore-projects
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants