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

Unable to add name: duplicate name: while trying to re-use existing prepared name stmt

    XMLWordPrintable

Details

    • Bug
    • Resolution: Won't Fix
    • Major
    • 4.1.0
    • 4.0.0
    • query
    • Security Level: Public
    • None
    • 400-4047
    • Untriaged
    • Unknown

    Description

      Hi Colm ,

      Not sure if this is expected behaviour or not.

      1. Create prepared stmt

       prepare kg1234 from select * from default limit 2 - Success
      

      2. Run named prepared kg1234 - Success

      Ketakis-MacBook-Pro:testrunner ketaki$ curl -v 10.6.2.164:8093/query/service -u Administrator:password -d 'prepared="kg1234"'
      

      3. trying to redefine kg1234 with a different clause

      cbq> prepare kg1234 from select * from default where i_id>0;
      {
          "requestID": "caaa9e38-38e4-44b7-bb2c-a4c338e5cdde",
          "errors": [
              {
                  "code": 4060,
                  "msg": "Unable to add name: duplicate name: kg1234"
              }
          ],
          "status": "fatal",
          "metrics": {
              "elapsedTime": "4.101727ms",
              "executionTime": "3.939084ms",
              "resultCount": 0,
              "resultSize": 0,
              "errorCount": 1
          }
      }
      

      Does the above mean - kg1234 can never again be used elsewhere?

      It was my understanding that I can re-use the same name ( replace in place of a drop prepared stmt)

      Is the above expected to work? Or will this be a error code testing.

      Attachments

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

        Activity

          People

            colm Colm Mchugh (Inactive)
            ketaki Ketaki Gangal (Inactive)
            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