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

Index join with point get causes wrong results #23653

Closed
zyguan opened this issue Mar 30, 2021 · 3 comments · Fixed by #23678
Closed

Index join with point get causes wrong results #23653

zyguan opened this issue Mar 30, 2021 · 3 comments · Fixed by #23678
Assignees
Labels
severity/critical sig/execution SIG execution type/bug The issue is confirmed as a bug.

Comments

@zyguan
Copy link
Contributor

zyguan commented Mar 30, 2021

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

drop table if exists t1, t2;
create table t1  (c_int int, c_str varchar(40), primary key(c_str), unique key(c_int), unique key(c_str));
create table t2  (c_int int, c_str varchar(40), primary key(c_int, c_str(4)), key(c_int), unique key(c_str));
insert into t1 values (1, 'cool buck'), (2, 'reverent keller');
insert into t2 select * from t1;
select * from t1, t2 where t1.c_str = t2.c_str and t1.c_int = t2.c_int and t1.c_int = 2;

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

+-------+-----------------+-------+-----------------+
| c_int | c_str           | c_int | c_str           |
+-------+-----------------+-------+-----------------+
|     2 | reverent keller |     2 | reverent keller |
+-------+-----------------+-------+-----------------+

3. What did you see instead (Required)

Empty set

4. What is your TiDB version? (Required)

release-5.0 (09a4c57)

@zyguan zyguan added the type/bug The issue is confirmed as a bug. label Mar 30, 2021
@XuHuaiyu XuHuaiyu added the sig/execution SIG execution label Mar 30, 2021
@zimulala
Copy link
Contributor

I try these operations on v4.0.11, it got the correct result.

@ichn-hu
Copy link
Contributor

ichn-hu commented Mar 30, 2021

/assign @ichn-hu

@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/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.

6 participants