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

View created via JSON_ARRAYAGG returns incorrect json object

    XMLWordPrintable

Details

    Description

      Case repeats only in 10.5:

      Test case:

      CREATE VIEW v1 AS SELECT JSON_OBJECT(_LATIN1 'plugin', _LATIN1'unix_socket') as v1_json;
      SELECT JSON_ARRAYAGG(v1_json) FROM v1;
      DROP VIEW v1;
       
      CREATE VIEW v1 AS SELECT JSON_OBJECT('plugin','unix_socket') as v1_json;
      SELECT JSON_ARRAYAGG(v1_json) FROM v1;
      DROP VIEW v1;
      

      Expected result:

      JSON_ARRAYAGG(v1_json)
      [{"plugin": "unix_socket"}]
       
      JSON_ARRAYAGG(v1_json)
      [{"plugin": "unix_socket"}]
      

      Actual result:

      JSON_ARRAYAGG(v1_json)
      ["{\"plugin\": \"unix_socket\"}"]
       
      JSON_ARRAYAGG(v1_json)
      ["{\"plugin\": \"unix_socket\"}"]
      

      Attachments

        Issue Links

          Activity

            People

              bar Alexander Barkov
              lstartseva Lena Startseva
              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 - 16d 7h
                  16d 7h

                  Git Integration

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