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

aggregate functions fail with LIMIT EXAMINED ROWS

    XMLWordPrintable

Details

    Description

      With the following query, I expected to see an AVG from a sample of 5000 rows, but it fails:

      MariaDB [test]> SELECT AVG(id) FROM t LIMIT ROWS EXAMINED 5000;
      Empty set, 1 warning (0.00 sec)
       
      Warning (Code 1931): Query execution was interrupted. The query examined at least 5001 rows, which exceeds LIMIT ROWS EXAMINED (5000). The query result may be incomplete.

      The same happens with every aggregate function.

      I'm not sure if this is a bug or a request.

      Attachments

        Activity

          People

            serg Sergei Golubchik
            f_razzoli Federico Razzoli
            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.