[
https://issues.apache.org/jira/browse/OAK-3013?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Amit Jain reassigned OAK-3013:
------------------------------
Assignee: Amit Jain
> SQL2 query with union, limit and offset can return invalid results
> ------------------------------------------------------------------
>
> Key: OAK-3013
> URL: https://issues.apache.org/jira/browse/OAK-3013
> Project: Jackrabbit Oak
> Issue Type: Bug
> Components: query
> Reporter: Teodor Rosu
> Assignee: Amit Jain
> Fix For: 1.3.2
>
> Attachments: OAK-3013-fix.patch, OAK-3013-test.patch
>
>
> when using order, limit and offset and a SQL2 query that contains an union of
> two subqueries that have common results can return invalid results
> Example: assuming content tree /test/a/b/c/d/e exists
> {code:sql}
> SELECT [jcr:path] FROM [nt:base] AS a WHERE ISDESCENDANTNODE(a, '/test')
> UNION SELECT [jcr:path] FROM [nt:base] AS a WHERE ISDESCENDANTNODE(a,
> '/test')" ORDER BY [jcr:path]
> {code}
> with limit=3 and offset 2 returns only one row ( instead of 3 )
> the correct result set is
> {noformat}
> /test/a/b/c
> /test/a/b/c/d
> /test/a/b/c/d/e
> {noformat}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)