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

Window functions with is null function in query crashes server

    XMLWordPrintable

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

            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.