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

JSON_OBJECT returns null with strings containing backticks

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 10.2.6, 10.2(EOL)
    • 10.2.9
    • JSON
    • Ubuntu 16.04 and Debian 8

    Description

      JSON_OBJECT seems to return NULL when one of its arguments is a string containing one or more backticks. This can be reproduced with:

      SELECT JSON_OBJECT('foo', '`')
      

      or

      SELECT JSON_OBJECT("foo", "bar`bar")
      

      or

      SELECT JSON_OBJECT('`', 'foo')
      

      Attachments

        Activity

          Guido Cella Guido Cella created issue -
          elenst Elena Stepanova made changes -
          Field Original Value New Value
          Status Open [ 1 ] Confirmed [ 10101 ]
          elenst Elena Stepanova made changes -
          Description JSON_OBJECT seems to return NULL when one of its arguments is a string containing one or more backticks. This can be reproduced with:
          SELECT JSON_OBJECT('foo', '`')
          or
          SELECT JSON_OBJECT("foo", "bar`bar")
          or
          SELECT JSON_OBJECT('`', 'foo')
          JSON_OBJECT seems to return NULL when one of its arguments is a string containing one or more backticks. This can be reproduced with:
          {code:sql}
          SELECT JSON_OBJECT('foo', '`')
          {code}
          or
          {code:sql}
          SELECT JSON_OBJECT("foo", "bar`bar")
          {code}
          or
          {code:sql}
          SELECT JSON_OBJECT('`', 'foo')
          {code}

          For all examples above MySQL 5.7 returns a JSON object.

          elenst Elena Stepanova added a comment - For all examples above MySQL 5.7 returns a JSON object.
          elenst Elena Stepanova made changes -
          Fix Version/s 10.2 [ 14601 ]
          Affects Version/s 10.2 [ 14601 ]
          Assignee Alexey Botchkov [ holyfoot ]
          holyfoot Alexey Botchkov made changes -
          Status Confirmed [ 10101 ] In Progress [ 3 ]
          holyfoot Alexey Botchkov made changes -
          Fix Version/s 10.2.9 [ 22611 ]
          Fix Version/s 10.2 [ 14601 ]
          Resolution Fixed [ 1 ]
          Status In Progress [ 3 ] Closed [ 6 ]
          serg Sergei Golubchik made changes -
          Workflow MariaDB v3 [ 81315 ] MariaDB v4 [ 152357 ]

          People

            holyfoot Alexey Botchkov
            Guido Cella Guido Cella
            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.