[MDEV-11697] Lead Window Function Returns Incorrect Results Created: 2016-12-31  Updated: 2017-02-18  Resolved: 2017-02-15

Status: Closed
Project: MariaDB Server
Component/s: Optimizer - Window functions
Affects Version/s: 10.2.3
Fix Version/s: 10.2.4

Type: Bug Priority: Major
Reporter: Shawn Weeks Assignee: Vicențiu Ciorbaru
Resolution: Fixed Votes: 0
Labels: 10.2-rc
Environment:

Windows 10 Pro 1607 x64, 128GB RAM, i7 6800k MariaDB 10.2.3 Beta


Attachments: Text File Test MariaDB Lead Function.log     File Test MariaDB Lead Function.sql    

 Description   

Lead Function is returning incorrect results for larger test table. Logs and example are attached. Expected results are as follows.

+------+---------+
| id   | next_id |
+------+---------+
|    1 |       2 |
|    2 |       3 |
|    3 |       4 |
|    4 |       5 |
|    5 |       6 |
|    6 |       7 |
|    7 |       8 |
|    8 |       9 |
|    9 |      10 |
|   10 |      11 |
+------+---------+



 Comments   
Comment by Shawn Weeks [ 2016-12-31 ]

Thank you I couldn't get the formatting to work.

Comment by Elena Stepanova [ 2017-01-03 ]

Thanks for the report and test case.

Comment by Vicențiu Ciorbaru [ 2017-02-10 ]

Sergey, please check that this reproduces again as it seems to be a big table issue.

Comment by Vicențiu Ciorbaru [ 2017-02-14 ]

This is fixed by the fix for MDEV-10092.

Comment by Vicențiu Ciorbaru [ 2017-02-15 ]

Test case added for the bug to catch regressions.
https://github.com/mariadb/server/commit/88ddb1ea4e4c7ce4816026d9a64b3f8b1cc59072

Comment by Shawn Weeks [ 2017-02-18 ]

Checked it in the most recent 10.2.5 build it looks fine. Thanks

Generated at Thu Feb 08 07:51:58 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.