#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: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by shaib):
Replying to [comment:4 aaugustin]:
> I'm stuck writing tests for this.
>
> The problem only occurs when SQLITE_MAX_VARIABLE_NUMBER has been changed
to be greated than SQLITE_MAX_COLUMN, which isn't the default, and there's
no way to introspect these values -- the Python bindings don't expose the
`get_limit` API of sqlite.
It is enough, I think, to try to generate a query with 2001 variables and
see if it works. That may be less accurate for the reasons, but it checks
the symptoms, and doesn't need private APIs. `cursor.execute('select %s' +
sum(2000*[' + %s']), 2001*[1])` or something like that.
--
Ticket URL: <https://code.djangoproject.com/ticket/26063#comment:7>
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.88e7387566ae0ec84fcc765ea06a6a0a%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.