GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — [BUG] JSQLParser 5.0: RDBMS : SQL was automatically intercepted · Issue #2193 · JSQLParser/JSqlParser

[BUG] JSQLParser 5.0: RDBMS : SQL was automatically intercepted #2193

New issue
Copy link
New issue
Copy link
Closed as duplicate
Closed as duplicate
[BUG] JSQLParser 5.0: RDBMS : SQL was automatically intercepted#2193
Copy link

Description

@gv098
gv098
opened on Mar 19, 2025
Issue body actions

Always check against the Latest SNAPSHOT of JSQLParser and the Syntax Diagram

Failing SQL Feature:

SQL was automatically intercepted

SQL Example:

select * from user
         WHERE  userId = ?







                and (
                userHead like '%' || ? || '%'
                or itemName like '%' || ? || '%'
                or itemCode like '%' || ? || '%'
                )

Software Information:

  • JSqlParser 5.0
  • Database MySQL

Tips:

When there are more than 2 consecutive /n, the SQL will be automatically truncated. I use System. out. println (statement); printed the results

My Demo is

String sql = "select * from user\n" +
                "         WHERE  userId = ?\n" +
                "\n" +
                "\n" +
                "\n" +
                "\n" +
                "\n" +
                "\n" +
                "\n" +
                "                and (\n" +
                "                userHead like '%' || ? || '%'\n" +
                "                or itemName like '%' || ? || '%'\n" +
                "                or itemCode like '%' || ? || '%'\n" +
                "                )";
        CCJSqlParser parser = CCJSqlParserUtil.newParser(sql);
        parser.withSquareBracketQuotation(true);
        try {
            Statement statement = parser.Statement();
            System.out.println(statement);
        }catch (ParseException e) {
            throw new RuntimeException(e);
        }

Activity

  1. manticore-projects commented on Mar 19, 2025

    @manticore-projects
    manticore-projects
    on Mar 19, 2025
    Contributor
    More actions

    Duplicate #1988

    2 empty lines \n\n terminate a statement.

  2. manticore-projects
    closed this as a duplicateof Encountered unexpected token: "\n\n\n" <ST_SEMICOLON> #1988 on Mar 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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

      You are visitor 01402503 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.