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

json_search doesn't search for values with double quotes character (")

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 10.2
    • 10.2.5
    • JSON
    • None
    • 10.2.5-1

    Description

      E.g. while searching for values with single quote character - everything works as expected:

      SELECT JSON_search( '{"x": "\'a\'"}', "one", '\'a\'');
      | "$.x"                                          |
      SELECT JSON_search( '{"x": "\'"}', "one", '\'');
      | "$.x"                                    |
      

      But "the same" search for double quotes returns no result:

      SELECT JSON_search( '{"x": "\\"a\\""}', "one", '"a"');
      | NULL                                           |
      SELECT JSON_search( '{"x": "\\""}', "one", '"');
      | NULL                                     |
      

      In MySQL 5.7:

       SELECT JSON_search( '{"x": "\\""}', "one", '"');
      | "$.x"                                    |
      

      Attachments

        Activity

          People

            holyfoot Alexey Botchkov
            anikitin Andrii Nikitin (Inactive)
            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.