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

Like functions escape character should be optional

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 7.1.0
    • 7.1.0
    • query
    • Untriaged
    • 1
    • 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

        Issue Links

          For Gerrit Dashboard: MB-48402
          # Subject Branch Project Status CR V

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty