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

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

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 10.2
    • Fix Version/s: 10.2.5
    • Component/s: JSON
    • Labels:
      None
    • Sprint:
      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

            • Assignee:
              holyfoot Alexey Botchkov
              Reporter:
              anikitin Andrii Nikitin (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: