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 using the plan of TableDual with the statement of NULL-safe equal is wrong #24477

Closed
lilinghai opened this issue May 8, 2021 · 2 comments · Fixed by #24596
Closed
Assignees
Labels
severity/critical sig/planner SIG: Planner type/bug This issue is a bug.

Comments

@lilinghai
Copy link
Contributor

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

create table t2(a int,b year,key(b));
insert into t values(null,null);
select * from t where b <=> null;

The plan is

+-------------+---------+------+---------------+---------------+
| id          | estRows | task | access object | operator info |
+-------------+---------+------+---------------+---------------+
| TableDual_5 | 0.00    | root |               | rows:0        |
+-------------+---------+------+---------------+---------------+

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

+------+------+
| a    | b    |
+------+------+
| NULL | NULL |
+------+------+

3. What did you see instead (Required)

Empty set

4. What is your TiDB version? (Required)

Release Version: v4.0.0-beta.2-2807-g289dcfefd-dirty
Edition: Community
Git Commit Hash: 289dcfe
Git Branch: master
UTC Build Time: 2021-05-06 15:11:16
GoVersion: go1.13
Race Enabled: false
TiKV Min Version: v3.0.0-60965b006877ca7234adaced7890d7b029ed1306
Check Table Before Drop: false

@lilinghai lilinghai added type/bug This issue is a bug. sig/planner SIG: Planner severity/critical labels May 8, 2021
@sylzd sylzd removed their assignment May 10, 2021
@sylzd
Copy link
Contributor

sylzd commented May 10, 2021

/assign

@ti-srebot
Copy link
Contributor

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

6. Fixed versions

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

Successfully merging a pull request may close this issue.

3 participants