Skip to content

在sql加入注释符号,解析error #908

@542928492

Description

@542928492

Describe the bug
加入一些sql与注释相关的内容不能运行解析,比如符号 #

To Reproduce
Steps to reproduce the behavior:

  1. Example SQL (this sql navicate can run success,JSqlParser can‘not parser)

String sql = " select * from t_aim_sys_user where id = '11' #limit 3";

  1. Parsing this SQL using JSqlParser with this statements

Statement statement = CCJSqlParserUtil.parse(sql);

  1. Exception
    Caused by: net.sf.jsqlparser.parser.ParseException: Encountered unexpected token: "#limit" <S_IDENTIFIER>

Expected behavior
A clear and concise description of what you expected to happen.

System

  • Database you are using
    mysql 5.6
  • Java Version
    1.8
  • JSqlParser version
    3.1

Metadata

Metadata

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions