Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixed #19112 - Reduce maximum parameter count test to 2001.

Test queries.ConditionalTests.tset_ticket14244 tests the
max_in_list_size() database feature (used by Oracle) to split the SQL 'IN'
clause in to buckets. MSSQL's database driver has a limit of 2100
parameters for the entire query, which fails on this test.
  • Loading branch information...
commit bf86cc2280fe6ac3a4558a7cead23315a9eed2c0 1 parent 0614e99
@manfre manfre authored
Showing with 3 additions and 2 deletions.
  1. +3 −2 tests/regressiontests/queries/tests.py
View
5 tests/regressiontests/queries/tests.py
@@ -1875,7 +1875,7 @@ def test_null_ordering_added(self):
def test_ticket14244(self):
# Test that the "in" lookup works with lists of 1000 items or more.
Number.objects.all().delete()
- numbers = range(2500)
+ numbers = range(2001)
Number.objects.bulk_create(Number(num=num) for num in numbers)
self.assertEqual(
Number.objects.filter(num__in=numbers[:1000]).count(),
@@ -1889,9 +1889,10 @@ def test_ticket14244(self):
Number.objects.filter(num__in=numbers[:2000]).count(),
2000
)
+ # Test a third 'IN' clause for Oracle
self.assertEqual(
Number.objects.filter(num__in=numbers).count(),
- 2500
+ len(numbers)
)
Please sign in to comment.
Something went wrong with that request. Please try again.