DBAL-859: OraclePlatform: rownum should not be used directly in WHERE clausule #2096

Closed
doctrinebot opened this Issue Feb 12, 2014 · 3 comments

2 participants

@doctrinebot

Jira issue originally created by user mariusz.jaskolka:

At 90% of cases when we use ROWNUM in WHERE clause it will work correctly, but sometimes not. I noticed that that is why Doctrine sometimes works incorrect.
Source:
http://www.oracle.com/technetwork/issue-archive/2006/06-sep/o56asktom-086197.html

Quote:
"That is why a query in the following form is almost certainly an error:

select *
from emp
where ROWNUM <= 5
order by sal desc;
"

I prepared modified OraclePlatform.php with solution (attachment) - rownum is being compared after all operations.

@doctrinebot

Comment created by @deeky666:

[~mariusz.jaskolka] can you please provide an example where the current implementation fails? We have functional tests LIMIT queries in DBAL but they run fine on Oracle. I need more information to be able to reproduce this problem.

@doctrinebot

Comment created by @ocramius:

This issue is missing a valid test case - marking as incomplete.

@doctrinebot

Issue was closed with resolution "Incomplete"

@doctrinebot doctrinebot added the Bug label Dec 7, 2015
@Ocramius Ocramius was assigned by doctrinebot Dec 7, 2015
@doctrinebot doctrinebot closed this Dec 7, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment