[MDEV-9935] Window functions: assertion failure with empty OVER() clause Created: 2016-04-17 Updated: 2016-09-24 Resolved: 2016-09-24 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Optimizer - Window functions |
| Affects Version/s: | 10.2 |
| Fix Version/s: | 10.2.2 |
| Type: | Bug | Priority: | Blocker |
| Reporter: | Sergei Petrunia | Assignee: | Vicențiu Ciorbaru |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||||||||||||||||||
| Sprint: | 10.2.2-4 | ||||||||||||||||||||||||
| Description |
|
If a window function is used without specifying either partition or order list (which is valid and makes sense at least with row_number() function), the server fails an assertion:
The assertion fails here:
|
| Comments |
| Comment by Sergei Petrunia [ 2016-04-17 ] | |
|
Indeed, filesort cannot use an empty criteria. We should support the case where window functions code doesn't need to do sorting. It's possible to work around the assert by just putting in a dummy sort expression, but that's not the right way to do it. | |
| Comment by Elena Stepanova [ 2016-09-02 ] | |
|
Reminder: the release build is also affected, in an even worse way, because there the server hangs. | |
| Comment by Elena Stepanova [ 2016-09-21 ] | |
|
Another reminder: it happens with aggregate functions also, e.g.
It can't be released like that, it's one of first things people try (because it's one of first queries which appears in various documentation, examples, etc.) | |
| Comment by Vicențiu Ciorbaru [ 2016-09-24 ] | |
|
We have a temporary fix for it with The proper fix required is monitored under MDEV-10878 |