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

Window functions with is null function in query crashes server

Details

    • 10.2.7-1

    Description

      The following window function expression crashes the server. The original goal is to have it run in a view but the select alone fails. This is related to MDEV-12840 as that bug was my attempt to rewrite the query in a more sane fashion but the following is technically valid and it may be broader scope.

      create table t1(dt datetime);
      insert into t1 values ('2017-05-17'), ('2017-05-18');
       
      select dt,
          -> case when (max(dt) over (order by dt rows between 1 following and 1 following) is null)
          -> then '9999-12-31 12:00:00'
          -> else max(dt) over (order by dt rows between 1 following and 1 following)
          -> end x
          -> from t1;
      ERROR 2006 (HY000): MySQL server has gone away
      No connection. Trying to reconnect...
      Connection id:    8
      Current database: genesis
       
      ERROR 2013 (HY000): Lost connection to MySQL server during query
      

      Attachments

        Issue Links

          Activity

            dthompson David Thompson (Inactive) created issue -
            dthompson David Thompson (Inactive) made changes -
            Field Original Value New Value
            elenst Elena Stepanova made changes -
            Status Open [ 1 ] Confirmed [ 10101 ]
            elenst Elena Stepanova made changes -
            Fix Version/s 10.2 [ 14601 ]
            Assignee Vicentiu Ciorbaru [ cvicentiu ]
            Priority Major [ 3 ] Critical [ 2 ]
            ratzpo Rasmus Johansson (Inactive) made changes -
            Sprint 10.2.7-1 [ 171 ]
            cvicentiu Vicențiu Ciorbaru made changes -
            Summary case with window functions query crashes server Window functions with is null function in query crashes server
            cvicentiu Vicențiu Ciorbaru made changes -
            Fix Version/s 10.2.7 [ 22543 ]
            Fix Version/s 10.2 [ 14601 ]
            Resolution Fixed [ 1 ]
            Status Confirmed [ 10101 ] Closed [ 6 ]
            elenst Elena Stepanova made changes -
            elenst Elena Stepanova made changes -
            serg Sergei Golubchik made changes -
            Workflow MariaDB v3 [ 80860 ] MariaDB v4 [ 152182 ]

            People

              cvicentiu Vicențiu Ciorbaru
              dthompson David Thompson (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              4 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.