SetFirstResult and SetMaxResults do not work correctly on Oracle (ODP.NET)

Description

Using ODP.NET, create an IQuery and invoke .SetFirstResult(3) and .SetMaxResults(5). This should fetch 8 records, then skip the first 3 records, and then take the next 5 records. Instead, it fetches only 5 records, then skips the first 3, and then returns only 2. The resulting query looks like this:

select col1, col2, ...
from (
select col1, col2, ...
order by col1, col2, ...
)
where rownum <=5

The where-clause should compare to 8, not 5.

This worked fine in NHib 3.1.0.

I would create a unit test, but this is an Oracle-specific bug.

Environment

None

Assignee

Richard Brown

Reporter

Brian Berns

Labels

None

Components

Fix versions

Affects versions

Priority

Critical
Configure