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

JSON_VALID accepts a number with an empty exponent ('1e') inside arrays and objects, but not at the top level

    XMLWordPrintable

Details

    • Bug
    • Status: Confirmed (View Workflow)
    • Major
    • Resolution: Unresolved
    • 10.11, 11.4, 11.8, 12.3, 13.1
    • 10.11, 11.4, 11.8, 12.3, 13.1
    • JSON
    • None

    Description

      Reproduced on 10.11.19 (debug build):

      SELECT JSON_VALID('1e'), JSON_VALID('[1e]'), JSON_VALID('{"a":1e}'),
             JSON_VALID('[1e+]');
      -- 0  1  1  1

      The number scanner accepts an exponent with no digits when another token follows it. Expected: all four are invalid (0). JSON_VALUE('[1e]', '$[0]') also returns the text '1e' as if it were a value.

      Attachments

        Activity

          People

            rucha174 Rucha Deodhar
            chunlingqin chunlingqin
            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.