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

    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

              rucha174 Rucha Deodhar
              fduenas Francisco Dueñas
              Votes:
              0 Vote for this issue
              Watchers:
              5 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.