Skip to content

Conversation

@cincuranet
Copy link
Contributor

@cincuranet cincuranet commented Dec 8, 2025

Backport of #37234.
Fixes #37185.

Description

EF 10 changed the default translation for parameterized collections from single parameter and JSON function to multiple parameters. To not go over the limit of parameters (2100) on SQL Server we introduced logic that counts parameters. Unfortunately this logic was not taking into account total number of parameters, but only local sums.

Customer impact

Query fails to execute because of >2100 parameters in query.

How found

Customer reported on 10.0.

Regression

Yes.

Testing

Tests added.

Risk

Low. Quirk added.

@cincuranet cincuranet force-pushed the multiple-contains-10 branch from cf09894 to 2f4f408 Compare December 8, 2025 08:50
@cincuranet cincuranet marked this pull request as ready for review December 8, 2025 08:51
@cincuranet cincuranet requested a review from a team as a code owner December 8, 2025 08:51
@cincuranet cincuranet added this to the 10.0.2 milestone Dec 8, 2025
@cincuranet cincuranet force-pushed the multiple-contains-10 branch from 2f4f408 to 31df649 Compare December 8, 2025 09:03
@cincuranet cincuranet requested a review from artl93 December 8, 2025 12:46
@cincuranet
Copy link
Contributor Author

cc @artl93

Copy link
Member

@artl93 artl93 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Customer reported regression. Approved.

@cincuranet
Copy link
Contributor Author

Approved via email.

@cincuranet cincuranet merged commit 126e6a2 into dotnet:release/10.0 Dec 9, 2025
7 checks passed
@cincuranet cincuranet deleted the multiple-contains-10 branch December 9, 2025 07:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Contains fails to fallback to OPENJSON with many parameters in complex queries

4 participants