[MDEV-16917] Index affects query results Created: 2018-08-08 Updated: 2018-10-06 Resolved: 2018-09-15 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Optimizer |
| Affects Version/s: | 10.3.8, 10.3.9, 10.3 |
| Fix Version/s: | 10.3.10 |
| Type: | Bug | Priority: | Major |
| Reporter: | Frank E | Assignee: | Igor Babaev |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Environment: |
CentOS 7 3.10.0-862.9.1.el7.x86_64 |
||
| Description |
|
Running the above query, as setup above, gives the incorrect result of: Removing n2 from the multi-column index (`n1`,`c1`,`n2`), or rearranging that index to be (`n2`,`c1`,`n1`), or removing that index altogether, gives the correct query result of: The combination of that specific multi-column index with the single-column index of c1 seems to trigger the issue. |
| Comments |
| Comment by Elena Stepanova [ 2018-09-02 ] | ||||||||||
|
Thanks for the report and test case. Reproducible as described. The difference was apparently introduced in 10.3.4 by this revision:
| ||||||||||
| Comment by Igor Babaev [ 2018-09-15 ] | ||||||||||
|
The EXPLAIN output for the query shows the problem:
We can see from in execution plan that | ||||||||||
| Comment by Igor Babaev [ 2018-09-15 ] | ||||||||||
|
A fix for this bug was pushed into 10.3 |