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 "Teodor Rosu (JIRA)" <ji...@apache.org> on 2015/06/22 10:49:00 UTC
[jira] [Created] (OAK-3013) SQL2 query with union, limit and offset
can return invalid results
Teodor Rosu created OAK-3013:
--------------------------------
Summary: 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
Fix For: 1.3.1
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)