[MDEV-3800] Exists2In: ORDER BY doesn't work with exists_to_in=ON on a query with EXISTS subquery and OR condition Created: 2012-10-05 Updated: 2012-10-14 Resolved: 2012-10-14 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 10.0.1 |
| Type: | Bug | Priority: | Major |
| Reporter: | Elena Stepanova | Assignee: | Oleksandr Byelkin |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||
| Description |
|
The following test case
returns an unsorted result set, which is obviously wrong:
Minimal optimizer_switch: in_to_exists=on,exists_to_in=on or materialization=on,exists_to_in=on Reproducible with MyISAM, Aria, InnoDB. EXPLAIN (with the default optimizer_switch + exists_to_in=on):
bzr version-info (lp:~maria-captains/maria/5.5-exists2in)
|
| Comments |
| Comment by Oleksandr Byelkin [ 2012-10-13 ] |
|
Optimized (as shown by EXPLAIN) veriosn works correctly, so idea is to find difference in execution: |
| Comment by Oleksandr Byelkin [ 2012-10-14 ] |
|
Correct execution uses filesort. |
| Comment by Oleksandr Byelkin [ 2012-10-14 ] |
|
curr_join->order for main qquery has no value for wrong case |
| Comment by Oleksandr Byelkin [ 2012-10-14 ] |
|
problem is in incorrect current select pointer. |
| Comment by Oleksandr Byelkin [ 2012-10-14 ] |
|
fixed, tested and pushed |