[MDEV-10874] Multiple window functions don't generate correct sorting criterias Created: 2016-09-22 Updated: 2016-09-26 Resolved: 2016-09-26 |
|
| 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: | Vicențiu Ciorbaru | Assignee: | Igor Babaev |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Description |
|
The following query doesn't sort the rows of the table correctly:
Querying separately produces the correct sort key (a, pk) |
| Comments |
| Comment by Igor Babaev [ 2016-09-23 ] |
|
Vicentiu, I've found what caused this problem. This is a bug in the code of Window_funcs_sort::setup. Could you please provide me with a test case that can be executed on the current 10.2? |
| Comment by Vicențiu Ciorbaru [ 2016-09-23 ] |
|
Hi Igor, Just change nth_value(pk, 1) to sum(pk). That should work on the current 10.2. Vicentiu |
| Comment by Igor Babaev [ 2016-09-26 ] |
|
The fix for this bug was pushed into the 10.2 tree. |