Skip to content

Collation used by IN clause is not correct.  #30486

@wjhuang2016

Description

@wjhuang2016

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

create table t(a char(10), b char(10));
insert into t values ("a", "a");
insert into t values ("A", "A");
select * from t where a in ('b' collate utf8mb4_general_ci, 'A', 3);

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

mysql> select * from t where a in ('b' collate utf8mb4_general_ci, 'A', 3);
+------+------+
| a    | b    |
+------+------+
| a    | a    |
| A    | A    |
+------+------+
2 rows in set (0.00 sec)

3. What did you see instead (Required)

mysql> select * from t where a in ('b' collate utf8mb4_general_ci, 'A', 3);
+------+------+
| a    | b    |
+------+------+
| A    | A    |
+------+------+
1 row in set, 1 warning (0.01 sec)

4. What is your TiDB version? (Required)

master

Metadata

Metadata

Assignees

Labels

affects-4.0This bug affects 4.0.x versions.affects-5.0This bug affects 5.0.x versions.affects-5.1This bug affects 5.1.x versions.affects-5.2This bug affects 5.2.x versions.affects-5.3This bug affects 5.3.x versions.severity/majorsig/sql-infraSIG: SQL Infratype/bugThe issue is confirmed as a bug.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions