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

Json Range only affects first row of the result set

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Critical
    • Resolution: Fixed
    • 10.9.4, 10.10.2, 10.9(EOL), 10.10(EOL), 10.11
    • 10.9.5, 10.10.3
    • JSON
    • None

    Description

      To reproduce:

      CREATE TABLE t3 (
        j JSON 
      );
       
      INSERT INTO t3 (j) VALUES ('[{"id": 1, "name": "Monty"},{"id": 2, "name": "Widenius"}]');
      INSERT INTO t3 (j) VALUES ('[{"id": 1, "name": "Monty"},{"id": 2, "name": "Widenius"}]');
       
      SELECT JSON_EXTRACT(j, '$[0 to 1]')  FROM t3 ;
      

      Expected result:

      [{"id": 1, "name": "Monty"}, {"id": 2, "name": "Widenius"}]
      [{"id": 1, "name": "Monty"}, {"id": 2, "name": "Widenius"}]
      

      Current result

      [{"id": 1, "name": "Monty"}, {"id": 2, "name": "Widenius"}]
      {"id": 1, "name": "Monty"}
      

      Attachments

        Issue Links

          Activity

            People

              rucha174 Rucha Deodhar
              Richard Richard Stracke
              Votes:
              0 Vote for this issue
              Watchers:
              6 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.