Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-11697

Lead Window Function Returns Incorrect Results

Details

    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 |
      +------+---------+
      

      Attachments

        Activity

          absolutesantaja Shawn Weeks created issue -
          absolutesantaja Shawn Weeks made changes -
          Field Original Value New Value
          Environment Windows 10 Pro 1607 x64, 128GB RAM, i7 6800k MariaDB 10.2.2 Beta Windows 10 Pro 1607 x64, 128GB RAM, i7 6800k MariaDB 10.2.3 Beta
          absolutesantaja Shawn Weeks made changes -
          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 |
          +------+---------+
          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 |
          +------+---------+}}
          absolutesantaja Shawn Weeks made changes -
          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 |
          +------+---------+}}
          Lead Function is returning incorrect results for larger test table. Logs and example are attached. Expected results are as follows.

          {{+------+---------+
          | id | next_id |
          +------+---------+
          | 1 | 1 |
          | 2 | 4097 |
          | 3 | 4097 |
          | 4 | 4097 |
          | 5 | 4097 |
          | 6 | 4097 |
          | 7 | 4097 |
          | 8 | 4097 |
          | 9 | 4097 |
          | 10 | 4097 |
          +------+---------+}}
          absolutesantaja Shawn Weeks made changes -
          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 | 1 |
          | 2 | 4097 |
          | 3 | 4097 |
          | 4 | 4097 |
          | 5 | 4097 |
          | 6 | 4097 |
          | 7 | 4097 |
          | 8 | 4097 |
          | 9 | 4097 |
          | 10 | 4097 |
          +------+---------+}}
          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 |
          +------+---------+
          elenst Elena Stepanova made changes -
          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 |
          +------+---------+
          Lead Function is returning incorrect results for larger test table. Logs and example are attached. Expected results are as follows.
          {noformat}
          +------+---------+
          | id | next_id |
          +------+---------+
          | 1 | 2 |
          | 2 | 3 |
          | 3 | 4 |
          | 4 | 5 |
          | 5 | 6 |
          | 6 | 7 |
          | 7 | 8 |
          | 8 | 9 |
          | 9 | 10 |
          | 10 | 11 |
          +------+---------+
          {noformat}
          elenst Elena Stepanova made changes -
          Status Open [ 1 ] Confirmed [ 10101 ]
          elenst Elena Stepanova made changes -
          Component/s Optimizer - Window functions [ 13502 ]
          Fix Version/s 10.2 [ 14601 ]
          Assignee Vicentiu Ciorbaru [ cvicentiu ]
          Priority Minor [ 4 ] Major [ 3 ]
          elenst Elena Stepanova made changes -
          Labels 10.2-rc
          cvicentiu Vicențiu Ciorbaru made changes -
          Assignee Vicentiu Ciorbaru [ cvicentiu ] Sergei Petrunia [ psergey ]
          cvicentiu Vicențiu Ciorbaru made changes -
          Assignee Sergei Petrunia [ psergey ] Vicentiu Ciorbaru [ cvicentiu ]
          cvicentiu Vicențiu Ciorbaru made changes -
          Status Confirmed [ 10101 ] In Progress [ 3 ]
          cvicentiu Vicențiu Ciorbaru made changes -
          Fix Version/s 10.2.4 [ 22116 ]
          Fix Version/s 10.2 [ 14601 ]
          Resolution Fixed [ 1 ]
          Status In Progress [ 3 ] Closed [ 6 ]
          serg Sergei Golubchik made changes -
          Workflow MariaDB v3 [ 79037 ] MariaDB v4 [ 151465 ]

          People

            cvicentiu Vicențiu Ciorbaru
            absolutesantaja Shawn Weeks
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.