[MDEV-27426] Wrong result upon query using index_merge with DESC key Created: 2022-01-05 Updated: 2022-01-26 Resolved: 2022-01-10 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Optimizer |
| Affects Version/s: | N/A |
| Fix Version/s: | 10.8.1 |
| Type: | Bug | Priority: | Critical |
| Reporter: | Elena Stepanova | Assignee: | Sergei Petrunia |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||
| Description |
|
The query returns an empty result set (the expected result is 2 rows):
Not reproducible with the same test case with ASC primary key.
|
| Comments |
| Comment by Sergei Petrunia [ 2022-01-10 ] | ||||||
|
Notes: This quick select uses a special case variant of index_merge where one of the merged index scans is a scan on clustered PK. In that case, the execution gets here:
and QUICK_RANGE_SELECT::cmp_next() apparently ignores the fact that some key parts are reverse-ordered. |