You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Bug: findMany() with two large in filters with arrays of 32767 items each fails with Assertion violation, too many bind variables in prepared statement #21802
This results in an error with code: "P2035" and message:
Assertion violation on the database: `too many bind variables in prepared statement, expected maximum of 32767, received 65534`
This is a bug, as we would expect the corresponding SQL query to be chunked into smaller SELECT queries using at most 32767 parameters each, and with a combined result set matching:
changed the title [-]bug: `findMany` with two large `in` filters with arrays of `32767` items each fails with `Assertion violation`, `too many bind variables in prepared statement`[/-][+]bug: `findMany()` with two large `in` filters with arrays of `32767` items each fails with `Assertion violation`, `too many bind variables in prepared statement`[/+]on Mar 27, 2024
changed the title [-]bug: `findMany()` with two large `in` filters with arrays of `32767` items each fails with `Assertion violation`, `too many bind variables in prepared statement`[/-][+]Bug: `findMany()` with two large `in` filters with arrays of `32767` items each fails with `Assertion violation`, `too many bind variables in prepared statement`[/+]on Mar 27, 2024
hey litellm maintainer here, we're going to look at taking down this class of bug with a lint rule to remove unbounded IN queries and then have anywhere that would do this go through the same unified share logic for trying the initial query then chunking it for posterity. wip pr linked
Activity
[-]bug: `findMany` with two large `in` filters with arrays of `32767` items each fails with `Assertion violation`, `too many bind variables in prepared statement`[/-][+]bug: `findMany()` with two large `in` filters with arrays of `32767` items each fails with `Assertion violation`, `too many bind variables in prepared statement`[/+][-]bug: `findMany()` with two large `in` filters with arrays of `32767` items each fails with `Assertion violation`, `too many bind variables in prepared statement`[/-][+]Bug: `findMany()` with two large `in` filters with arrays of `32767` items each fails with `Assertion violation`, `too many bind variables in prepared statement`[/+]jkomyno commentedon Jul 15, 2024
Linked issue: #23957
peterHakio commentedon Dec 17, 2024
What is the progress on this bug?
Kila14 commentedon Jul 9, 2025
Prisma version 6.11.1 still bug exist
ryan-crabbe-berri commentedon Sep 23, 2026
hey litellm maintainer here, we're going to look at taking down this class of bug with a lint rule to remove unbounded
INqueries and then have anywhere that would do this go through the same unified share logic for trying the initial query then chunking it for posterity. wip pr linked