Skip to content

Conversation

@ksusac
Copy link

@ksusac ksusac commented Nov 13, 2025

… 2070 and 2100

in relation to: #37151

@ksusac ksusac requested a review from a team as a code owner November 13, 2025 09:55
@ksusac
Copy link
Author

ksusac commented Nov 13, 2025

Just this change makes it possible to get over 2100 parameters as TryHandleOverLimitParameters seems to be executed before adding the padding.

I am not sure if that is the case since result of padding will never be over 2100

 protected override int CalculateParameterBucketSize(int count, RelationalTypeMapping elementTypeMapping)
        => count switch
        {
            <= 5 => 1, 
            <= 150 => 10,
            <= 750 => 50,
            <= 2000 => 100, //will padd to max 2000
            <= 2070 => 10, // will padd to max 2070
            <= MaxParameterCount => 1, // will not padd
            _ => 200,
        };

@stevendarby
Copy link
Contributor

Nice one. I think it needs some tests to cover what was previously missed

@stevendarby
Copy link
Contributor

@cincuranet / @roji this seems like one to get servicing approval for

@cincuranet
Copy link
Contributor

@roji I added tests.
@ksusac Can you check the CLA above?

@cincuranet
Copy link
Contributor

Because we want to include this in 10.0.1, I'm closing this in favor of #37198/#37197.

@cincuranet cincuranet closed this Nov 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

EF Core 10 throws System.DivideByZeroException if number of parameters are between 2070 and 2100

3 participants