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

Query with ROW_NUMBER() hangs indefinitely if ORDER or PARTITION not specified

    XMLWordPrintable

Details

    Description

      10.2.0-MariaDB

      The query

      select blah, row_number()  over() from (select 'foo' blah) t;
      

      hangs indefinitely. The process list shows:

      +----+------+-----------+-------+---------+------+-------+------------------+----------+
      | Id | User | Host      | db    | Command | Time | State | Info             | Progress |
      +----+------+-----------+-------+---------+------+-------+------------------+----------+
      | 17 | root | localhost | onedb | Sleep   | 958  |       |                  | 0.000    |
      | 22 | root | localhost |       | Query   | 0    | init  | show processlist | 0.000    |
      +----+------+-----------+-------+---------+------+-------+------------------+----------+
      

      If ORDER BY or PARTITION BY (or both) is specified in OVER(), the query executes successfully.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              nickivanov nick ivanov
              Votes:
              0 Vote for this issue
              Watchers:
              2 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.