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

Duplicate square brackets in JSON_ARRAYAGG upon query with HAVING

    XMLWordPrintable

Details

    • Bug
    • Status: Confirmed (View Workflow)
    • Major
    • Resolution: Unresolved
    • 10.5, 10.6, 10.11, 11.2(EOL), 11.4, 11.6(EOL)
    • 10.5, 10.6, 10.11, 11.4
    • JSON
    • None

    Description

      CREATE TABLE t1 (a INT, b VARCHAR(10));
      INSERT INTO t1 VALUES (1,"foo"), (2,"bar");
       
      SELECT a, JSON_ARRAYAGG(b) as j FROM t1 GROUP BY a HAVING j = '["foo"]';
      

      Actual result, 10.5 baca526555

      MariaDB [test]> SELECT a, JSON_ARRAYAGG(b) as j FROM t1 GROUP BY a HAVING j = '["foo"]';
      +------+-----------+
      | a    | j         |
      +------+-----------+
      |    1 | [["foo"]] |
      +------+-----------+
      1 row in set (0.002 sec)
      

      Attachments

        Issue Links

          Activity

            People

              rucha174 Rucha Deodhar
              elenst Elena Stepanova
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:

                Git Integration

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