1
0
mirror of https://github.com/django/django.git synced 2025-10-23 21:59:11 +00:00

Fixed #7411 -- worked around some possible transaction conflicts in SQLite.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@7926 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Malcolm Tredinnick
2008-07-15 18:47:32 +00:00
parent e867c5a0cc
commit 3b37c8151a
4 changed files with 26 additions and 4 deletions

View File

@@ -6,14 +6,14 @@ import datetime
import pickle
from django.db import models
from django.db.models.query import Q
from django.db.models.query import Q, ITER_CHUNK_SIZE
# Python 2.3 doesn't have sorted()
try:
sorted
except NameError:
from django.utils.itercompat import sorted
class Tag(models.Model):
name = models.CharField(max_length=10)
parent = models.ForeignKey('self', blank=True, null=True,
@@ -820,5 +820,15 @@ Bug #7698 -- People like to slice with '0' as the high-water mark.
>>> Item.objects.all()[0:0]
[]
Bug #7411 - saving to db must work even with partially read result set in
another cursor.
>>> for num in range(2 * ITER_CHUNK_SIZE + 1):
... _ = Number.objects.create(num=num)
>>> for i, obj in enumerate(Number.objects.all()):
... obj.save()
... if i > 10: break
"""}