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

JSON_ARRAYAGG(NULL) crashes the server

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Critical
    • Resolution: Duplicate
    • 10.5.1
    • N/A
    • JSON, Server
    • None

    Description

      I'm using MariaDB 10.5.1-MariaDB-1:10.5.1+maria~bionic on Docker for Windows. The following query crashes the server:

      select json_arrayagg(null);
      

      All sorts of alternative ways to aggregate null lead to the same effect:

      select json_arrayagg((select null));
      select json_arrayagg(a) from (select null a) t;
      

      But if there are more than 1 null values, the result is as expected:

      select json_arrayagg(a) from (select null a union all select null) t;
      

      Yields

      [null, null]
      

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              lukas.eder Lukas Eder
              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.