[MDEV-9941] Window functions: two functions, one (wrong) sorting is used Created: 2016-04-19 Updated: 2016-09-23 Resolved: 2016-09-23 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Optimizer - Window functions |
| Affects Version/s: | 10.2 |
| Fix Version/s: | 10.2.2 |
| Type: | Bug | Priority: | Major |
| Reporter: | Sergei Petrunia | Assignee: | Igor Babaev |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Description |
|
Consider an example:
The query plan is incorrect. We can't just sort by "a":
|
| Comments |
| Comment by Sergei Petrunia [ 2016-04-19 ] | ||||||||||||||||
|
And running the SELECT produces a wrong result (added "ORDER BY b" to the query so it's easier to understand):
| ||||||||||||||||
| Comment by Igor Babaev [ 2016-04-19 ] | ||||||||||||||||
|
Sergey, It means only that you have to sort by (a,b). Choose the correct order list. | ||||||||||||||||
| Comment by Igor Babaev [ 2016-09-23 ] | ||||||||||||||||
|
This bug apparently was fixed some time ago in 10.2 |