[DBAL-478] [GH-295] Fix ModifyLimitQueryTest Created: 30/Mar/13  Updated: 01/Sep/13  Resolved: 01/Apr/13

Status: Resolved
Project: Doctrine DBAL
Component/s: None
Affects Version/s: None
Fix Version/s: 2.4
Security Level: All

Type: Bug Priority: Major
Reporter: Benjamin Eberlei Assignee: Benjamin Eberlei
Resolution: Fixed Votes: 0
Labels: None


This issue is created automatically through a Github pull request on behalf of deeky666:

Url: https://github.com/doctrine/dbal/pull/295


The functional <code>ModifyLimitQueryTest</code> makes false expectations about the query results. <code>LIMIT</code> queries without <code>ORDER BY</code> clause return non-deterministic results, therefore the test cannot make any expectations about which values are returned and in which order. You can only expect a certain number of results.
The test might still work on platforms like mysql when you assume results to be in an ascending order, because the database might put the results of a non-deterministic query in an ascending order by default. Still this is not reliable and not all vendors do that.
This PR changes the tests to have an ordered, deterministic results by default to have more reliable expectations. Also one test about a non-deterministic query was added, which just asserts the number of results returned.

Comment by Benjamin Eberlei [ 01/Apr/13 ]

A related Github Pull-Request [GH-295] was closed

Comment by Doctrine Bot [ 01/Sep/13 ]

A related Github Pull-Request [GH-295] was closed:

Generated at Wed Oct 07 12:00:28 EDT 2015 using JIRA 6.4.10#64025-sha1:5b8b74079161cd76a20ab66dda52747ee6701bd6.