Skip to content

Conversation

@cincuranet
Copy link
Contributor

@cincuranet cincuranet commented Dec 10, 2025

Fixes #37336.

Description

This change fixes an incorrect maximum limit for SQL Server parameters. Although usually the error states 2100, SqlClient uses sp_executesql which takes 2 parameters and hence the count needs to be adjusted.

Customer impact

Query fails to execute when collection with 2099 or 2100 parameters (exactly) is present in the query.

How found

Customer reported on 10.0.

Regression

Yes.

Testing

Tests added.

Risk

Low. Quirk added.

@cincuranet cincuranet requested a review from a team as a code owner December 10, 2025 11:43
@cincuranet cincuranet added this to the 10.0.2 milestone Dec 10, 2025
@cincuranet cincuranet requested a review from artl93 December 10, 2025 16:34
@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.

@cincuranet - I remember we took something similar recently. Is this related to a similar issue? I also note that this is customer reported - is this related to another issue? The one that's linked is opened by you. Thanks!

@cincuranet
Copy link
Contributor Author

@artl93 It was discovered when working on #37333, which was based on customer report.

@artl93
Copy link
Member

artl93 commented Dec 10, 2025

Ahh... I see it now, related to the other PR up for approval - this all relates back to #37185.

@cincuranet
Copy link
Contributor Author

Yes.

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, part of complete fixes related to #37185. Regression fix. Approved.

@cincuranet
Copy link
Contributor Author

Approved via email.

@cincuranet cincuranet merged commit d723553 into dotnet:release/10.0 Dec 10, 2025
7 checks passed
@cincuranet cincuranet deleted the params-limit-fix branch December 10, 2025 19:20
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.

SqlServerSqlNullabilityProcessor incorrectly assumes 2100 parameters as maximum

4 participants