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

JSON_TYPE returns unexpected warning

    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_TYPE returns an unexpected warning on string and date values.

      This is an example:

      SELECT
        JSON_TYPE(JSON_VALUE(JSON_OBJECT("id", 1, "name", "Monty"), '$.id')) AS json_type_numeric,
        JSON_TYPE(JSON_VALUE(JSON_OBJECT("id", 1, "name", "Monty"), '$.name')) AS json_type_string,
        JSON_TYPE(JSON_VALUE(JSON_OBJECT("id", 1, "d", CAST('2019-01-01' AS DATE)), '$.d')) AS json_type_date; -- INTEGER NULL    NULL
      SHOW WARNINGS;
      -- Warning 4038    Syntax error in JSON text in argument 1 to function 'json_type' at position 1
      -- Warning 4038    Syntax error in JSON text in argument 1 to function 'json_type' at position 5
      

      Attachments

        Activity

          People

            shipjain Shipra Jain
            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.