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

The result of expression nullif is not correct #23157

Closed
lilinghai opened this issue Mar 8, 2021 · 4 comments · Fixed by #23170
Closed

The result of expression nullif is not correct #23157

lilinghai opened this issue Mar 8, 2021 · 4 comments · Fixed by #23170
Labels
severity/critical sig/execution SIG execution type/bug The issue is confirmed as a bug.

Comments

@lilinghai
Copy link
Contributor

lilinghai commented Mar 8, 2021

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

create table t(a int primary key);
insert into t values(1),(2);
select * from t where nullif(a,a) is null;

2. What did you expect to see? (Required)

+---+
| a |
+---+
| 1 |
| 2 |
+---+

3. What did you see instead (Required)

Empty set

4. What is your TiDB version? (Required)

Release Version: v4.0.0-beta.2-2287-g280d07c4a-dirty
Edition: Community
Git Commit Hash: 280d07c
Git Branch: master
UTC Build Time: 2021-03-05 11:03:56
GoVersion: go1.13
Race Enabled: false
TiKV Min Version: v3.0.0-60965b006877ca7234adaced7890d7b029ed1306
Check Table Before Drop: false

@lilinghai lilinghai added the type/bug The issue is confirmed as a bug. label Mar 8, 2021
@lilinghai lilinghai changed the title The expression nullif The result of expression nullif is not correct Mar 8, 2021
@lilinghai
Copy link
Contributor Author

The result of statement select * from t where if(a,null,a) is null; if also not correct.

@wjhuang2016
Copy link
Member

Relate to #23102, @guo-shaoge Could you take a look?

@lilinghai lilinghai added the sig/execution SIG execution label Mar 8, 2021
@guo-shaoge
Copy link
Collaborator

guo-shaoge commented Mar 8, 2021

Relate to #23102, @guo-shaoge Could you take a look?

Looks like same reason as #23102. Trying to fix it.

@seiya-annie seiya-annie added duplicate Issues or pull requests already exists. severity/critical and removed duplicate Issues or pull requests already exists. severity/major labels Mar 9, 2021
@ti-srebot
Copy link
Contributor

ti-srebot commented Mar 9, 2021

Please edit this comment or add a new comment to complete the following information

Not a bug

  1. Remove the 'type/bug' label
  2. Add notes to indicate why it is not a bug

Duplicate bug

  1. Add the 'type/duplicate' label
  2. Add the link to the original bug

Bug

Note: Make Sure that 'component', and 'severity' labels are added
Example for how to fill out the template: #20100

1. Root Cause Analysis (RCA) (optional)

2. Symptom (optional)

3. All Trigger Conditions (optional)

4. Workaround (optional)

5. Affected versions

[4.0.0:v4.0.11],master

6. Fixed versions

master

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
severity/critical sig/execution SIG execution type/bug The issue is confirmed as a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants