﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
13309	Queryset.delete() only works if there are less than CHUNKSIZE models in the result.	craig.kimerer@…	nobody	"It seems revision [12912] broke deleting a whole queryset when the queryset.count > CHUNK_SIZE.  I should note I am using MySQL and haven't tried on any other backends.

Consider the following example:

{{{
for x in range(300):
    track = Foo.objects.create(foo='bar')
Foo.objects.all().delete()
print Foo.objects.all().count()
}}}

The print displays 200 instead of 0.  While stepping through the code (django/db/models/query:438)


{{{
for i, obj in izip(xrange(CHUNK_SIZE), del_query):
                print i, obj.id
                obj._collect_sub_objects(seen_objs)
}}}

Is printing out
{{{
0 1
1 2
2 3
...
99 100

0 None
1 None
...
99 None
}}}"		closed	Database layer (models, ORM)	dev		fixed			Unreviewed	0	0	0	0	0	0
