[MDEV-25682] Explain shows an execution plan different from actually executed Created: 2021-05-14 Updated: 2021-06-08 Resolved: 2021-06-08 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Optimizer |
| Affects Version/s: | 10.2, 10.3 |
| Fix Version/s: | 10.2.39, 10.3.30 |
| Type: | Bug | Priority: | Major |
| Reporter: | Igor Babaev | Assignee: | Igor Babaev |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Description |
|
For the following query
EXPLAIN shows
though the execution of the query in debugger clearly indicates that first a temporary table is created for (select a from t1 limit 2) then the rows from this temporary are sorted.
The full test case is:
|
| Comments |
| Comment by Igor Babaev [ 2021-05-14 ] | |||||||||
|
This is another test case that produces a wrong explain:
| |||||||||
| Comment by Igor Babaev [ 2021-05-14 ] | |||||||||
|
Roman, please click 'Review done' and assign the task back to me. | |||||||||
| Comment by Marko Mäkelä [ 2021-05-18 ] | |||||||||
|
This was already pushed to 10.2, but a merge to 10.3 is not trivial (my attempts would break the table value constructor tests) and hence this must be fixed in 10.3 separately. | |||||||||
| Comment by Igor Babaev [ 2021-06-08 ] | |||||||||
|
A fix for this bug was pushed into 10.2. An adjusted fix was pushed into 10.3 |