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

select with json function

    XMLWordPrintable

Details

    • Bug
    • Status: Confirmed (View Workflow)
    • Major
    • Resolution: Unresolved
    • 10.11.9, 11.4.4, 10.6, 10.11, 11.4, 11.8
    • 10.6, 10.11, 11.4, 11.8
    • JSON
    • None
    • linux debian docker

    Description

      – please edit the field summary and components to reflect the bug
      – i am not too familiar with the server internal

      WITH A(a) AS (SELECT id FROM json_table('[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]', '$[*]' COLUMNS (id int PATH '$')) T)
      SELECT JSON_INSERT('{"id": 1}', '$.ids', (SELECT JSON_ARRAYAGG(a) FROM A));
      

      *==> work as expected *

      WITH A(a) AS (SELECT id FROM json_table('[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]', '$[*]' COLUMNS (id int PATH '$')) T),
      B(a) AS (SELECT JSON_INSERT('{"id": 1}', '$.ids', (SELECT JSON_ARRAYAGG(a) FROM A)))
      select * from B;
      

      ==> does not show the same result

      Attachments

        Issue Links

          Activity

            People

              rucha174 Rucha Deodhar
              joe_nolann joe nolann
              Votes:
              0 Vote for this issue
              Watchers:
              3 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.