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:

                Git Integration

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