Bug #81810 | Inconsistent sort order for blob/text between InnoDB and filesort | ||
---|---|---|---|
Submitted: | 11 Jun 2016 0:01 | Modified: | 8 Nov 2018 15:42 |
Reporter: | Manuel Ung | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: Charsets | Severity: | S3 (Non-critical) |
Version: | 5.7.13, 5.6.31 | OS: | Any |
Assigned to: | CPU Architecture: | Any |
[11 Jun 2016 0:01]
Manuel Ung
[11 Jun 2016 4:07]
MySQL Verification Team
Hello Manuel Ung, Thank you for the report and test case. Verified as described with 5.6.31/5.7.13 builds. Thanks, Umesh
[23 Jun 2016 18:01]
Manuel Ung
Related to this topic, it doesn't really make sense for Field_blob::make_sort_key to always write down the full length of the blob for binary collations. The length should be the minimum of the requested key length, and the blob length. For example, if we had 3 rows: a abcd abcde and we request a key of size 4, we currently write: 'a' 0 1 0 'a' 'b' 4 0 'a' 'b' 5 0 It makes more sense to have 'a' 0 1 0 'a' 'b' 2 0 'a' 'b' 2 0 This issue has no effect on correctness, but you might see some order when you expect unordered data (although if it's "unordered" then any order is valid anyway).
[8 Nov 2018 15:42]
Manuel Ung
This was fixed as part of WL#11590: More flexible filesort