Uploaded image for project: 'Couchbase Server'
  1. Couchbase Server
  2. MB-35959

queries with "\\" in the filter predicate hang

    XMLWordPrintable

Details

    • Untriaged
    • Unknown
    • CX Sprint 167, CX Sprint 168, CX Sprint 169

    Description

      Build : 6.0.3-2872

      Steps:
      1. Create a bucket and load 1 doc like the following :

      {
      "test": "abc ()/\\[]{}.,<>~!@#$%&*-_+=|;:'\"?"
      }
      

      2. Run query :

      select * from test where test like "%\\%"; -> should return 1 doc
      select * from test where test="\\" -> this should return 0 docs
      

      Both these query hang

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            marco.greco Marco Greco added a comment - - edited

            Ali Alsuliman the first part of the issue is down to the fix to MB-19230 not being complete: we should test for
            % as well as % as matching string ending, and not add $ in the case of
            %.
            The second part stems from using regexp to simulate like, and the particular implementation of regexp, which is line rather than string based - this will always be cause of false positives, and we should probably write our own like matching code.
            Currently, I cannot undo the ?m because I would break another query, so we'll have to think about something else.

            marco.greco Marco Greco added a comment - - edited Ali Alsuliman the first part of the issue is down to the fix to MB-19230 not being complete: we should test for % as well as % as matching string ending, and not add $ in the case of %. The second part stems from using regexp to simulate like, and the particular implementation of regexp, which is line rather than string based - this will always be cause of false positives, and we should probably write our own like matching code. Currently, I cannot undo the ?m because I would break another query, so we'll have to think about something else.
            marco.greco Marco Greco added a comment -

            First part of the issue checked in

            marco.greco Marco Greco added a comment - First part of the issue checked in

            Build couchbase-server-6.5.0-4444 contains query commit 012dda5 with commit message:
            MB-35959 like not to use $ if pattern ends with %

            build-team Couchbase Build Team added a comment - Build couchbase-server-6.5.0-4444 contains query commit 012dda5 with commit message: MB-35959 like not to use $ if pattern ends with %
            marco.greco Marco Greco added a comment -

            Fixing the line based behaviour cannot be done without writing our own like matching infrastructure, so closing this one and opening a like infrastructure improvement for Cheshire cat.

            marco.greco Marco Greco added a comment - Fixing the line based behaviour cannot be done without writing our own like matching infrastructure, so closing this one and opening a like infrastructure improvement for Cheshire cat.

            I was not able to reproduce it - both queries were run successfully in 6.0.3-2872.

            But they remain successful in 6.5.0-4471

            evgeny.makarenko Evgeny Makarenko (Inactive) added a comment - I was not able to reproduce it - both queries were run successfully in 6.0.3-2872. But they remain successful in 6.5.0-4471

            People

              marco.greco Marco Greco
              mihir.kamdar Mihir Kamdar (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty