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

tz_now with empty tz panics

    XMLWordPrintable

Details

    • Untriaged
    • 0
    • Unknown

    Description

      To repro:

      cbq> select now_tz('', 'TZD TZN TZF');
      {
          "requestID": "3e3789a4-4504-4d16-8c39-e1b345c63d09",
          "signature": {
              "$1": "string"
          },
          "results": [
          ],
          "errors": [
              {
                  "code": 5001,
                  "msg": "Panic: runtime error: index out of range [0] with length 0"
              }
          ],
          "status": "aborted", 

      Panic 

      2023-11-16T09:29:49.218-08:00 [SEVERE] request text: <ud>select now_tz('', 'TZD TZN TZF');</ud>
      2023-11-16T09:29:49.218-08:00 [SEVERE] query context: <ud></ud>
      2023-11-16T09:29:49.218-08:00 [SEVERE] stack: goroutine 24316 [running]:
      github.com/couchbase/query/execution.(*Context).Recover(0xc00014ca80, 0xc000005500)
              /home/couchbase/jenkins/workspace/couchbase-server-unix/goproj/src/github.com/couchbase/query/execution/context.go:1704 +0x85
      panic({0x2e898e0?, 0xc0005992a8?})
              /home/couchbase/.cbdepscache/exploded/x86_64/go-1.21.3/go/src/runtime/panic.go:914 +0x21f
      github.com/couchbase/query/execution.(*InitialProject).RunOnce.(*base).runConsumer.func1.2()
              /home/couchbase/jenkins/workspace/couchbase-server-unix/goproj/src/github.com/couchbase/query/execution/base.go:983 +0x150
      panic({0x2e898e0?, 0xc0005992a8?})
              /home/couchbase/.cbdepscache/exploded/x86_64/go-1.21.3/go/src/runtime/panic.go:914 +0x21f
      github.com/couchbase/query/expression.gatherZone({0x0?, 0xc0000d98b8?}, 0x11b8a25?)
              /home/couchbase/jenkins/workspace/couchbase-server-unix/goproj/src/github.com/couchbase/query/expression/func_date.go:3941 +0xcc8
      github.com/couchbase/query/expression.loadLocation({0x0?, 0x7f81a20d3460?})
      ... 

       

      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:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty