-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Relational: IS (NOT) NULL requires parenthesis when not in left side of an equality #23990
Labels
area-query
closed-fixed
The issue has been fixed and is/will be included in the release indicated by the issue milestone.
customer-reported
type-bug
Milestone
Comments
5 tasks
maumar
added a commit
that referenced
this issue
Aug 26, 2021
…ot in left side of an equality We were generating incorrect sql when comparing bool value to a nullableBool.HasValue. Fix is to add parentheses to the right side when we detect the pattern: - left side doesn't already have parentheses - right side is a IS NULL / IS NOT NULL check - argument to that null check is bool Note: this is not really an issue for sql server because of search conditions, but sqlite would yield incorrect data for those queries. Fixes #23990
maumar
added
the
closed-fixed
The issue has been fixed and is/will be included in the release indicated by the issue milestone.
label
Aug 26, 2021
maumar
added a commit
that referenced
this issue
Aug 26, 2021
…ot in left side of an equality We were generating incorrect sql for some cases involving nullability check on nullable bool. E.g. true = someBool IS NULL. Instead we need true = (someBool IS NULL) Note: this is not really an issue for sql server because of search conditions, but sqlite would yield incorrect data for those queries. Fixes #23990
This was referenced Nov 12, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
area-query
closed-fixed
The issue has been fixed and is/will be included in the release indicated by the issue milestone.
customer-reported
type-bug
Details PomeloFoundation/Pomelo.EntityFrameworkCore.MySql#1309
Mainly any operator which is assigned to result of SqlUnaryExpression (representing only above operators) requires brackets to specify that IS NULL should be applied first. It works by chance for most basic case of
a IS NULL == true
The text was updated successfully, but these errors were encountered: