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

constant propagation is wrong used for some collation. #22665

Closed
wjhuang2016 opened this issue Feb 2, 2021 · 1 comment · Fixed by #22666
Closed

constant propagation is wrong used for some collation. #22665

wjhuang2016 opened this issue Feb 2, 2021 · 1 comment · Fixed by #22666
Assignees
Labels
severity/major sig/sql-infra SIG: SQL Infra type/bug The issue is confirmed as a bug.

Comments

@wjhuang2016
Copy link
Member

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

create table t1(a char(10) collate utf8mb4_general_ci, index (a));
create table t2(a char(10) collate utf8_bin, index (a));
insert into t1 values ("a");
insert into t2 values ("A");
set names utf8 collate utf8_general_ci;
select * from t1, t2 where t1.a=t2.a and t1.a= "a";

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

mysql> select * from t1, t2 where t1.a=t2.a and t1.a= "a";
+------+------+
| a    | a    |
+------+------+
| a    | A    |
+------+------+
1 row in set (0.01 sec)

3. What did you see instead (Required)

mysql> select * from t1, t2 where t1.a=t2.a and t1.a= "a";
Empty set (0.00 sec)

4. What is your TiDB version? (Required)

4.0 - 4.0.10, 5.0 rc, master

@ti-srebot
Copy link
Contributor

ti-srebot commented Feb 24, 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

[v4.0.0:4.0.11],[5.0.0-rc]

6. Fixed versions

master

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
severity/major sig/sql-infra SIG: SQL Infra type/bug The issue is confirmed as a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants