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 "Davide Giannella (JIRA)" <ji...@apache.org> on 2015/07/06 11:12:06 UTC
[jira] [Closed] (OAK-3013) SQL2 query with union, limit and offset
can return invalid results
[ https://issues.apache.org/jira/browse/OAK-3013?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Davide Giannella closed OAK-3013.
---------------------------------
Bulk close for 1.3.2
> 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)