Bug #111057 | group by or distinct clause result doesn't match collation expectation | ||
---|---|---|---|
Submitted: | 17 May 2023 12:23 | Modified: | 18 May 2023 12:35 |
Reporter: | wei lee | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server | Severity: | S3 (Non-critical) |
Version: | 8.0.30 | OS: | Any |
Assigned to: | CPU Architecture: | Any | |
Tags: | COllation bug, space |
[17 May 2023 12:23]
wei lee
[17 May 2023 12:34]
MySQL Verification Team
Hi Mr. lee, Thank you for your bug report. However, we are not able to repeat your results with 8.0.33. This is what we get: +--------+ | ''=' ' | +--------+ | 1 | +--------+ +----------+ | count(*) | +----------+ | 1 | +----------+ +--------+ | ''=' ' | +--------+ | 0 | +--------+ +----------+ | count(*) | +----------+ | 2 | +----------+ Can't repeat.
[17 May 2023 12:52]
wei lee
hi,@MySQL Verification Team Just like you said,8.0.33 can't repeat this issue,looks like it's fixed i found this issue on 8.0.30 or lower version
[17 May 2023 12:55]
MySQL Verification Team
Hi, Versions are 5.7, 8.0, 81 .... What you are writing about are patch fixing releases. Hence, we do not test on old releases, because the only relevant release is the last one.
[17 May 2023 12:59]
wei lee
OK,i see, thx again
[18 May 2023 5:50]
wei lee
confirm this issue fixed by 8.0.27 : Implicitly grouped queries sometimes calculate aggregates during optimization when their values can be easily retrieved from indexes. When a predicate referenced a column that was declared with a NO PAD collation, that predicate might be evaluated using PAD SPACE semantics, and so return wrong results. This was because an internal function that checked for insignificant trailing spaces made the assumption that all nonbinary collations had PAD SPACE semantics, which was true of MySQL 5.7, but is not the case for MySQL 8.0, which has added many collations having NO PAD semantics, including the default collation (utf8mb4_0900_ai_ci). case closed
[18 May 2023 12:35]
MySQL Verification Team
Hi, That is true .....