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

Incorrect result of JSON_TABLE with range

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Not a Bug
    • 13.1
    • N/A
    • JSON
    • None
    • Not for Release Notes

    Description

      Hi,

      I found that JSON_TABLE can return an incorrect result with a range. This is an example:

      SELECT v FROM JSON_TABLE('[10,20,30,40]', '$[1 to 2]' COLUMNS(v INT PATH '$')) AS jt; -- 20, expect 20 and 30
       
      SELECT v FROM JSON_TABLE('[10,20,30]', '$[-1]' COLUMNS(v INT PATH '$')) AS jt; -- empty result, expect 30
       
      SELECT v FROM JSON_TABLE('[10,20,30]', '$[last]' COLUMNS(v INT PATH '$')) AS jt; -- empty result, expect 30
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            ChiZhang Chi Zhang
            Votes:
            0 Vote for this issue
            Watchers:
            2 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.