[MDEV-22401] Optimizer trace: multi-component range is not printed correctly Created: 2020-04-28 Updated: 2020-05-05 Resolved: 2020-04-29 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Optimizer |
| Affects Version/s: | 10.4 |
| Fix Version/s: | 10.4.13 |
| Type: | Bug | Priority: | Blocker |
| Reporter: | Sergei Petrunia | Assignee: | Sergei Petrunia |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | optimizer_trace | ||
| Description |
|
shows
This is clearly incorrect as kp1=2 allows the range to have an upper bound too. |
| Comments |
| Comment by Sergei Petrunia [ 2020-04-28 ] | ||||||||||||||||||||||||
|
in print_range:
That is, the range itself is correct. | ||||||||||||||||||||||||
| Comment by Sergei Petrunia [ 2020-04-28 ] | ||||||||||||||||||||||||
|
The issue is that print_range() checks range->range_flag for flags like NO_MIN_RANGE or NO_MAX_RANGE. The rest of the code only checks KEY_MULTI_RANGE::range_flag for flags describing both endpoints, like EQ_RANGE, NULL_RANGE, UNIQUE_RANGE. As for whether the left/right endpoints are inclusive, this is obtained from start_key.flag and end_key.flag, respectively. | ||||||||||||||||||||||||
| Comment by Sergei Petrunia [ 2020-04-28 ] | ||||||||||||||||||||||||
|
bb-10.4-mdev22401 |