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

can't use collate clause for enum or set #31637

Closed
wjhuang2016 opened this issue Jan 13, 2022 · 2 comments · Fixed by #35684
Closed

can't use collate clause for enum or set #31637

wjhuang2016 opened this issue Jan 13, 2022 · 2 comments · Fixed by #35684
Assignees
Labels
affects-4.0 This bug affects 4.0.x versions. affects-5.0 This bug affects 5.0.x versions. affects-5.1 This bug affects 5.1.x versions. affects-5.2 This bug affects 5.2.x versions. affects-5.3 This bug affects 5.3.x versions. affects-5.4 This bug affects 5.4.x versions. affects-6.0 affects-6.1 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 tt(a char(10), b enum('a', 'B', 'c'), c set('a', 'B', 'c'), d json) collate utf8mb4_general_ci;
insert into tt values ("a", "a", "a", JSON_OBJECT("a", "a"));
insert into tt values ("A", "A", "A", JSON_OBJECT("A", "A"));
insert into tt values ("b", "b", "b", JSON_OBJECT("b", "b"));
insert into tt values ("B", "B", "B", JSON_OBJECT("B", "B"));
insert into tt values ("c", "c", "c", JSON_OBJECT("c", "c"));
insert into tt values ("C", "C", "C", JSON_OBJECT("C", "C"));
select min(b collate utf8mb4_bin) from tt;

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

No error

3. What did you see instead (Required)

panic

4. What is your TiDB version? (Required)

master

@wjhuang2016 wjhuang2016 added type/bug The issue is confirmed as a bug. affects-4.0 This bug affects 4.0.x versions. affects-5.0 This bug affects 5.0.x versions. affects-5.1 This bug affects 5.1.x versions. affects-5.2 This bug affects 5.2.x versions. affects-5.3 This bug affects 5.3.x versions. affects-5.4 This bug affects 5.4.x versions. severity/major sig/planner SIG: Planner labels Jan 13, 2022
@yudongusa
Copy link

@wjhuang2016 since SQL team has been working collation related refactor and improvement, assign the collation related issues to sig/sql-infra for now.

@yudongusa yudongusa added sig/sql-infra SIG: SQL Infra and removed sig/planner SIG: Planner labels Jan 13, 2022
@CbcWestwolf
Copy link
Member

/assign wjhuang2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects-4.0 This bug affects 4.0.x versions. affects-5.0 This bug affects 5.0.x versions. affects-5.1 This bug affects 5.1.x versions. affects-5.2 This bug affects 5.2.x versions. affects-5.3 This bug affects 5.3.x versions. affects-5.4 This bug affects 5.4.x versions. affects-6.0 affects-6.1 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