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

JSON_TYPE doesnt detect the type of String Values (returns NULL) and for Date/DateTime returns "INTEGER"

    XMLWordPrintable

Details

    • Bug
    • Status: In Review (View Workflow)
    • Major
    • Resolution: Unresolved
    • 10.2.22, 10.3.15, 10.2, 10.3, 10.4, 10.5
    • 10.4, 10.5
    • JSON
    • None
    • Windows 10 64 bit

    Description

      Hi this sentence:

      select JSON_TYPE(json_value(JSON_OBJECT("id", 1, "name", 'Monty', "date", Cast('2019-01-01' as Date) ), '$.date'));
      

      Returns INTEGER, at least it should say 'STRING'

      select JSON_TYPE(json_value(JSON_OBJECT("id", 1, "name", 'Monty', "date", Cast('2019-01-01' as Date) ), '$.name'));
      

      returns NULL, if you apply JSON_QUOTE for the JSON_VALUE returned value, it returns STRING.

      Attachments

        Issue Links

          Activity

            People

              holyfoot Alexey Botchkov
              fduenas Francisco Dueñas
              Votes:
              0 Vote for this issue
              Watchers:
              4 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.