mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
[1.5.x] Fixed #19351 -- SQLite bulk_insert of more than 500 single-field objs
Backpatch of 0a0a0d66b3
This commit is contained in:
@@ -102,6 +102,14 @@ class BulkCreateTests(TestCase):
|
||||
101)
|
||||
self.assertEqual(TwoFields.objects.filter(f2__gte=901).count(), 101)
|
||||
|
||||
@skipUnlessDBFeature('has_bulk_insert')
|
||||
def test_large_single_field_batch(self):
|
||||
# SQLite had a problem with more than 500 UNIONed selects in single
|
||||
# query.
|
||||
Restaurant.objects.bulk_create([
|
||||
Restaurant() for i in range(0, 501)
|
||||
])
|
||||
|
||||
@skipUnlessDBFeature('has_bulk_insert')
|
||||
def test_large_batch_efficiency(self):
|
||||
with override_settings(DEBUG=True):
|
||||
|
||||
Reference in New Issue
Block a user