Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

3.1.11: Add missing Ordinal to parameter StartsWith comparison #23052

Merged
merged 1 commit into from
Nov 10, 2020

Conversation

roji
Copy link
Member

@roji roji commented Oct 19, 2020

Original PR merged for 5.0: #18873

This backports the fix for #18831 to 3.1.

Description

A missing StringComparison.Ordinal causes a string comparison to be culture-sensitive, and incorrectly omits the @ placeholder character for parameter names when using the Thai culture.

Customer Impact

EF Core 3.1 is largely unusable when using the Thai culture, without a specific non-trivial workaround (replace the ISqlGenerationHelper service).

How found

Reported three times: #18831, #23032, npgsql/efcore.pg#1508

Test coverage

#22625 added the new code analysis support coming with Roslyn for 5.0, including checks for StringComparison. Using the overload without StringComparison now generates a compilation error.

Regression?

Not within 3.1.x.

Risk

Extremely low - the change adds a missing StringComparison.Ordinal in a single call site.

@roji roji requested a review from a team October 19, 2020 21:04
@roji roji changed the title Add missing Ordinal to parameter StartsWith comparison 3.1.x: Add missing Ordinal to parameter StartsWith comparison Oct 19, 2020
@ajcvickers ajcvickers added this to the 3.1.x milestone Oct 19, 2020
@ajcvickers
Copy link
Member

@roji Approved for 3.1.11 by Tactics. Please wait until the branch is open for 3.1.11 before merging.

@ajcvickers ajcvickers removed this from the 3.1.x milestone Oct 20, 2020
@ajcvickers ajcvickers changed the title 3.1.x: Add missing Ordinal to parameter StartsWith comparison 3.1.11: Add missing Ordinal to parameter StartsWith comparison Oct 23, 2020
@leecow leecow added this to the 3.1.11 milestone Nov 5, 2020
@wtgodbe wtgodbe merged commit 9790b56 into release/3.1 Nov 10, 2020
@wtgodbe wtgodbe deleted the ParameterNameOrdinalComparison branch November 10, 2020 22:54
@roji roji removed the blocked label Nov 11, 2020
@ajcvickers ajcvickers removed this from the 3.1.11 milestone Dec 11, 2020
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.

Specify CultureInfo in Controller make query not working
4 participants