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

Using aggregate and window function in unexpected places can crash the server

Details

    Description

      These examples crash the server:

      CREATE OR REPLACE PROCEDURE p1 (a TEXT) BEGIN END;
      CALL p1(RANK() OVER (ORDER BY 1));
      

      CREATE OR REPLACE PROCEDURE p1 (a TEXT) BEGIN END;
      CALL p1(ROW_NUMBER() OVER ());
      

      CREATE OR REPLACE PROCEDURE p1 (a TEXT) BEGIN END;
      CALL p1(SUM(1));
      

      Attachments

        Issue Links

          Activity

            In 10.1 it works fine:

            MariaDB [test]> CALL p1(SUM(1));
            ERROR 1111 (HY000): Invalid use of group function
            

            bar Alexander Barkov added a comment - In 10.1 it works fine: MariaDB [test]> CALL p1( SUM (1)); ERROR 1111 (HY000): Invalid use of group function

            People

              bar Alexander Barkov
              bar Alexander Barkov
              Votes:
              0 Vote for this issue
              Watchers:
              1 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.