You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-issues@jackrabbit.apache.org by "Thomas Mueller (JIRA)" <ji...@apache.org> on 2015/01/21 10:52:34 UTC

[jira] [Commented] (OAK-2427) XPath to SQL-2 conversion fails due to escaping error

    [ https://issues.apache.org/jira/browse/OAK-2427?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14285426#comment-14285426 ] 

Thomas Mueller commented on OAK-2427:
-------------------------------------

The root cause was code duplication (forgot to update one place). So, only xpath queries that contain "or" are affected (those that are converted to "union").

I got rid of the code duplication.

> XPath to SQL-2 conversion fails due to escaping error
> -----------------------------------------------------
>
>                 Key: OAK-2427
>                 URL: https://issues.apache.org/jira/browse/OAK-2427
>             Project: Jackrabbit Oak
>          Issue Type: Bug
>          Components: query
>    Affects Versions: 1.1.4
>            Reporter: Thomas Mueller
>            Assignee: Thomas Mueller
>             Fix For: 1.1.6
>
>
> The problem is that the comment is not properly escaped (a C-style comment), so that "*/" in the XPath query accidentally ends the comment in the SQL-2 query.
> The following query can't be converted to SQL-2, because it contains "*/":
> {noformat}
> /jcr:root/etc//*[@type = 'product' 
> and ((@size = 'M' or */@size= 'M' or */*/@size = 'M' 
> or */*/*/@size = 'M' or */*/*/*/@size = 'M' or */*/*/*/*/@size = 'M'))]
> {noformat}
> I think this was introduced by OAK-2354 
> http://svn.apache.org/viewvc?view=revision&amp;revision=1645616



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)