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

Like functions escape character should be optional

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: Neo
    • Fix Version/s: Neo
    • Component/s: query
    • Labels:
      None
    • Triage:
      Untriaged
    • Story Points:
      1
    • Is this a Regression?:
      Unknown

      Description

      These functions second argument must be optional.
      Queries used them will not work on Neo.

      cbq> SELECT LIKE_PREFIX("Z45%"), LIKE_STOP("Z45%"), LIKE_SUFFIX("Z45%"), VERSION();
      {
          "requestID": "1100f400-5a34-4ace-b21b-9ceea91593de",
          "signature": {
              "$1": "string",
              "$2": "json",
              "$3": "string",
              "$4": "string"
          },
          "results": [
          {
              "$1": "Z45",
              "$2": "Z46",
              "$3": "Z45%",
              "$4": "7.0.1-N1QL"
          }
          ],
          "status": "success",
          "metrics": {
              "elapsedTime": "846.828µs",
              "executionTime": "787.413µs",
              "resultCount": 1,
              "resultSize": 98,
              "serviceLoad": 2
          }
      }
      cbq> SELECT LIKE_PREFIX("Z45%"), LIKE_STOP("Z45%"), LIKE_SUFFIX("Z45%"), VERSION();
      {
          "requestID": "9cb8f20a-5a16-4ef4-8ce3-d312718118c5",
          "errors": [
              {
                  "code": 3000,
                  "msg": "Number of arguments to function LIKE_PREFIX (near line 1, column 18) must be 2. \n Number of arguments to function LIKE_STOP (near line 1, column 37) must be 2. \n Number of arguments to function LIKE_SUFFIX (near line 1, column 58) must be 2."
              }
          ],
          "status": "fatal",
          "metrics": {
              "elapsedTime": "1.075753ms",
              "executionTime": "896.558µs",
              "resultCount": 0,
              "resultSize": 0,
              "serviceLoad": 2,
              "errorCount": 1
          }
      }
      cbq>
      

      cc Donald Haggart

        Attachments

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

          Activity

          Hide
          build-team Couchbase Build Team added a comment -

          Build couchbase-server-7.1.0-1274 contains query commit 02cefdb with commit message:
          MB-48402 Optional escape arguments to LIKE_PREFIX, LIKE_SUFFIX and LIKE_STOP

          Show
          build-team Couchbase Build Team added a comment - Build couchbase-server-7.1.0-1274 contains query commit 02cefdb with commit message: MB-48402 Optional escape arguments to LIKE_PREFIX, LIKE_SUFFIX and LIKE_STOP
          Hide
          build-team Couchbase Build Team added a comment -

          Build couchbase-server-7.1.0-1279 contains query commit 735802a with commit message:
          MB-48402 Refine fix.

          Show
          build-team Couchbase Build Team added a comment - Build couchbase-server-7.1.0-1279 contains query commit 735802a with commit message: MB-48402 Refine fix.

            People

            Assignee:
            Donald.haggart Donald Haggart
            Reporter:
            Sitaram.Vemulapalli Sitaram Vemulapalli
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes

                  PagerDuty