summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoas Schilling <nickvergessen@owncloud.com>2015-07-21 09:56:08 +0200
committerJoas Schilling <nickvergessen@owncloud.com>2015-07-21 15:25:48 +0200
commitf9071ed5b7449c5f0dfa99a7715a744742281cf1 (patch)
treedbde6e0b5cbe7bae65d5427b6ab76708ef335340
parentc9564503c2b6635e3e0b9262867f3c2b6e3149cb (diff)
downloadnextcloud-server-f9071ed5b7449c5f0dfa99a7715a744742281cf1.tar.gz
nextcloud-server-f9071ed5b7449c5f0dfa99a7715a744742281cf1.zip
Comment out LIMIT 0 case because of the mixed results
-rw-r--r--lib/private/db/querybuilder/querybuilder.php4
-rw-r--r--tests/lib/db/querybuilder/querybuildertest.php3
2 files changed, 6 insertions, 1 deletions
diff --git a/lib/private/db/querybuilder/querybuilder.php b/lib/private/db/querybuilder/querybuilder.php
index 4f7182aff66..38c3966d9a0 100644
--- a/lib/private/db/querybuilder/querybuilder.php
+++ b/lib/private/db/querybuilder/querybuilder.php
@@ -237,6 +237,10 @@ class QueryBuilder implements IQueryBuilder {
/**
* Sets the maximum number of results to retrieve (the "limit").
*
+ * NOTE: Setting max results to "0" will cause mixed behaviour. While most
+ * of the databases will just return an empty result set, Oracle will return
+ * all entries.
+ *
* @param integer $maxResults The maximum number of results to retrieve.
*
* @return \OCP\DB\QueryBuilder\IQueryBuilder This QueryBuilder instance.
diff --git a/tests/lib/db/querybuilder/querybuildertest.php b/tests/lib/db/querybuilder/querybuildertest.php
index 5810f2c5a20..02e516b7386 100644
--- a/tests/lib/db/querybuilder/querybuildertest.php
+++ b/tests/lib/db/querybuilder/querybuildertest.php
@@ -124,7 +124,8 @@ class QueryBuilderTest extends \Test\TestCase {
public function dataMaxResults() {
return [
[null, [99, 98, 97, 96, 95, 94, 93, 92, 91]],
- [0, []],
+ // Limit 0 gives mixed results: either all entries or none is returned
+ //[0, []],
[1, [99]],
[5, [99, 98, 97, 96, 95]],
];