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

enum type query result is incorrect while using xxx_ci collation #24530

Closed
aytrack opened this issue May 10, 2021 · 2 comments · Fixed by #24661
Closed

enum type query result is incorrect while using xxx_ci collation #24530

aytrack opened this issue May 10, 2021 · 2 comments · Fixed by #24661
Assignees
Labels
severity/critical sig/execution SIG execution type/bug The issue is confirmed as a bug.

Comments

@aytrack
Copy link
Contributor

aytrack commented May 10, 2021

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

CREATE TABLE `PK_MULTI_COL2001STROBJSTROBJ` (  `COL2` enum('A','B','C','D') COLLATE utf8_general_ci NOT NULL,  `COL3` decimal(37,6) NOT NULL,  PRIMARY KEY (`COL2`,`COL3`) /*T![clustered_index] CLUSTERED */) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

insert into `PK_MULTI_COL2001STROBJSTROBJ` values ('A', 10), ('A', 11), ('B', 20);
select * from `PK_MULTI_COL2001STROBJSTROBJ` where col2 = 'a';
select * from `PK_MULTI_COL2001STROBJSTROBJ` where col2 = 'B';

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

MySQL > select * from `PK_MULTI_COL2001STROBJSTROBJ` where col2 = 'a';
+------+-----------+
| COL2 | COL3      |
+------+-----------+
| A    | 10.000000 |
| A    | 11.000000 |
+------+-----------+

3. What did you see instead (Required)

MySQL r> select * from `PK_MULTI_COL2001STROBJSTROBJ` where col2 = 'a';
+------+------+
| COL2 | COL3 |
+------+------+

4. What is your TiDB version? (Required)

tidb_version() | Release Version: v4.0.0-beta.2-2791-g207ce344c-dirty
Edition: Community
Git Commit Hash: 207ce344cbb044ffb1b2681f1ba320a154979f6d
Git Branch: master
UTC Build Time: 2021-05-02 15:24:42
GoVersion: go1.13
Race Enabled: false
TiKV Min Version: v3.0.0-60965b006877ca7234adaced7890d7b029ed1306
Check Table Before Drop: false
@aytrack aytrack added type/bug The issue is confirmed as a bug. sig/execution SIG execution severity/critical labels May 10, 2021
@wshwsh12
Copy link
Contributor

/assign @lzmhhh123

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

4 participants