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

select using collation get wrong result #18662

Closed
xiongjiwei opened this issue Jul 17, 2020 · 1 comment · Fixed by #18665
Closed

select using collation get wrong result #18662

xiongjiwei opened this issue Jul 17, 2020 · 1 comment · Fixed by #18665
Labels
component/charset type/bug The issue is confirmed as a bug.

Comments

@xiongjiwei
Copy link
Contributor

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

create table t(a varchar(10) collate utf8mb4_bin, b varchar(10) collate utf8mb4_general_ci);
insert into t (a, b) values ('a', 'A');

select * from t where field('A', a collate utf8mb4_general_ci, b) > 1;

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

mysql> select * from t where field('A', a collate utf8mb4_general_ci, b) > 1;
Empty set (0.00 sec)

3. What did you see instead (Required)

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

4. Affected version (Required)

master

5. Root Cause Analysis

@xiongjiwei xiongjiwei added the type/bug The issue is confirmed as a bug. label Jul 17, 2020
@xiongjiwei xiongjiwei changed the title select wrong result using collation on filed function select using collation get wrong result Jul 17, 2020
@tabokie
Copy link

tabokie commented Jul 17, 2020

/label component/charset

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/charset type/bug The issue is confirmed as a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants