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

ROLLUP query returns incorrect result with empty result set

    XMLWordPrintable

Details

    • Unexpected results
    • Fix ROLLUP query results with empty result set. Patch by Jaeheon Shim.

    Description

      Similar to MySQL Bug #36514339, documented in 9.1.0 changelog: https://dev.mysql.com/doc/relnotes/mysql/9.7/en/news-9-1-0.html

      When running a ROLLUP query on an empty table, e.g.

      CREATE TABLE t0(x INT);
      SELECT * FROM t0 GROUP BY x WITH ROLLUP;
      

      We should get a single grouping row with null entries for all fields in GROUP BY (i.e. the grand total row produced by ROLLUP). However, MariaDB returns an empty set instead.

      Attachments

        Activity

          People

            Johnston Rex Johnston
            jaeheonshim Jaeheon Shim
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0d
                0d
                Logged:
                Time Spent - 4.5h
                4.5h

                Git Integration

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