Closed
Description
Describe the bug
Version 4.3 of JSQLParser seems to introduce a regression in the way LIKE escape expressions are parsed. I assume caused by #420 but did not really look at the code in details.
To Reproduce
Steps to reproduce the behavior:
Given a code which looks like
Select select = (Select) CCJSqlParserUtil.parse("select doc.fullName from XWikiDocument doc where doc.fullName like :fullName escape '/' and doc.author like :author escape '!'");
PlainSelect plainSelect = (PlainSelect) select.getSelectBody();
Expression where = plainSelect.getWhere();
I end up with where
being a single LikeExpression
in which the escape expression includes the whole '/' AND doc.author LIKE :author ESCAPE '!'
part.
Expected behavior
In 4.2 the where
variable is a AndExpression
containing 2 LikeExpression
.
System
- Java Version: 1.8.0_302
- JSqlParser version: 4.3
Metadata
Metadata
Assignees
Labels
No labels