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

JSON_ARRAYAGG(NULL) crashes the server

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Critical
    • Resolution: Duplicate
    • Affects Version/s: 10.5.1
    • Fix Version/s: N/A
    • Component/s: JSON, Server
    • Labels:
      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

              Assignee:
              Unassigned
              Reporter:
              lukas.eder Lukas Eder
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: