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

Error after UPDATE..ORDER BY (window function)

    XMLWordPrintable

Details

    Description

      There is an error on 10.4-11.0, while it is accepted on 11.1-11.3. Also error says that window function is allowed in ORDER BY, while here it is inside the ORDER BY clause.

      10.4-11.0

      MariaDB [test]> CREATE TABLE t ( a int, b int );
      Query OK, 0 rows affected (0,052 sec)
       
      MariaDB [test]> UPDATE t SET a=1 ORDER BY count(b) over ();
      ERROR 4015 (HY000): Window function is allowed only in SELECT list and ORDER BY clause
      

      11.1-11.4:

      MariaDB [test]> CREATE TABLE t ( a int, b int );
      Query OK, 0 rows affected (0,042 sec)
       
      MariaDB [test]> UPDATE t SET a=1 ORDER BY count(b) over ();
      Query OK, 0 rows affected (0,001 sec)
      Rows matched: 0  Changed: 0  Warnings: 0
      

      Attachments

        Activity

          People

            psergei Sergei Petrunia
            alice Alice Sherepa
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Git Integration

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