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

JSON_UNQUOTE returns incorrect results

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 10.2(EOL)
    • 10.2.3
    • JSON

    Description

      Compare:

      MariaDB 10.2

      MariaDB [test]> SELECT JSON_UNQUOTE('foo');
      +---------------------+
      | JSON_UNQUOTE('foo') |
      +---------------------+
      | NULL                |
      +---------------------+
      1 row in set (0.00 sec)
      

      MySQL 5.7

      MySQL [test]> SELECT JSON_UNQUOTE('foo');
      +---------------------+
      | JSON_UNQUOTE('foo') |
      +---------------------+
      | foo                 |
      +---------------------+
      1 row in set (0.00 sec)
      

      Note: MySQL might be not quite right about it either, as it's supposed to throw an error if the parameter is not a valid JSON document.

      Attachments

        Issue Links

          Activity

            elenst Elena Stepanova created issue -
            elenst Elena Stepanova made changes -
            Field Original Value New Value
            elenst Elena Stepanova made changes -
            elenst Elena Stepanova made changes -
            Description Compare:

            {code:sql|title=MariaDB 10.2}
            MariaDB [test]> SELECT JSON_UNQUOTE('foo');
            +---------------------+
            | JSON_UNQUOTE('foo') |
            +---------------------+
            | NULL |
            +---------------------+
            1 row in set (0.00 sec)
            {code}

            {code:sql|title=MySQL 5.7}
            MySQL [test]> SELECT JSON_UNQUOTE('foo');
            +---------------------+
            | JSON_UNQUOTE('foo') |
            +---------------------+
            | foo |
            +---------------------+
            1 row in set (0.00 sec)
            {code}
            Compare:

            {code:sql|title=MariaDB 10.2}
            MariaDB [test]> SELECT JSON_UNQUOTE('foo');
            +---------------------+
            | JSON_UNQUOTE('foo') |
            +---------------------+
            | NULL |
            +---------------------+
            1 row in set (0.00 sec)
            {code}

            {code:sql|title=MySQL 5.7}
            MySQL [test]> SELECT JSON_UNQUOTE('foo');
            +---------------------+
            | JSON_UNQUOTE('foo') |
            +---------------------+
            | foo |
            +---------------------+
            1 row in set (0.00 sec)
            {code}

            _Note: MySQL might be not quite right about it either, as it's supposed to throw an error if the parameter is not a valid JSON document._
            holyfoot Alexey Botchkov made changes -
            Status Open [ 1 ] In Progress [ 3 ]
            holyfoot Alexey Botchkov added a comment - http://lists.askmonty.org/pipermail/commits/2016-December/010211.html
            holyfoot Alexey Botchkov made changes -
            Fix Version/s 10.2.3 [ 22115 ]
            Fix Version/s 10.2 [ 14601 ]
            Resolution Fixed [ 1 ]
            Status In Progress [ 3 ] Closed [ 6 ]
            serg Sergei Golubchik made changes -
            Workflow MariaDB v3 [ 78607 ] MariaDB v4 [ 151309 ]

            People

              holyfoot Alexey Botchkov
              elenst Elena Stepanova
              Votes:
              0 Vote for this issue
              Watchers:
              3 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.