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

[UDF] parsing error with var ending in commit/rollback

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 7.1.0
    • 7.1.0
    • js-evaluator, query
    • 7.1.0-1961
    • Untriaged
    • 1
    • Unknown

    Description

      Following function:

      function parse_me() {
          var this_is_not_rollback = 10;
          var query = this_is_not_rollback;
      } 

      or

      function parse_me() {
          var this_is_not_commit = 10;
          var query = this_is_not_commit;
      } 

      Will result in following runtime error:

          "errors": [
              {
                  "code": 10109,
                  "msg": "Error executing function nested_default (n1ql:parse_me): Evaluator error Exceptions from JS code : run parse_me failed:\nException: ReferenceError: this_is_not_N1QL is not defined\nLocation: functions/n1ql.js:3 \nCode:     var query = this_is_not_N1QL('commit;', {}, false);\nReferenceError: this_is_not_N1QL is not defined\n    at parse_me (functions/n1ql.js:3:17)\n - cause: Evaluator error Exceptions from JS code : run parse_me failed:\nException: ReferenceError: this_is_not_N1QL is not defined\nLocation: functions/n1ql.js:3 \nCode:     var query = this_is_not_N1QL('commit;', {}, false);\nReferenceError: this_is_not_N1QL is not defined\n    at parse_me (functions/n1ql.js:3:17)\n"
              }
          ],
      

      Attachments

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

        Activity

          People

            pierre.regazzoni Pierre Regazzoni
            pierre.regazzoni Pierre Regazzoni
            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