[MDEV-27320] Redundant addon key in Sort_param Created: 2021-12-20 Updated: 2021-12-20 |
|
| Status: | Open |
| Project: | MariaDB Server |
| Component/s: | None |
| Affects Version/s: | 10.5, 10.6, 10.7, 10.8 |
| Fix Version/s: | 10.5 |
| Type: | Bug | Priority: | Major |
| Reporter: | Alexander Barkov | Assignee: | Alexander Barkov |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Description |
|
The problem is repeatable in versions 10.5 to 10.8. But it's probably repeatable in earlier version as well. It needs to be checked. I start mariadbd in gdb and set a break point in "make_sortkey". The run this script:
When the break-point hits, I print variables as follows:
Notice, param contains one sort key HEX(str), and two addon fields:
The field code is used in SELECT list in HEX(code), so it's clear why it in addon fields. The field str is not used anywhere except ORDER BY HEX(str). It's not clear why it is in addon fields. It should be enough to have this field in sort keys only. |