#26063: Regression in Django 1.9: SQLite can no longer handle more than 2000
values
in a "foo__in" filter
-------------------------------------+-------------------------------------
Reporter: rhertzog | Owner: aaugustin
Type: Bug | Status: assigned
Component: Database layer | Version: 1.9
(models, ORM) |
Severity: Release blocker | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by rhertzog):
Found it:
{{{
diff --git a/django/db/backends/sqlite3/operations.py
b/django/db/backends/sqlite3/operations.py
index 0d6f084..f56f72e 100644
--- a/django/db/backends/sqlite3/operations.py
+++ b/django/db/backends/sqlite3/operations.py
@@ -114,7 +114,7 @@ class DatabaseOperations(BaseDatabaseOperations):
# limits are in effect and split the work in batches if needed.
BATCH_SIZE = 999
if len(params) > BATCH_SIZE:
- results = []
+ results = tuple()
for index in range(0, len(params), BATCH_SIZE):
chunk = params[index:index + BATCH_SIZE]
results +=
self._quote_params_for_last_executed_query(chunk)
}}}
But I still don't understand why I see only 1024 "%s"... and why it
doesn't fail even with the above fix.
--
Ticket URL: <https://code.djangoproject.com/ticket/26063#comment:23>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/066.bf15f6e59ba01379d76fcaacab32651f%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.