-
Type: Bug
-
Status: Resolved
-
Priority: Minor
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: 5.6.0-HF08, 5.7.1
-
Component/s: Query & PageProvider
-
Tags:
-
Impact type:API change
-
Upgrade notes:
A string literal with a backslash as last character cannot be parsed. This should work but does not:
SELECT * FROM Document WHERE dc:title='foo\\'
Which has double escaping from Java code:
session.query("SELECT * FROM Document WHERE dc:title='foo\\\\'")
Failure:
org.nuxeo.ecm.core.query.QueryParseException: org.nuxeo.ecm.core.query.QueryParseException: Syntax error: Invalid token <null> at offset -1 in query: SELECT * FROM Document WHERE dc:title='foo\\' at org.nuxeo.ecm.core.query.sql.SQLQueryParser.parse(SQLQueryParser.java:51) Caused by: org.nuxeo.ecm.core.query.QueryParseException: org.nuxeo.ecm.core.query.QueryParseException: Syntax error: Invalid token <null> at offset -1 at org.nuxeo.ecm.core.query.sql.SQLQueryParser.parse(SQLQueryParser.java:41) at org.nuxeo.ecm.core.query.sql.SQLQueryParser.parse(SQLQueryParser.java:47) ... 23 more Caused by: org.nuxeo.ecm.core.query.QueryParseException: Syntax error: Invalid token <null> at offset -1 at org.nuxeo.ecm.core.query.sql.parser.parser.parseFailed(parser.java:466) at org.nuxeo.ecm.core.query.sql.parser.parser.unrecovered_syntax_error(parser.java:457) at java_cup.runtime.lr_parser.parse(lr_parser.java:601) at org.nuxeo.ecm.core.query.sql.SQLQueryParser.parse(SQLQueryParser.java:39) ... 24 more