[MDEV-27443] Wrong result with prefix key on CHAR column and nopad collation Created: 2022-01-07 Updated: 2022-12-14 Resolved: 2022-12-14 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Character Sets, Optimizer |
| Affects Version/s: | 10.5, 10.6, 10.7 |
| Fix Version/s: | N/A |
| Type: | Bug | Priority: | Major |
| Reporter: | Elena Stepanova | Assignee: | Alexander Barkov |
| Resolution: | Cannot Reproduce | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||
| Description |
|
This is wrong, 'w' values should also be there. The following query will also fail with an empty result:
Changing the engine to MyISAM will return the correct result. The failure appeared in 10.5 branch after this commit in 10.5.3:
|
| Comments |
| Comment by Michael Widenius [ 2022-02-01 ] |
|
I analyze the case of the query: InnoDB is called with ha_innobase::index_read() .. with a key value of: Some innodb variables in row_search_mvcc() (gdb) print *search_tuple->fields The bug seams to be that InnoDB is not able to compare the above key to what is in the secondary key index. |
| Comment by Alexander Barkov [ 2022-02-03 ] |
|
|
| Comment by Marko Mäkelä [ 2022-02-03 ] |
|
Because the wrong result is also repeatable with ROW_FORMAT=REDUNDANT, I do not think that this is directly related to I think that bar is a better assignee of this, because InnoDB is merely invoking some collation code that he knows much better than me. |
| Comment by Alice Sherepa [ 2022-12-14 ] |
|
Currently correct results on 10.3-10.11 (b81b1943932a383a92b) |