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

JSON_VALUE and JSON_QUERY don't handle wildcards in path

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Major
    • Resolution: Unresolved
    • 10.2, 10.3, 10.4, 10.5, 10.6, 10.7, 10.8
    • 10.4, 10.5, 10.6
    • JSON
    • None

    Description

      _Note: it might be a documentation issue, please then documented it properly. For now, I don't see anything that would suggest this difference in behavior between JSON_VALUE / JSON_QUERY and JSON_EXTRACT

      MariaDB [test]> SELECT JSON_EXTRACT('{"foo":{"bar":"qux"}}','$**.bar');
      +-------------------------------------------------+
      | JSON_EXTRACT('{"foo":{"bar":"qux"}}','$**.bar') |
      +-------------------------------------------------+
      | ["qux"]                                         |
      +-------------------------------------------------+
      1 row in set (0.00 sec)
      

      MariaDB [test]> SELECT JSON_QUERY('{"foo":{"bar":"qux"}}','$**.bar');
      +-----------------------------------------------+
      | JSON_QUERY('{"foo":{"bar":"qux"}}','$**.bar') |
      +-----------------------------------------------+
      | NULL                                          |
      +-----------------------------------------------+
      1 row in set (0.00 sec)
      

      MariaDB [test]> SELECT JSON_VALUE('{"foo":{"bar":"qux"}}','$**.bar');
      +-----------------------------------------------+
      | JSON_VALUE('{"foo":{"bar":"qux"}}','$**.bar') |
      +-----------------------------------------------+
      | NULL                                          |
      +-----------------------------------------------+
      1 row in set (0.01 sec)
      

      Given the current description of JSON_VALUE and JSON_QUERY, I would expect one of them to return a non-null value.

      Attachments

        Issue Links

          Activity

            People

              rucha174 Rucha Deodhar
              elenst Elena Stepanova
              Votes:
              0 Vote for this issue
              Watchers:
              2 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.